@kortexya/reasoninglayer 16.1.0 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/index.cjs +1463 -83
- package/dist/index.d.cts +19913 -16780
- package/dist/index.d.ts +19913 -16780
- package/dist/index.js +1463 -84
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -7,7 +7,7 @@ var __export = (target, all) => {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
// src/config.ts
|
|
10
|
-
var SDK_VERSION = "
|
|
10
|
+
var SDK_VERSION = "17.0.0";
|
|
11
11
|
function checkTimeoutMs(value, where) {
|
|
12
12
|
if (!Number.isFinite(value) || value < 0) {
|
|
13
13
|
throw new Error(
|
|
@@ -91,6 +91,8 @@ var ReasoningLayerError = class extends Error {
|
|
|
91
91
|
};
|
|
92
92
|
var ApiError = class extends ReasoningLayerError {
|
|
93
93
|
name = "ApiError";
|
|
94
|
+
/** Health component that produced a structured refusal. */
|
|
95
|
+
component;
|
|
94
96
|
/** HTTP status code. */
|
|
95
97
|
status;
|
|
96
98
|
/** Backend error code (from response body `error` field), if present. */
|
|
@@ -101,6 +103,7 @@ var ApiError = class extends ReasoningLayerError {
|
|
|
101
103
|
headers;
|
|
102
104
|
constructor(message, status, body, headers, errorCode) {
|
|
103
105
|
super(message);
|
|
106
|
+
this.component = isRecord(body) && typeof body.component === "string" ? body.component : void 0;
|
|
104
107
|
this.status = status;
|
|
105
108
|
this.body = body;
|
|
106
109
|
this.headers = headers;
|
|
@@ -2391,6 +2394,34 @@ var RESPONSE_COMPONENTS = {
|
|
|
2391
2394
|
object: { message: [1, 0], message_ids: [1, { array: 0 }], recipients_count: [1, 0] }
|
|
2392
2395
|
},
|
|
2393
2396
|
BrowserReadCommand: { object: { command_id: [1, 0], origin: [1, 0], session_id: [1, 0] } },
|
|
2397
|
+
BrowserRunPendingAction: { object: { command: [1, 0], intent: [1, 0], name: [1, 0] } },
|
|
2398
|
+
BrowserRunProposal: { object: { action: [1, { object: {} }], id: [1, 0] } },
|
|
2399
|
+
BrowserRunResponse: {
|
|
2400
|
+
object: {
|
|
2401
|
+
browser_session: [1, 0],
|
|
2402
|
+
id: [1, 0],
|
|
2403
|
+
pending: [2, "BrowserRunPendingAction"],
|
|
2404
|
+
phase: [1, 0],
|
|
2405
|
+
result: [2, "BrowserRunResult"],
|
|
2406
|
+
revision: [1, 0],
|
|
2407
|
+
step: [1, 0],
|
|
2408
|
+
task: [1, 0],
|
|
2409
|
+
proposal: [2, "BrowserRunProposal"]
|
|
2410
|
+
}
|
|
2411
|
+
},
|
|
2412
|
+
BrowserRunResult: { object: { success: [1, 0], text: [1, 0] } },
|
|
2413
|
+
BrowserRunView: {
|
|
2414
|
+
object: {
|
|
2415
|
+
browser_session: [1, 0],
|
|
2416
|
+
id: [1, 0],
|
|
2417
|
+
pending: [2, "BrowserRunPendingAction"],
|
|
2418
|
+
phase: [1, 0],
|
|
2419
|
+
result: [2, "BrowserRunResult"],
|
|
2420
|
+
revision: [1, 0],
|
|
2421
|
+
step: [1, 0],
|
|
2422
|
+
task: [1, 0]
|
|
2423
|
+
}
|
|
2424
|
+
},
|
|
2394
2425
|
BrowserStepResponse: {
|
|
2395
2426
|
object: {
|
|
2396
2427
|
actions: [1, { array: { object: {} } }],
|
|
@@ -2907,6 +2938,18 @@ var RESPONSE_COMPONENTS = {
|
|
|
2907
2938
|
}
|
|
2908
2939
|
},
|
|
2909
2940
|
ClaimAssessmentDto: { object: { content: [1, 0], subtype: [1, 0], verdict: [1, 0] } },
|
|
2941
|
+
ClaimAttestationDto: { object: { at: [1, 0], by: [1, 0], kind: [1, 0] } },
|
|
2942
|
+
ClaimAttestationResponseDto: {
|
|
2943
|
+
object: {
|
|
2944
|
+
attestation_id: [1, 0],
|
|
2945
|
+
attested_at: [1, 0],
|
|
2946
|
+
attested_by: [1, 0],
|
|
2947
|
+
conversation_id: [1, 0],
|
|
2948
|
+
kind: [1, 0],
|
|
2949
|
+
point_ref: [1, 0],
|
|
2950
|
+
turn_id: [1, 0]
|
|
2951
|
+
}
|
|
2952
|
+
},
|
|
2910
2953
|
ClaimProvenanceDto: {
|
|
2911
2954
|
object: { source_scope: [1, 0], source_sort: [1, 0], source_term_id: [1, 0] }
|
|
2912
2955
|
},
|
|
@@ -2954,6 +2997,9 @@ var RESPONSE_COMPONENTS = {
|
|
|
2954
2997
|
question_probabilities: [1, { object: {} }]
|
|
2955
2998
|
}
|
|
2956
2999
|
},
|
|
3000
|
+
ClausePolicyDraftDto: {
|
|
3001
|
+
object: { rlql: [1, 0], source_clause_id: [1, 0], source_document_id: [1, 0] }
|
|
3002
|
+
},
|
|
2957
3003
|
CleanupResponse: {
|
|
2958
3004
|
object: {
|
|
2959
3005
|
cleaned_curried_functions: [1, 0],
|
|
@@ -3870,8 +3916,12 @@ var RESPONSE_COMPONENTS = {
|
|
|
3870
3916
|
reasoning_trace: [2, "ReasoningTraceDto"],
|
|
3871
3917
|
stripped_claims: [0, { array: "StrippedClaimDto" }],
|
|
3872
3918
|
suggestions: [1, { array: 0 }],
|
|
3919
|
+
to_verify: [0, { array: "ToVerifyPointDto" }],
|
|
3873
3920
|
turn_id: [1, 0],
|
|
3874
|
-
ui_customizations: [2, { array: "UICustomizationDto" }]
|
|
3921
|
+
ui_customizations: [2, { array: "UICustomizationDto" }],
|
|
3922
|
+
unconfirmed: [0, { array: "UnconfirmedRecordDto" }],
|
|
3923
|
+
unread_pages: [0, { array: "UnreadPagesDto" }],
|
|
3924
|
+
web_sources: [0, { array: "WebSourceDto" }]
|
|
3875
3925
|
}
|
|
3876
3926
|
},
|
|
3877
3927
|
ConversationNextQuestionDto: { object: { claim_index: [1, 0], kind: [1, 0] } },
|
|
@@ -4057,7 +4107,13 @@ var RESPONSE_COMPONENTS = {
|
|
|
4057
4107
|
},
|
|
4058
4108
|
CreateModuleResponse: { object: { module_name: [1, 0], success: [1, 0] } },
|
|
4059
4109
|
CreateResearchSessionResponse: {
|
|
4060
|
-
object: {
|
|
4110
|
+
object: {
|
|
4111
|
+
created_at: [1, 0],
|
|
4112
|
+
knowledge_base_tenant_id: [1, 0],
|
|
4113
|
+
question: [1, 0],
|
|
4114
|
+
session_id: [1, 0],
|
|
4115
|
+
status: [1, 0]
|
|
4116
|
+
}
|
|
4061
4117
|
},
|
|
4062
4118
|
CreateSessionResponse: { object: { created_at: [1, 0], session_id: [1, 0], status: [1, 0] } },
|
|
4063
4119
|
CreateSubscriptionResponse: { object: { subscription_id: [1, 0] } },
|
|
@@ -4292,6 +4348,9 @@ var RESPONSE_COMPONENTS = {
|
|
|
4292
4348
|
verified_count: [1, 0]
|
|
4293
4349
|
}
|
|
4294
4350
|
},
|
|
4351
|
+
Decision: {
|
|
4352
|
+
object: { quota: [2, "QuotaView"], sanitise: [1, 0], sites: [2, "Sites"], verdict: [1, 0] }
|
|
4353
|
+
},
|
|
4295
4354
|
DecisionAuditResponse: {
|
|
4296
4355
|
object: {
|
|
4297
4356
|
acts: [1, { array: "ActValueDto" }],
|
|
@@ -4900,6 +4959,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
4900
4959
|
sort_names: [1, { array: 0 }],
|
|
4901
4960
|
term_ids: [1, { array: 0 }],
|
|
4902
4961
|
total_tokens: [1, 0],
|
|
4962
|
+
value_pass: [2, "IngestionValuePassDto"],
|
|
4903
4963
|
work_cache: [2, "IngestionWorkCacheDto"]
|
|
4904
4964
|
}
|
|
4905
4965
|
},
|
|
@@ -5150,6 +5210,8 @@ var RESPONSE_COMPONENTS = {
|
|
|
5150
5210
|
boot_id: [1, 0],
|
|
5151
5211
|
build_info: [1, "BuildInfoDto"],
|
|
5152
5212
|
components: [1, { array: "ComponentHealthDto" }],
|
|
5213
|
+
holds_unproven_text: [1, 0],
|
|
5214
|
+
live_recording: [1, 0],
|
|
5153
5215
|
sovereign: [1, 0],
|
|
5154
5216
|
started_at: [1, 0],
|
|
5155
5217
|
status: [1, 0],
|
|
@@ -5377,6 +5439,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
5377
5439
|
},
|
|
5378
5440
|
ExecuteTranspiledResponse: {
|
|
5379
5441
|
object: {
|
|
5442
|
+
completeness: [1, 0],
|
|
5380
5443
|
dialect: [1, 0],
|
|
5381
5444
|
query: [1, 0],
|
|
5382
5445
|
row_count: [1, 0],
|
|
@@ -5855,8 +5918,34 @@ var RESPONSE_COMPONENTS = {
|
|
|
5855
5918
|
term_id: [1, 0]
|
|
5856
5919
|
}
|
|
5857
5920
|
},
|
|
5921
|
+
FindGroup: { object: { items: [1, { array: "FindHit" }], kind: [1, 0] } },
|
|
5922
|
+
FindHit: {
|
|
5923
|
+
object: {
|
|
5924
|
+
at: [1, "FindPlace"],
|
|
5925
|
+
id: [1, 0],
|
|
5926
|
+
marks: [1, { array: { array: 0 } }],
|
|
5927
|
+
people: [1, { array: 0 }],
|
|
5928
|
+
reading: [1, 0],
|
|
5929
|
+
snippet: [1, 0],
|
|
5930
|
+
sort: [1, 0],
|
|
5931
|
+
source: [1, "FindSource"],
|
|
5932
|
+
title: [1, 0]
|
|
5933
|
+
}
|
|
5934
|
+
},
|
|
5935
|
+
FindNotSearched: { object: { reason: [1, 0], unread_pages: [0, { array: 0 }] } },
|
|
5936
|
+
FindPlace: { object: {} },
|
|
5858
5937
|
FindPlansResponse: { object: { count: [1, 0], plans: [1, { array: "PlanMatchDto" }] } },
|
|
5938
|
+
FindResponse: {
|
|
5939
|
+
object: {
|
|
5940
|
+
groups: [1, { array: "FindGroup" }],
|
|
5941
|
+
not_searched: [1, { array: "FindNotSearched" }],
|
|
5942
|
+
query: [1, 0],
|
|
5943
|
+
searched: [1, { array: "FindSearched" }]
|
|
5944
|
+
}
|
|
5945
|
+
},
|
|
5859
5946
|
FindRulesResponse: { object: { matching_rules: [1, { array: "RuleDto" }] } },
|
|
5947
|
+
FindSearched: { object: { live: [1, 0], source: [1, 0] } },
|
|
5948
|
+
FindSource: { object: {} },
|
|
5860
5949
|
FindingContextDto: {
|
|
5861
5950
|
object: { related_record_ids: [1, { array: 0 }], roles: [1, { array: 0 }] }
|
|
5862
5951
|
},
|
|
@@ -6309,6 +6398,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
6309
6398
|
created_at: [1, 0],
|
|
6310
6399
|
cycles: [1, { array: "ResearchCycleResultDto" }],
|
|
6311
6400
|
gap_check: [2, "GapCheck"],
|
|
6401
|
+
knowledge_base_tenant_id: [1, 0],
|
|
6312
6402
|
papers: [1, { array: "PaperMetadataDto" }],
|
|
6313
6403
|
question: [1, 0],
|
|
6314
6404
|
session_id: [1, 0],
|
|
@@ -7033,6 +7123,9 @@ var RESPONSE_COMPONENTS = {
|
|
|
7033
7123
|
work_cache: [0, "IngestionWorkCacheDto"]
|
|
7034
7124
|
}
|
|
7035
7125
|
},
|
|
7126
|
+
IngestionValuePassDto: {
|
|
7127
|
+
object: { passages_not_read: [1, 0], values_held: [1, 0], values_read: [1, 0] }
|
|
7128
|
+
},
|
|
7036
7129
|
IngestionWorkCacheDto: {
|
|
7037
7130
|
object: {
|
|
7038
7131
|
model_calls: [1, 0],
|
|
@@ -7776,6 +7869,16 @@ var RESPONSE_COMPONENTS = {
|
|
|
7776
7869
|
}
|
|
7777
7870
|
},
|
|
7778
7871
|
LiveDocVersionsResponse: { object: { versions: [1, { array: "LiveDocVersionDto" }] } },
|
|
7872
|
+
LiveRecordingView: {
|
|
7873
|
+
object: {
|
|
7874
|
+
bytes: [1, 0],
|
|
7875
|
+
duration_secs: [1, 0],
|
|
7876
|
+
finals: [1, { array: { object: {} } }],
|
|
7877
|
+
id: [1, 0],
|
|
7878
|
+
result: [2, "IngestAudioResponse"],
|
|
7879
|
+
state: [1, 0]
|
|
7880
|
+
}
|
|
7881
|
+
},
|
|
7779
7882
|
LlmContextFeatureDto: { object: { name: [1, 0], required: [1, 0] } },
|
|
7780
7883
|
LlmContextPreferenceDto: { object: { key: [1, 0], value: [1, 0] } },
|
|
7781
7884
|
LlmContextSortDto: {
|
|
@@ -9765,6 +9868,17 @@ var RESPONSE_COMPONENTS = {
|
|
|
9765
9868
|
worker_count: [1, 0]
|
|
9766
9869
|
}
|
|
9767
9870
|
},
|
|
9871
|
+
QueuedVideoIngestResponse: {
|
|
9872
|
+
object: {
|
|
9873
|
+
document_id: [1, 0],
|
|
9874
|
+
session_id: [1, 0],
|
|
9875
|
+
status: [1, 0],
|
|
9876
|
+
status_url: [1, 0],
|
|
9877
|
+
original_files: [1, { array: "RetainedOriginal" }],
|
|
9878
|
+
source_text: [1, 0]
|
|
9879
|
+
}
|
|
9880
|
+
},
|
|
9881
|
+
QuotaView: { object: { limit: [1, 0], resets_at: [1, 0], used: [1, 0] } },
|
|
9768
9882
|
QuotientClass: { object: { alpha: [1, 0], size: [1, 0], sort_ids: [1, { array: 0 }] } },
|
|
9769
9883
|
QuotientOrderEdge: { object: { degree: [1, 0], from: [1, 0], to: [1, 0] } },
|
|
9770
9884
|
RangeDto: { object: { feature: [1, 0], lower: [1, "SideDto"], upper: [1, "SideDto"] } },
|
|
@@ -9839,6 +9953,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
9839
9953
|
},
|
|
9840
9954
|
ReasoningStageDto: {
|
|
9841
9955
|
object: {
|
|
9956
|
+
blocked_sites: [0, { array: 0 }],
|
|
9842
9957
|
kind: [1, 0],
|
|
9843
9958
|
llm_used: [1, 0],
|
|
9844
9959
|
matched_entities: [0, { array: "MatchedEntityDto" }],
|
|
@@ -10455,7 +10570,8 @@ var RESPONSE_COMPONENTS = {
|
|
|
10455
10570
|
total_corrected: [1, 0],
|
|
10456
10571
|
total_merged: [1, 0],
|
|
10457
10572
|
total_pending: [1, 0],
|
|
10458
|
-
total_rejected: [1, 0]
|
|
10573
|
+
total_rejected: [1, 0],
|
|
10574
|
+
total_superseded: [1, 0]
|
|
10459
10575
|
}
|
|
10460
10576
|
},
|
|
10461
10577
|
ReviewUnitResponse: {
|
|
@@ -11245,6 +11361,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
11245
11361
|
},
|
|
11246
11362
|
SiteRequestFiled: { object: { created: [1, 0], request: [1, "SiteRequestDto"] } },
|
|
11247
11363
|
SiteRequestList: { object: { items: [1, { array: "SiteRequestDto" }] } },
|
|
11364
|
+
Sites: { object: { allow: [1, { array: 0 }], block: [1, { array: 0 }] } },
|
|
11248
11365
|
SkillDraftEditResponse: {
|
|
11249
11366
|
object: { description: [1, 0], markdown: [1, 0], name: [1, 0], prompt_version: [1, 0] }
|
|
11250
11367
|
},
|
|
@@ -11283,6 +11400,24 @@ var RESPONSE_COMPONENTS = {
|
|
|
11283
11400
|
SlideNotes: { object: { page: [1, 0], text: [1, 0] } },
|
|
11284
11401
|
SmoothingParametersDto: { object: { alpha: [1, 0] } },
|
|
11285
11402
|
SmtCheckResponse: { object: { assignments: [2, { object: {} }], result: [1, 0] } },
|
|
11403
|
+
SnapshotEnvelope: {
|
|
11404
|
+
object: {
|
|
11405
|
+
data: [1, 0],
|
|
11406
|
+
format: [1, 0],
|
|
11407
|
+
metadata: [1, "SnapshotExportMetadata"],
|
|
11408
|
+
version: [1, 0]
|
|
11409
|
+
}
|
|
11410
|
+
},
|
|
11411
|
+
SnapshotExportMetadata: {
|
|
11412
|
+
object: {
|
|
11413
|
+
created_at: [1, 0],
|
|
11414
|
+
name: [1, 0],
|
|
11415
|
+
reasoninglayer_version: [1, 0],
|
|
11416
|
+
size_bytes: [1, 0],
|
|
11417
|
+
source_tenant_id: [1, 0],
|
|
11418
|
+
table_counts: [1, { object: {} }]
|
|
11419
|
+
}
|
|
11420
|
+
},
|
|
11286
11421
|
SnapshotFilter: { object: { request_path_pattern: [1, 0] } },
|
|
11287
11422
|
SnapshotResponse: {
|
|
11288
11423
|
object: {
|
|
@@ -11737,6 +11872,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
11737
11872
|
supported_modes: [1, { array: 0 }]
|
|
11738
11873
|
}
|
|
11739
11874
|
},
|
|
11875
|
+
SourceVerdictDto: { object: { kind: [1, 0] } },
|
|
11740
11876
|
SourcesResponse: { object: { sources: [1, { array: "SourceDto" }] } },
|
|
11741
11877
|
SovereignEndpoint: { object: { host: [1, 0], internal: [1, 0], var: [1, 0] } },
|
|
11742
11878
|
SovereigntyReport: {
|
|
@@ -12353,6 +12489,16 @@ var RESPONSE_COMPONENTS = {
|
|
|
12353
12489
|
reachable: [2, "ReachableDto"]
|
|
12354
12490
|
}
|
|
12355
12491
|
},
|
|
12492
|
+
ToVerifyPointDto: {
|
|
12493
|
+
object: {
|
|
12494
|
+
attestations: [0, { array: "ClaimAttestationDto" }],
|
|
12495
|
+
fact_term_ids: [0, { array: 0 }],
|
|
12496
|
+
kind: [1, 0],
|
|
12497
|
+
point_ref: [1, 0],
|
|
12498
|
+
reason: [1, 0],
|
|
12499
|
+
text: [1, 0]
|
|
12500
|
+
}
|
|
12501
|
+
},
|
|
12356
12502
|
TokenSummary: {
|
|
12357
12503
|
object: { cache_read: [1, 0], cache_write: [1, 0], input: [1, 0], output: [1, 0] }
|
|
12358
12504
|
},
|
|
@@ -12506,7 +12652,11 @@ var RESPONSE_COMPONENTS = {
|
|
|
12506
12652
|
reasoning_trace: [2, "ReasoningTraceDto"],
|
|
12507
12653
|
role: [1, 0],
|
|
12508
12654
|
stripped_claims: [0, { array: "StrippedClaimDto" }],
|
|
12509
|
-
timestamp: [1, 0]
|
|
12655
|
+
timestamp: [1, 0],
|
|
12656
|
+
to_verify: [0, { array: "ToVerifyPointDto" }],
|
|
12657
|
+
unconfirmed: [0, { array: "UnconfirmedRecordDto" }],
|
|
12658
|
+
unread_pages: [0, { array: "UnreadPagesDto" }],
|
|
12659
|
+
web_sources: [0, { array: "WebSourceDto" }]
|
|
12510
12660
|
}
|
|
12511
12661
|
},
|
|
12512
12662
|
TurnFeedbackDto: { object: { feedback_id: [1, 0], rating: [1, 0], recorded_at: [1, 0] } },
|
|
@@ -12601,6 +12751,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
12601
12751
|
y: [1, 0]
|
|
12602
12752
|
}
|
|
12603
12753
|
},
|
|
12754
|
+
UnconfirmedRecordDto: { object: { record_id: [1, 0], sort: [1, 0] } },
|
|
12604
12755
|
UndeterminedDriftDto: { object: { crosswalk_id: [1, 0], reason: [1, 0] } },
|
|
12605
12756
|
UndoRuleStoreResponse: { object: { rule_count: [1, 0], success: [1, 0] } },
|
|
12606
12757
|
UnificationQueryResponse: { object: { count: [1, 0], results: [1, { array: "TermDto" }] } },
|
|
@@ -12682,6 +12833,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
12682
12833
|
records: [1, 0]
|
|
12683
12834
|
}
|
|
12684
12835
|
},
|
|
12836
|
+
UnreadPagesDto: { object: { document_id: [1, 0], pages: [1, { array: 0 }], reason: [1, 0] } },
|
|
12685
12837
|
UnreadableRecordDto: { object: { reason: [1, 0], record_id: [1, 0] } },
|
|
12686
12838
|
UnsatisfiableClassDto: { object: { class: [1, 0], disjoint_pair: [1, { array: 0 }] } },
|
|
12687
12839
|
UnsatisfiableSortDto: { object: { disjoint_pair: [1, { array: 0 }], sort: [1, 0] } },
|
|
@@ -12915,6 +13067,16 @@ var RESPONSE_COMPONENTS = {
|
|
|
12915
13067
|
}
|
|
12916
13068
|
},
|
|
12917
13069
|
VersionDto: { object: { bundle_id: [1, 0], engine_req: [1, 0], version: [1, 0] } },
|
|
13070
|
+
VideoEvidenceReceiptDto: {
|
|
13071
|
+
object: {
|
|
13072
|
+
document_term_id: [1, 0],
|
|
13073
|
+
located_terms: [1, 0],
|
|
13074
|
+
unlocated_term_ids: [1, { array: 0 }]
|
|
13075
|
+
}
|
|
13076
|
+
},
|
|
13077
|
+
VideoIngestResponse: {
|
|
13078
|
+
object: { evidence: [1, "VideoEvidenceReceiptDto"], stats: [1, "IngestionStatsDto"] }
|
|
13079
|
+
},
|
|
12918
13080
|
ViewRefDto: { object: { draft_not_active: [1, 0], kind: [1, 0] } },
|
|
12919
13081
|
ViolatedConstraintDto: { object: { feature: [1, 0], kind: [1, 0] } },
|
|
12920
13082
|
ViolationCounts: {
|
|
@@ -13071,6 +13233,16 @@ var RESPONSE_COMPONENTS = {
|
|
|
13071
13233
|
WebSearchHitDto: { object: { provider: [1, 0], snippet: [1, 0], title: [1, 0], url: [1, 0] } },
|
|
13072
13234
|
WebSearchProviderDto: { object: { healthy: [1, 0], name: [1, 0] } },
|
|
13073
13235
|
WebSearchResponse: { object: { query: [1, 0], results: [1, { array: "WebSearchHitDto" }] } },
|
|
13236
|
+
WebSourceDto: {
|
|
13237
|
+
object: {
|
|
13238
|
+
qualification: [1, "WebSourceQualificationDto"],
|
|
13239
|
+
record_term_id: [1, 0],
|
|
13240
|
+
source_verdict: [2, "SourceVerdictDto"],
|
|
13241
|
+
url: [1, 0],
|
|
13242
|
+
used: [1, 0]
|
|
13243
|
+
}
|
|
13244
|
+
},
|
|
13245
|
+
WebSourceQualificationDto: { object: { level: [1, 0] } },
|
|
13074
13246
|
WebhookCallbackResponse: {
|
|
13075
13247
|
object: { demons_fired: [1, 0], message: [1, 0], status: [1, 0], term_updated: [1, 0] }
|
|
13076
13248
|
},
|
|
@@ -13638,6 +13810,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
13638
13810
|
path: "/api/v1/feasibility/sessions/{session_id}/assumptions",
|
|
13639
13811
|
responses: { 200: "SchedulingDeltaResponse" }
|
|
13640
13812
|
},
|
|
13813
|
+
attestConversationPoint: {
|
|
13814
|
+
method: "POST",
|
|
13815
|
+
path: "/api/v1/conversation/{id}/attestations",
|
|
13816
|
+
responses: { 200: "ClaimAttestationResponseDto" }
|
|
13817
|
+
},
|
|
13641
13818
|
auditAssumptions: {
|
|
13642
13819
|
method: "POST",
|
|
13643
13820
|
path: "/api/v1/causal/assumptions/audit",
|
|
@@ -13743,6 +13920,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
13743
13920
|
path: "/api/v1/cognitive/agents/messages/broadcast",
|
|
13744
13921
|
responses: { 200: "BroadcastMessageResponse" }
|
|
13745
13922
|
},
|
|
13923
|
+
browserAgentRun: {
|
|
13924
|
+
method: "POST",
|
|
13925
|
+
path: "/api/v1/agent/browser-runs/{run_id}",
|
|
13926
|
+
responses: { 200: "BrowserRunResponse" }
|
|
13927
|
+
},
|
|
13746
13928
|
buildTaxonomy: {
|
|
13747
13929
|
method: "POST",
|
|
13748
13930
|
path: "/api/v1/grounded-synthesis/taxonomies/build",
|
|
@@ -14755,6 +14937,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
14755
14937
|
path: "/api/v1/governance/change-requests/{change_request_id}/dispose",
|
|
14756
14938
|
responses: { 200: "ChangeRequestResponse" }
|
|
14757
14939
|
},
|
|
14940
|
+
draftClausePolicy: {
|
|
14941
|
+
method: "POST",
|
|
14942
|
+
path: "/api/v1/documents/{document_id}/clauses/{clause_id}/policy-draft",
|
|
14943
|
+
responses: { 200: "ClausePolicyDraftDto" }
|
|
14944
|
+
},
|
|
14758
14945
|
draftSkillEdit: {
|
|
14759
14946
|
method: "POST",
|
|
14760
14947
|
path: "/api/v1/skills/draft-edit",
|
|
@@ -15081,6 +15268,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
15081
15268
|
path: "/api/v1/vocabulary/exports/skos",
|
|
15082
15269
|
responses: { 200: "SkosExportResponse" }
|
|
15083
15270
|
},
|
|
15271
|
+
exportSnapshot: {
|
|
15272
|
+
method: "GET",
|
|
15273
|
+
path: "/api/v1/admin/snapshots/{snapshot_id}/export",
|
|
15274
|
+
responses: { 200: "SnapshotEnvelope" }
|
|
15275
|
+
},
|
|
15084
15276
|
extendDsr: {
|
|
15085
15277
|
method: "POST",
|
|
15086
15278
|
path: "/api/v1/dsr/{id}/extend",
|
|
@@ -15126,6 +15318,7 @@ var RESPONSE_OPERATIONS = {
|
|
|
15126
15318
|
path: "/api/v1/oversight/sessions/{session_id}/finalize",
|
|
15127
15319
|
responses: { 200: "FormalJudgeResponse" }
|
|
15128
15320
|
},
|
|
15321
|
+
find: { method: "POST", path: "/api/v1/find", responses: { 200: "FindResponse" } },
|
|
15129
15322
|
findBySort: {
|
|
15130
15323
|
method: "POST",
|
|
15131
15324
|
path: "/api/v1/query/by-sort",
|
|
@@ -15773,6 +15966,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
15773
15966
|
path: "/api/v1/sorts/least/{tenant_id}",
|
|
15774
15967
|
responses: { 200: "LeastSortsResponse" }
|
|
15775
15968
|
},
|
|
15969
|
+
getLiveRecording: {
|
|
15970
|
+
method: "GET",
|
|
15971
|
+
path: "/api/v1/audio/recordings/{id}",
|
|
15972
|
+
responses: { 200: "LiveRecordingView" }
|
|
15973
|
+
},
|
|
15776
15974
|
getLlmMetrics: {
|
|
15777
15975
|
method: "GET",
|
|
15778
15976
|
path: "/api/v1/metrics/llm",
|
|
@@ -16347,6 +16545,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
16347
16545
|
path: "/api/v1/ingest/url",
|
|
16348
16546
|
responses: { 200: "IngestUrlResponse" }
|
|
16349
16547
|
},
|
|
16548
|
+
ingestVideo: {
|
|
16549
|
+
method: "POST",
|
|
16550
|
+
path: "/api/v1/ingest/video",
|
|
16551
|
+
responses: { 201: "VideoIngestResponse", 202: "QueuedVideoIngestResponse" }
|
|
16552
|
+
},
|
|
16350
16553
|
installConceptRules: {
|
|
16351
16554
|
method: "POST",
|
|
16352
16555
|
path: "/api/v1/analysis/concept-rules",
|
|
@@ -16495,7 +16698,7 @@ var RESPONSE_OPERATIONS = {
|
|
|
16495
16698
|
listBrowserAgentRuns: {
|
|
16496
16699
|
method: "GET",
|
|
16497
16700
|
path: "/api/v1/agent/browser-runs",
|
|
16498
|
-
responses: { 200: { array:
|
|
16701
|
+
responses: { 200: { array: "BrowserRunView" } }
|
|
16499
16702
|
},
|
|
16500
16703
|
listCandidates: {
|
|
16501
16704
|
method: "GET",
|
|
@@ -17387,6 +17590,7 @@ var RESPONSE_OPERATIONS = {
|
|
|
17387
17590
|
path: "/api/v1/execution/sessions/{session_id}/goals/pop",
|
|
17388
17591
|
responses: { 200: "GoalStackResponse" }
|
|
17389
17592
|
},
|
|
17593
|
+
postDecide: { method: "POST", path: "/api/v1/boundary/decide", responses: { 200: "Decision" } },
|
|
17390
17594
|
postExchange: {
|
|
17391
17595
|
method: "POST",
|
|
17392
17596
|
path: "/api/v1/gateway-sessions/{key}/exchanges",
|
|
@@ -18068,6 +18272,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
18068
18272
|
path: "/api/v1/ingest/dlq/{id}/retry",
|
|
18069
18273
|
responses: { 202: "DlqRetryResponse" }
|
|
18070
18274
|
},
|
|
18275
|
+
retryLiveRecording: {
|
|
18276
|
+
method: "POST",
|
|
18277
|
+
path: "/api/v1/audio/recordings/{id}/retry",
|
|
18278
|
+
responses: { 200: "LiveRecordingView", 202: "LiveRecordingView" }
|
|
18279
|
+
},
|
|
18071
18280
|
review: {
|
|
18072
18281
|
method: "POST",
|
|
18073
18282
|
path: "/api/v1/runtime/builder-review",
|
|
@@ -18478,6 +18687,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
18478
18687
|
path: "/api/v1/cognitive/agents/{agent_id}/stop",
|
|
18479
18688
|
responses: { 200: "AgentStatusChangeResponse" }
|
|
18480
18689
|
},
|
|
18690
|
+
stopLiveRecording: {
|
|
18691
|
+
method: "POST",
|
|
18692
|
+
path: "/api/v1/audio/recordings/{id}/stop",
|
|
18693
|
+
responses: { 200: "LiveRecordingView", 202: "LiveRecordingView" }
|
|
18694
|
+
},
|
|
18481
18695
|
storePlan: {
|
|
18482
18696
|
method: "POST",
|
|
18483
18697
|
path: "/api/v1/cognitive/agents/plans",
|
|
@@ -19552,7 +19766,8 @@ function BulkRowRefusalFromApiToFront(dto) {
|
|
|
19552
19766
|
message: dto.message,
|
|
19553
19767
|
...dto.feature ? { feature: dto.feature } : {},
|
|
19554
19768
|
...dto.constraint_name != null ? { constraintName: dto.constraint_name } : {},
|
|
19555
|
-
...dto.constraint_message != null ? { constraintMessage: dto.constraint_message } : {}
|
|
19769
|
+
...dto.constraint_message != null ? { constraintMessage: dto.constraint_message } : {},
|
|
19770
|
+
...dto.code != null ? { code: dto.code } : {}
|
|
19556
19771
|
};
|
|
19557
19772
|
}
|
|
19558
19773
|
function ClearTermsResponseFromApiToFront(dto) {
|
|
@@ -21660,6 +21875,7 @@ function BackwardChainResponseFromApiToFront(dto) {
|
|
|
21660
21875
|
};
|
|
21661
21876
|
if (dto.derivation_complete != null) out.derivationComplete = dto.derivation_complete;
|
|
21662
21877
|
if (dto.completed_proof_count != null) out.completedProofCount = dto.completed_proof_count;
|
|
21878
|
+
if (dto.valid_before != null) out.validBefore = dto.valid_before;
|
|
21663
21879
|
if (dto.open_world_search != null) {
|
|
21664
21880
|
out.openWorldSearch = OpenWorldSearchCompletionFromApiToFront(dto.open_world_search);
|
|
21665
21881
|
}
|
|
@@ -21732,7 +21948,11 @@ function BulkAddRulesResponseFromApiToFront(dto) {
|
|
|
21732
21948
|
return out;
|
|
21733
21949
|
}
|
|
21734
21950
|
function RejectedBulkItemFromApiToFront(dto) {
|
|
21735
|
-
return {
|
|
21951
|
+
return {
|
|
21952
|
+
index: dto.index,
|
|
21953
|
+
reason: dto.reason,
|
|
21954
|
+
...dto.code != null ? { code: dto.code } : {}
|
|
21955
|
+
};
|
|
21736
21956
|
}
|
|
21737
21957
|
function BulkAddFactsResponseFromApiToFront(dto) {
|
|
21738
21958
|
const out = {
|
|
@@ -21852,6 +22072,7 @@ function NafProveResponseFromApiToFront(dto) {
|
|
|
21852
22072
|
};
|
|
21853
22073
|
if (dto.derivation_complete != null) out.derivationComplete = dto.derivation_complete;
|
|
21854
22074
|
if (dto.completed_proof_count != null) out.completedProofCount = dto.completed_proof_count;
|
|
22075
|
+
if (dto.valid_before != null) out.validBefore = dto.valid_before;
|
|
21855
22076
|
return out;
|
|
21856
22077
|
}
|
|
21857
22078
|
function CreateGoalResponseFromApiToFront(dto) {
|
|
@@ -26947,7 +27168,9 @@ function VocabularyAuthorityRelationFromApiToFront(dto) {
|
|
|
26947
27168
|
key,
|
|
26948
27169
|
wireString(value, `body.fact.features.${key}`)
|
|
26949
27170
|
])
|
|
26950
|
-
)
|
|
27171
|
+
),
|
|
27172
|
+
...present(dto.valid_until) ? { validUntil: wireString(dto.valid_until, "body.fact.valid_until") } : {},
|
|
27173
|
+
...dto.expired === void 0 ? {} : { expired: wireBoolean(dto.expired, "body.fact.expired") }
|
|
26951
27174
|
};
|
|
26952
27175
|
}
|
|
26953
27176
|
function VocabularyAuthorityRelationAssertedFromApiToFront(dto) {
|
|
@@ -27312,7 +27535,9 @@ function GovernanceAuthorityRelationFromApiToFront(dto) {
|
|
|
27312
27535
|
return {
|
|
27313
27536
|
features: definedRecord(dto.features),
|
|
27314
27537
|
id: dto.id,
|
|
27315
|
-
relation: dto.relation
|
|
27538
|
+
relation: dto.relation,
|
|
27539
|
+
...dto.valid_until === void 0 ? {} : { validUntil: dto.valid_until === null ? null : dto.valid_until },
|
|
27540
|
+
...dto.expired === void 0 ? {} : { expired: wireBoolean(dto.expired, "authorityRelation.expired") }
|
|
27316
27541
|
};
|
|
27317
27542
|
}
|
|
27318
27543
|
function GovernanceAuthorityRelationPageResponseFromApiToFront(dto) {
|
|
@@ -28824,6 +29049,14 @@ var GOVERNANCE_REFUSAL_CODES = members({
|
|
|
28824
29049
|
llm_provider_failed: true,
|
|
28825
29050
|
subscription_source_unconfigured: true,
|
|
28826
29051
|
subscription_source_foreign: true,
|
|
29052
|
+
browser_run_person_required: true,
|
|
29053
|
+
browser_run_access_denied: true,
|
|
29054
|
+
browser_authority_unavailable: true,
|
|
29055
|
+
browser_run_not_found: true,
|
|
29056
|
+
browser_run_conflict: true,
|
|
29057
|
+
browser_run_task_invalid: true,
|
|
29058
|
+
browser_observation_out_of_bounds: true,
|
|
29059
|
+
browser_run_store_unavailable: true,
|
|
28827
29060
|
workflow_authority_unconfigured: true,
|
|
28828
29061
|
action_approval_denied: true,
|
|
28829
29062
|
action_approval_undetermined: true,
|
|
@@ -28860,7 +29093,14 @@ var GOVERNANCE_REFUSAL_CODES = members({
|
|
|
28860
29093
|
statement_not_a_rule: true,
|
|
28861
29094
|
statement_refused: true,
|
|
28862
29095
|
rule_comparison_timeout: true,
|
|
28863
|
-
rule_comparison_failed: true
|
|
29096
|
+
rule_comparison_failed: true,
|
|
29097
|
+
reserved_sort_write_refused: true,
|
|
29098
|
+
sort_write_not_granted: true,
|
|
29099
|
+
filing_term_unread: true,
|
|
29100
|
+
reference_term_unknown: true,
|
|
29101
|
+
term_id_unavailable: true,
|
|
29102
|
+
reserved_sort_delete_refused: true,
|
|
29103
|
+
sort_delete_not_granted: true
|
|
28864
29104
|
});
|
|
28865
29105
|
|
|
28866
29106
|
// src/utils/vocabulary-refusal.ts
|
|
@@ -29088,12 +29328,30 @@ function rethrowVocabularyRefusal(error) {
|
|
|
29088
29328
|
}
|
|
29089
29329
|
throw error;
|
|
29090
29330
|
}
|
|
29331
|
+
function rethrowBulkRowCodes(error) {
|
|
29332
|
+
if (error instanceof BulkRefusedError) {
|
|
29333
|
+
const body = error.body;
|
|
29334
|
+
const wireRows = typeof body === "object" && body !== null && "errors" in body ? body.errors : void 0;
|
|
29335
|
+
if (Array.isArray(wireRows) && wireRows.length === error.rows.length) {
|
|
29336
|
+
const entries = wireRows;
|
|
29337
|
+
const rows = error.rows.map((row, position) => {
|
|
29338
|
+
const entry2 = entries[position];
|
|
29339
|
+
const code = typeof entry2 === "object" && entry2 !== null && "code" in entry2 ? entry2.code : void 0;
|
|
29340
|
+
const known = GOVERNANCE_REFUSAL_CODES.find((member) => member === code);
|
|
29341
|
+
return known === void 0 ? row : { ...row, code: known };
|
|
29342
|
+
});
|
|
29343
|
+
throw new BulkRefusedError(error.message, body, error.headers, rows, error.errorCode);
|
|
29344
|
+
}
|
|
29345
|
+
}
|
|
29346
|
+
throw error;
|
|
29347
|
+
}
|
|
29091
29348
|
function governanceRefusalOfBody(body) {
|
|
29092
29349
|
try {
|
|
29093
29350
|
const wire = wireObject(body, "body");
|
|
29094
29351
|
return {
|
|
29095
29352
|
error: wireString(wire.error, "error"),
|
|
29096
29353
|
code: wireLiteral(wire.code, GOVERNANCE_REFUSAL_CODES, "code"),
|
|
29354
|
+
...isAbsent(wire.component) ? {} : { component: wireString(wire.component, "component") },
|
|
29097
29355
|
message: wireString(wire.message, "message")
|
|
29098
29356
|
};
|
|
29099
29357
|
} catch (failure) {
|
|
@@ -30782,7 +31040,7 @@ var Sorts = class {
|
|
|
30782
31040
|
...params
|
|
30783
31041
|
});
|
|
30784
31042
|
/**
|
|
30785
|
-
* @description `POST /api/v1/sorts/subsumption/bulk` keeps the relation's closed contract: it refuses `a ⊑·0.7 b, b ⊑·0.6 c` without `a ⊑· c`. This is the import path for such input, through the
|
|
31043
|
+
* @description `POST /api/v1/sorts/subsumption/bulk` keeps the relation's closed contract: it refuses `a ⊑·0.7 b, b ⊑·0.6 c` without `a ⊑· c`. This is the import path for such input, through compilation of the fuzzy subsumption relation: each source is exact for its pair, every degree transitivity forces beyond the one-hop reading is returned apart as `derived`, and the native partial-order check remains the verifier. The declaration is one unit, so it is admitted or refused whole: * a source naming a sort the caller cannot write is a 404, as on the single writer; * a contradiction (a source or an existing declaration below a forced degree, a degree outside `[0, 1]`, two different degrees for one pair) is a 422 naming it, and nothing is written; * a forced degree touching a sort the caller cannot write is a 422 as well: the relation is process-wide, so the closure may not write onto a sort outside the caller's ownership any more than a source may. The compilation is validated on a staging fork before recovery is armed, persisted as one batch, and mirrored into the tenant lattice every graded route reads (#113).
|
|
30786
31044
|
*
|
|
30787
31045
|
* @tags sorts
|
|
30788
31046
|
* @name CompileSubsumptions
|
|
@@ -31934,7 +32192,7 @@ var Terms = class {
|
|
|
31934
32192
|
...params
|
|
31935
32193
|
});
|
|
31936
32194
|
/**
|
|
31937
|
-
* @description Newest first. Each entry carries the state after the write and, except for version 1, the diff against the version before it — computed on read
|
|
32195
|
+
* @description Newest first. Each entry carries the state after the write and, except for version 1, the diff against the version before it — computed on read, excluding the bitemporal features. Three distinct answers, which must not be collapsed into one 404: * the term exists and has states — `200` with them; * the term exists and has none (it predates the history, or the history is off) — `200` with `history_recorded: false` and an empty list. Every term written before this release is in this case, and calling it "not found" would be false. A rule's conclusion is ALWAYS in this case (#309): it is derived, never written, so no state of it is recorded; * the term is unknown to this tenant — `404`.
|
|
31938
32196
|
*
|
|
31939
32197
|
* @tags terms
|
|
31940
32198
|
* @name ListTermVersions
|
|
@@ -32225,7 +32483,7 @@ var Inference = class {
|
|
|
32225
32483
|
...params
|
|
32226
32484
|
});
|
|
32227
32485
|
/**
|
|
32228
|
-
* @description Phase 2 v2 entry point for retraction: 1. Removes each term from
|
|
32486
|
+
* @description Phase 2 v2 entry point for retraction: 1. Removes each term from persistent and in-memory storage. 2. When `state.use_plan_engine` is on, submits a single retraction event to the per-tenant supervisor so the Backward/Forward backward chase decrements every dependent derived fact's `proof_count` (and deletes those whose count reaches zero). Symmetric to [`bulk_add_terms`]; idempotent (term ids absent from the working memory are silently skipped — same shape as [`delete_term`] returning 404, except in the bulk path the missing ids simply don't appear in `removed_term_ids`). Best-effort supervisor enqueue: a supervisor failure does NOT fail the 2xx response — the persist path has succeeded and a future bootstrap can recover any missed retraction. # Mid-batch error handling If `remove_term` fails for a term partway through the batch, the handler **stops accumulating successes**, runs cache invalidation for the prefix that did succeed, submits a single retraction event covering that prefix, and **then** surfaces the error. This keeps the supervisor and the in-memory caches in sync with the actual store state — a leaked Retract event would orphan derived facts whose only antecedent is now removed, which is a critical correctness violation. # Authorization Requires `X-Tenant-Id` header. The `term_ids` are resolved against that tenant's working memory only — cross-tenant retraction is impossible by construction (the per-tenant `HomoiconicTermService` only sees its own tenant's terms).
|
|
32229
32487
|
*
|
|
32230
32488
|
* @tags inference
|
|
32231
32489
|
* @name BulkRetractTerms
|
|
@@ -34544,6 +34802,22 @@ var Ingestion = class {
|
|
|
34544
34802
|
format: "json",
|
|
34545
34803
|
...params
|
|
34546
34804
|
});
|
|
34805
|
+
/**
|
|
34806
|
+
* @description A recording the live caption socket keeps (`/ws/audio/stream?protocol_version=2&recording=<id>`): its state, the audio held and the finals so far; once ready, the retained original and the parse-only audio result. Only the user who started it may read it. A ready or failed recording expires after the parse-only retention (`OSFKB_AUDIO_JOB_RETENTION_SECS`, a day by default).
|
|
34807
|
+
*
|
|
34808
|
+
* @tags ingestion
|
|
34809
|
+
* @name GetLiveRecording
|
|
34810
|
+
* @summary Read a live recording.
|
|
34811
|
+
* @request GET:/api/v1/audio/recordings/{id}
|
|
34812
|
+
* @secure
|
|
34813
|
+
*/
|
|
34814
|
+
getLiveRecording = (id, params = {}) => this.http.request({
|
|
34815
|
+
path: `/api/v1/audio/recordings/${id}`,
|
|
34816
|
+
method: "GET",
|
|
34817
|
+
secure: true,
|
|
34818
|
+
format: "json",
|
|
34819
|
+
...params
|
|
34820
|
+
});
|
|
34547
34821
|
/**
|
|
34548
34822
|
* @description `documents` counts the calling tenant's own ingestion documents by status; a tenant that never ingested sees all zeros (#293). Queue depth, worker figures, wait times, throughput and the LLM circuit-breaker state describe the process-wide pipeline shared by every tenant. `circuit_breaker_state` is one of `closed`, `open`, `half_open`, `unknown` (#294).
|
|
34549
34823
|
*
|
|
@@ -34722,7 +34996,7 @@ var Ingestion = class {
|
|
|
34722
34996
|
...params
|
|
34723
34997
|
});
|
|
34724
34998
|
/**
|
|
34725
|
-
* @description Crawls from `url` through the engine's web fetcher, obeying robots.txt and `<meta name="robots">`, staying inside `scope`, following at most `max_depth` link hops and requesting at most `max_pages` page URLs, with at least the reported interval between two requests to one host. Only public addresses are reachable: a URL naming — or resolving to — a loopback, private or link-local address is refused. Each page read becomes one `web_page` term carrying its provenance — `url`, `fetched_at`, `content_hash` — and its content: `title`, `headings`, `text`, `text_truncated`, `links`, `http_status`, `content_type`. Re-ingesting a URL lands on the same term: `unchanged` when the content hash matches (nothing is written), `updated` when it does not. Pages are written in crawl order. A store failure after the crawl stops the writes and answers `500` with code `web_ingest_store_failed`: `report` lists the pages stored before it (their post-write maintenance has run), `failed` names the step, the page and the cause, and `not_written` lists the pages read after it. Nothing is rolled back. Re-running the request is idempotent: a page's term id derives from its URL, so the stored pages answer `unchanged` and the rest are written.
|
|
34999
|
+
* @description Crawls from `url` through the engine's web fetcher, obeying robots.txt and `<meta name="robots">`, staying inside `scope`, following at most `max_depth` link hops and requesting at most `max_pages` page URLs, with at least the reported interval between two requests to one host. Only public addresses are reachable: a URL naming — or resolving to — a loopback, private or link-local address is refused. Each page read becomes one `web_page` term carrying its provenance — `url`, `fetched_at`, `content_hash` — and its content: `title`, `headings`, `text`, `text_truncated`, `links`, `http_status`, `content_type`. Re-ingesting a URL lands on the same term: `unchanged` when the content hash matches (nothing is written), `updated` when it does not. Pages are written in crawl order. A store failure after the crawl stops the writes and answers `500` with code `web_ingest_store_failed`: `report` lists the pages stored before it (their post-write maintenance has run), `failed` names the step, the page and the cause, and `not_written` lists the pages read after it. Nothing is rolled back. Re-running the request is idempotent: a page's term id derives from its URL, so the stored pages answer `unchanged` and the rest are written. The fetch goes through the engine's one web path ([`crate::handlers::web_effects::WebCall::ingest`], the same as the RLQL `READ PAGE` statement): the request is checked first, then the Space's boundary decides the fetch of the start page's host as `public` data, with the caller's forwarded credential. A refusal fetches nothing.
|
|
34726
35000
|
*
|
|
34727
35001
|
* @tags ingestion
|
|
34728
35002
|
* @name IngestUrl
|
|
@@ -34739,6 +35013,25 @@ var Ingestion = class {
|
|
|
34739
35013
|
format: "json",
|
|
34740
35014
|
...params
|
|
34741
35015
|
});
|
|
35016
|
+
/**
|
|
35017
|
+
* @description Reads the clip's timeline from the configured service and ingests its text with the full ontology extraction. The run commits the document, its terms, the video evidence and one passage per utterance or frame together, or none of them.
|
|
35018
|
+
*
|
|
35019
|
+
* @tags ingestion
|
|
35020
|
+
* @name IngestVideo
|
|
35021
|
+
* @summary Ingest a short video
|
|
35022
|
+
* @request POST:/api/v1/ingest/video
|
|
35023
|
+
* @secure
|
|
35024
|
+
*/
|
|
35025
|
+
ingestVideo = (data, query, params = {}) => this.http.request({
|
|
35026
|
+
path: `/api/v1/ingest/video`,
|
|
35027
|
+
method: "POST",
|
|
35028
|
+
query,
|
|
35029
|
+
body: data,
|
|
35030
|
+
secure: true,
|
|
35031
|
+
type: "application/json",
|
|
35032
|
+
format: "json",
|
|
35033
|
+
...params
|
|
35034
|
+
});
|
|
34742
35035
|
/**
|
|
34743
35036
|
* @description Returns paginated list of chunk failures in the dead-letter queue.
|
|
34744
35037
|
*
|
|
@@ -34997,6 +35290,22 @@ var Ingestion = class {
|
|
|
34997
35290
|
format: "json",
|
|
34998
35291
|
...params
|
|
34999
35292
|
});
|
|
35293
|
+
/**
|
|
35294
|
+
* @description Finalizes again a `failed` recording from the audio it kept. A ready recording answers 200 as it stands; one still recording or finalizing answers 409.
|
|
35295
|
+
*
|
|
35296
|
+
* @tags ingestion
|
|
35297
|
+
* @name RetryLiveRecording
|
|
35298
|
+
* @summary Finalize again a recording whose finalizing failed.
|
|
35299
|
+
* @request POST:/api/v1/audio/recordings/{id}/retry
|
|
35300
|
+
* @secure
|
|
35301
|
+
*/
|
|
35302
|
+
retryLiveRecording = (id, params = {}) => this.http.request({
|
|
35303
|
+
path: `/api/v1/audio/recordings/${id}/retry`,
|
|
35304
|
+
method: "POST",
|
|
35305
|
+
secure: true,
|
|
35306
|
+
format: "json",
|
|
35307
|
+
...params
|
|
35308
|
+
});
|
|
35000
35309
|
/**
|
|
35001
35310
|
* @description POST /api/v1/ingest/sessions Creates a resumable ingestion session for tracking batch document ingestion. Returns a session ID that can be used to track progress and resume interrupted ingestion. # Headers - `X-Tenant-Id`: Tenant ID for multi-tenancy isolation (required) # Request Body - `document_ids`: List of document IDs that will be ingested in this session # Response - Session details including ID, status, and document count
|
|
35002
35311
|
*
|
|
@@ -35015,6 +35324,22 @@ var Ingestion = class {
|
|
|
35015
35324
|
format: "json",
|
|
35016
35325
|
...params
|
|
35017
35326
|
});
|
|
35327
|
+
/**
|
|
35328
|
+
* @description Stops a recording and finalizes it: the audio is sealed and retained as the meeting's original, then the parse-only audio pipeline writes the transcript, summary and actions. Idempotent: a recording already finalizing answers 202 (and finalizing starts again if its worker stopped), a ready or failed one answers 200. Audio a live socket had not yet written (at most about five seconds) is not kept.
|
|
35329
|
+
*
|
|
35330
|
+
* @tags ingestion
|
|
35331
|
+
* @name StopLiveRecording
|
|
35332
|
+
* @summary Stop a live recording whose socket is gone, and finalize it.
|
|
35333
|
+
* @request POST:/api/v1/audio/recordings/{id}/stop
|
|
35334
|
+
* @secure
|
|
35335
|
+
*/
|
|
35336
|
+
stopLiveRecording = (id, params = {}) => this.http.request({
|
|
35337
|
+
path: `/api/v1/audio/recordings/${id}/stop`,
|
|
35338
|
+
method: "POST",
|
|
35339
|
+
secure: true,
|
|
35340
|
+
format: "json",
|
|
35341
|
+
...params
|
|
35342
|
+
});
|
|
35018
35343
|
/**
|
|
35019
35344
|
* No description
|
|
35020
35345
|
*
|
|
@@ -35079,11 +35404,11 @@ var Ingestion = class {
|
|
|
35079
35404
|
...params
|
|
35080
35405
|
});
|
|
35081
35406
|
/**
|
|
35082
|
-
* @description The search goes through the same `WebSearchRouter` the `web_search` agent action
|
|
35407
|
+
* @description The search goes through the same `WebSearchRouter` the `web_search` agent action and the Ask turn's web leg use: crawl-bee through the gateway's relay, with the providers, their failover order and their health marks `GET /api/v1/web/capabilities` reports. It reads the Space's `web_search` setting first ([`web_search_reach`]), then asks the Space's boundary for the call (a query made of the person's own words is `internal`), and sends the Space's sites with it. The results are candidates for `POST /api/v1/ingest/url`; the search itself writes nothing for the tenant, so the route is wrapped in [`crate::middleware::mark_tenant_untouched`] and every answer — the body rejections included — carries the marker (#347, #385). A deployment that cannot search says so with a typed code — `503 web_search_not_configured` or `502 web_search_providers_failed` — and never with an empty list, which means the search ran and found nothing.
|
|
35083
35408
|
*
|
|
35084
35409
|
* @tags ingestion
|
|
35085
35410
|
* @name WebSearch
|
|
35086
|
-
* @summary Search the web through the
|
|
35411
|
+
* @summary Search the web through the box's search (#413, gate 1 WP-0).
|
|
35087
35412
|
* @request POST:/api/v1/web/search
|
|
35088
35413
|
* @secure
|
|
35089
35414
|
*/
|
|
@@ -37582,7 +37907,7 @@ var Visualization = class {
|
|
|
37582
37907
|
...params
|
|
37583
37908
|
});
|
|
37584
37909
|
/**
|
|
37585
|
-
* @description Without `term_id`, one constraint node per bound constraint DECLARED on a sort (`CHECK ON …`, or `bound_constraints` on `POST /api/v1/sorts`), with sort-level feature paths as its variables. With `term_id`, one node per constraint GOVERNING that term (own and inherited), each evaluated by the evaluator every write surface runs and carrying its `status`. In both, every dependency the reactive facade's tracker holds is added, and `cycles` are closed walks over the response graph's own node and edge ids. The
|
|
37910
|
+
* @description Without `term_id`, one constraint node per bound constraint DECLARED on a sort (`CHECK ON …`, or `bound_constraints` on `POST /api/v1/sorts`), with sort-level feature paths as its variables. With `term_id`, one node per constraint GOVERNING that term (own and inherited), each evaluated by the evaluator every write surface runs and carrying its `status`. In both, every dependency the reactive facade's tracker holds is added, and `cycles` are closed walks over the response graph's own node and edge ids. The `dot_output` field renders the same graph. Before #341 this route answered one `Constraint System` placeholder node, never filled `fd_domains`, and rendered DOT from an empty graph.
|
|
37586
37911
|
*
|
|
37587
37912
|
* @tags visualization
|
|
37588
37913
|
* @name GetConstraintGraph
|
|
@@ -39561,6 +39886,7 @@ function OsfqlBindingsFromApiToFront(value) {
|
|
|
39561
39886
|
}
|
|
39562
39887
|
function OsfqlRequestFromFrontToApi(model) {
|
|
39563
39888
|
const dto = { query: model.query };
|
|
39889
|
+
if (model.confirmExternal !== void 0) dto.confirm_external = model.confirmExternal;
|
|
39564
39890
|
if (model.reactive !== void 0) dto.reactive = model.reactive;
|
|
39565
39891
|
if (model.atomic !== void 0) dto.atomic = model.atomic;
|
|
39566
39892
|
if (model.maxRows !== void 0) dto.max_rows = model.maxRows;
|
|
@@ -39917,6 +40243,14 @@ function OsfqlRefusalFromApiToFront(value) {
|
|
|
39917
40243
|
parsedRepairs.push(repair);
|
|
39918
40244
|
}
|
|
39919
40245
|
const refusal = { code, sort, candidates, repairs: parsedRepairs };
|
|
40246
|
+
const denialCode = value["denial_code"];
|
|
40247
|
+
if (typeof denialCode === "string") {
|
|
40248
|
+
const known = GOVERNANCE_REFUSAL_CODES.find((member) => member === denialCode);
|
|
40249
|
+
if (known === void 0) return void 0;
|
|
40250
|
+
refusal.denialCode = known;
|
|
40251
|
+
} else if (denialCode !== void 0 && denialCode !== null) {
|
|
40252
|
+
return void 0;
|
|
40253
|
+
}
|
|
39920
40254
|
if (typeof role === "string") {
|
|
39921
40255
|
refusal.role = role;
|
|
39922
40256
|
} else if (role !== void 0 && role !== null) {
|
|
@@ -41754,7 +42088,7 @@ var Reasoning = class {
|
|
|
41754
42088
|
...params
|
|
41755
42089
|
});
|
|
41756
42090
|
/**
|
|
41757
|
-
* @description POST /api/v1/reasoning/entailment Answers `facts ⊨ antecedent ⇒ consequent`, hierarchy-aware and graded. A clause holds in the fact base to the degree that some fact *witnesses* it — that is, to the degree the clause subsumes a fact — so a `sparrow` fact establishes the clause `animal` without an `animal` fact being supplied. The consequent is additionally established when it subsumes the antecedent it would follow from.
|
|
42091
|
+
* @description POST /api/v1/reasoning/entailment Answers `facts ⊨ antecedent ⇒ consequent`, hierarchy-aware and graded. A clause holds in the fact base to the degree that some fact *witnesses* it — that is, to the degree the clause subsumes a fact — so a `sparrow` fact establishes the clause `animal` without an `animal` fact being supplied. The consequent is additionally established when it subsumes the antecedent it would follow from. `entails` is the crisp reading of `degree`; `degree`, `antecedent_degree` and `consequent_degree` are computed from the sort lattice (crisply, and through explicit fuzzy `⊑·` relations and approved sort similarity), never cast from the boolean.
|
|
41758
42092
|
*
|
|
41759
42093
|
* @tags reasoning
|
|
41760
42094
|
* @name Entailment
|
|
@@ -45291,7 +45625,7 @@ var Osfql = class {
|
|
|
45291
45625
|
...params
|
|
45292
45626
|
});
|
|
45293
45627
|
/**
|
|
45294
|
-
* @description
|
|
45628
|
+
* @description Executes an RLQL program against the caller's tenant-isolated knowledge base. Supported statements include MATCH, INSERT, RETRACT, DERIVE, UNIFY, AWAIT, COUNTERFACTUAL and CAUSES. `SEARCH WEB` and `READ PAGE` use the Space's `web_search` setting and check its outbound policy against the call's data class. The relay reads permitted pages and the engine stores each as a `web_page` owned by the caller. Ordinary statements between two web operations form one atomic program. A diagnostic reports the term IDs each operation bound (`effect_bound`) or its refusal code. A refused operation binds no terms. # Examples ```json { "query": "INSERT person(name: \"Alice\", age: 30);" } ``` ```json { "query": "MATCH person(name: ?N, age: ?A) WHERE ?A > 18;" } ```
|
|
45295
45629
|
*
|
|
45296
45630
|
* @tags osfql
|
|
45297
45631
|
* @name ExecuteOsfql
|
|
@@ -45750,6 +46084,80 @@ var Text = class {
|
|
|
45750
46084
|
});
|
|
45751
46085
|
};
|
|
45752
46086
|
|
|
46087
|
+
// src/api-spec/generated/Agent.ts
|
|
46088
|
+
var Agent = class {
|
|
46089
|
+
http;
|
|
46090
|
+
constructor(http) {
|
|
46091
|
+
this.http = http;
|
|
46092
|
+
}
|
|
46093
|
+
/**
|
|
46094
|
+
* @description Returns 400 for an empty task, 503 `llm_unconfigured` when no text model is configured, 502 `llm_provider_failed` when it fails, and 422 when the model does not return a parseable step. Visual grounding is best-effort: a missing screenshot or an unconfigured vision port simply falls back to the text-only DOM tree.
|
|
46095
|
+
*
|
|
46096
|
+
* @tags agent
|
|
46097
|
+
* @name AgentBrowserStep
|
|
46098
|
+
* @summary Decide the next browser action(s) for the current page state.
|
|
46099
|
+
* @request POST:/api/v1/agent/browser-step
|
|
46100
|
+
* @secure
|
|
46101
|
+
*/
|
|
46102
|
+
agentBrowserStep = (data, params = {}) => this.http.request({
|
|
46103
|
+
path: `/api/v1/agent/browser-step`,
|
|
46104
|
+
method: "POST",
|
|
46105
|
+
body: data,
|
|
46106
|
+
secure: true,
|
|
46107
|
+
type: "application/json",
|
|
46108
|
+
format: "json",
|
|
46109
|
+
...params
|
|
46110
|
+
});
|
|
46111
|
+
/**
|
|
46112
|
+
* No description
|
|
46113
|
+
*
|
|
46114
|
+
* @tags agent
|
|
46115
|
+
* @name BrowserAgentRun
|
|
46116
|
+
* @request POST:/api/v1/agent/browser-runs/{run_id}
|
|
46117
|
+
* @secure
|
|
46118
|
+
*/
|
|
46119
|
+
browserAgentRun = (runId, data, params = {}) => this.http.request({
|
|
46120
|
+
path: `/api/v1/agent/browser-runs/${runId}`,
|
|
46121
|
+
method: "POST",
|
|
46122
|
+
body: data,
|
|
46123
|
+
secure: true,
|
|
46124
|
+
type: "application/json",
|
|
46125
|
+
format: "json",
|
|
46126
|
+
...params
|
|
46127
|
+
});
|
|
46128
|
+
/**
|
|
46129
|
+
* No description
|
|
46130
|
+
*
|
|
46131
|
+
* @tags agent
|
|
46132
|
+
* @name ListBrowserAgentRuns
|
|
46133
|
+
* @request GET:/api/v1/agent/browser-runs
|
|
46134
|
+
* @secure
|
|
46135
|
+
*/
|
|
46136
|
+
listBrowserAgentRuns = (params = {}) => this.http.request({
|
|
46137
|
+
path: `/api/v1/agent/browser-runs`,
|
|
46138
|
+
method: "GET",
|
|
46139
|
+
secure: true,
|
|
46140
|
+
format: "json",
|
|
46141
|
+
...params
|
|
46142
|
+
});
|
|
46143
|
+
/**
|
|
46144
|
+
* @description Deterministic and side-effect free: the caller declares the plan and what each tool returns, and the run happens in a scratch term store. The tenant's knowledge base is read (for its sort lattice) but never written.
|
|
46145
|
+
*
|
|
46146
|
+
* @tags agent
|
|
46147
|
+
* @name RunAgentLoop
|
|
46148
|
+
* @summary `POST /api/v1/agent/loop/run` — plan → verify → dispatch → certify against the tenant's declared sort lattice.
|
|
46149
|
+
* @request POST:/api/v1/agent/loop/run
|
|
46150
|
+
*/
|
|
46151
|
+
runAgentLoop = (data, params = {}) => this.http.request({
|
|
46152
|
+
path: `/api/v1/agent/loop/run`,
|
|
46153
|
+
method: "POST",
|
|
46154
|
+
body: data,
|
|
46155
|
+
type: "application/json",
|
|
46156
|
+
format: "json",
|
|
46157
|
+
...params
|
|
46158
|
+
});
|
|
46159
|
+
};
|
|
46160
|
+
|
|
45753
46161
|
// src/api-spec/generated/Compliance.ts
|
|
45754
46162
|
var Compliance = class {
|
|
45755
46163
|
http;
|
|
@@ -46330,7 +46738,7 @@ var Snapshots = class {
|
|
|
46330
46738
|
...params
|
|
46331
46739
|
});
|
|
46332
46740
|
/**
|
|
46333
|
-
* @description Accepts a reasoninglayer-snapshot JSON envelope (
|
|
46741
|
+
* @description Accepts a reasoninglayer-snapshot JSON envelope (including envelopes exported by earlier releases), validates the structure, and stores it as a new snapshot. Use ?name=override to rename. Reserved to the gateway's provisioning identity (an authorization context with `reservedExempt`): any other caller is refused with `403 provisioning_identity_required`.
|
|
46334
46742
|
*
|
|
46335
46743
|
* @tags snapshots
|
|
46336
46744
|
* @name ImportSnapshot
|
|
@@ -46662,7 +47070,7 @@ var Operations = class {
|
|
|
46662
47070
|
this.http = http;
|
|
46663
47071
|
}
|
|
46664
47072
|
/**
|
|
46665
|
-
* @description `POST /api/v1/operations/anti-unify` Accepts two Ψ-term ids and returns the LGG term computed by the engine
|
|
47073
|
+
* @description `POST /api/v1/operations/anti-unify` Accepts two Ψ-term ids and returns the LGG term computed by the engine. The LGG is persisted in the tenant's term store; the response carries both its id and an enriched view (sort name + display name + referenced-term summaries).
|
|
46666
47074
|
*
|
|
46667
47075
|
* @tags operations
|
|
46668
47076
|
* @name AntiUnify
|
|
@@ -47214,7 +47622,7 @@ var Demo = class {
|
|
|
47214
47622
|
this.http = http;
|
|
47215
47623
|
}
|
|
47216
47624
|
/**
|
|
47217
|
-
* @description Returns `404` when the SUMO files cannot be read
|
|
47625
|
+
* @description The seed is a client write of the request's caller, judged as `POST /api/v1/ingest/kif` with `persist: true` judges its import (#1227): it is reachable on every deployment, under the caller's own authority, not an engine seeding path. Returns `404 demo_corpus_unavailable` when the deployment's SUMO files cannot be read (the answer names no server path; the engine log does, #1229), `400` when the assembled source fails to import, the coded refusal of the one write-denial mapping when a term the seed writes is refused, and `200` with the tenant's sort count + form count on success.
|
|
47218
47626
|
*
|
|
47219
47627
|
* @tags demo
|
|
47220
47628
|
* @name DemoSeed
|
|
@@ -48060,6 +48468,22 @@ var Boundary = class {
|
|
|
48060
48468
|
format: "json",
|
|
48061
48469
|
...params
|
|
48062
48470
|
});
|
|
48471
|
+
/**
|
|
48472
|
+
* No description
|
|
48473
|
+
*
|
|
48474
|
+
* @tags boundary
|
|
48475
|
+
* @name PostDecide
|
|
48476
|
+
* @summary `POST /api/v1/boundary/decide` — may this outbound call leave the box.
|
|
48477
|
+
* @request POST:/api/v1/boundary/decide
|
|
48478
|
+
*/
|
|
48479
|
+
postDecide = (data, params = {}) => this.http.request({
|
|
48480
|
+
path: `/api/v1/boundary/decide`,
|
|
48481
|
+
method: "POST",
|
|
48482
|
+
body: data,
|
|
48483
|
+
type: "application/json",
|
|
48484
|
+
format: "json",
|
|
48485
|
+
...params
|
|
48486
|
+
});
|
|
48063
48487
|
/**
|
|
48064
48488
|
* No description
|
|
48065
48489
|
*
|
|
@@ -49648,6 +50072,24 @@ var Documents = class {
|
|
|
49648
50072
|
type: "application/json",
|
|
49649
50073
|
...params
|
|
49650
50074
|
});
|
|
50075
|
+
/**
|
|
50076
|
+
* @description One search over what the box holds: OSFQL hybrid search (meaning and exact words) over document passages, grouped by kind (documents, mails, conversations, meetings, synced files), and over the record sorts the request names. Rights are the caller's read view; a parent document is shown only when the caller may read it. Scores compare only inside a group. Lists items and states nothing; it is not the answer door.
|
|
50077
|
+
*
|
|
50078
|
+
* @tags documents
|
|
50079
|
+
* @name Find
|
|
50080
|
+
* @summary Find what the caller may open, grouped by kind
|
|
50081
|
+
* @request POST:/api/v1/find
|
|
50082
|
+
* @secure
|
|
50083
|
+
*/
|
|
50084
|
+
find = (data, params = {}) => this.http.request({
|
|
50085
|
+
path: `/api/v1/find`,
|
|
50086
|
+
method: "POST",
|
|
50087
|
+
body: data,
|
|
50088
|
+
secure: true,
|
|
50089
|
+
type: "application/json",
|
|
50090
|
+
format: "json",
|
|
50091
|
+
...params
|
|
50092
|
+
});
|
|
49651
50093
|
/**
|
|
49652
50094
|
* No description
|
|
49653
50095
|
*
|
|
@@ -49753,7 +50195,7 @@ var Proof = class {
|
|
|
49753
50195
|
this.http = http;
|
|
49754
50196
|
}
|
|
49755
50197
|
/**
|
|
49756
|
-
* @description Runs the native CDCL solver with DRAT logging; on UNSAT the DRAT trace is turned into a resolution
|
|
50198
|
+
* @description Runs the native CDCL solver with DRAT logging; on UNSAT the DRAT trace is turned into a resolution proof certificate and rendered in the requested format. No tenant context is required — the solver is stateless and in-process.
|
|
49757
50199
|
*
|
|
49758
50200
|
* @tags proof
|
|
49759
50201
|
* @name ExportProof
|
|
@@ -50274,6 +50716,24 @@ var DocumentCheck = class {
|
|
|
50274
50716
|
format: "json",
|
|
50275
50717
|
...params
|
|
50276
50718
|
});
|
|
50719
|
+
/**
|
|
50720
|
+
* No description
|
|
50721
|
+
*
|
|
50722
|
+
* @tags document-check
|
|
50723
|
+
* @name DraftClausePolicy
|
|
50724
|
+
* @summary Compile an interpretation of an existing document clause without writing any facts or rules. The reviewer can use normal RLQL authorization to publish.
|
|
50725
|
+
* @request POST:/api/v1/documents/{document_id}/clauses/{clause_id}/policy-draft
|
|
50726
|
+
* @secure
|
|
50727
|
+
*/
|
|
50728
|
+
draftClausePolicy = (documentId, clauseId, data, params = {}) => this.http.request({
|
|
50729
|
+
path: `/api/v1/documents/${documentId}/clauses/${clauseId}/policy-draft`,
|
|
50730
|
+
method: "POST",
|
|
50731
|
+
body: data,
|
|
50732
|
+
secure: true,
|
|
50733
|
+
type: "application/json",
|
|
50734
|
+
format: "json",
|
|
50735
|
+
...params
|
|
50736
|
+
});
|
|
50277
50737
|
};
|
|
50278
50738
|
|
|
50279
50739
|
// src/api-spec/generated/Corpus.ts
|
|
@@ -51319,7 +51779,7 @@ var Research = class {
|
|
|
51319
51779
|
this.http = http;
|
|
51320
51780
|
}
|
|
51321
51781
|
/**
|
|
51322
|
-
*
|
|
51782
|
+
* @description The session's knowledge base is not written into the caller's tenant: it has a tenant of its own, named in the answer as `knowledge_base_tenant_id` (#1201). Every run, completion and session-scoped ingest writes there. That tenant comes into being with the first such write and is not removed when the session is deleted; a client that reaps the tenants it made reaps it too.
|
|
51323
51783
|
*
|
|
51324
51784
|
* @tags research
|
|
51325
51785
|
* @name ResearchCreateSession
|
|
@@ -51337,7 +51797,7 @@ var Research = class {
|
|
|
51337
51797
|
...params
|
|
51338
51798
|
});
|
|
51339
51799
|
/**
|
|
51340
|
-
*
|
|
51800
|
+
* @description Deletes the session record only. The session's knowledge base tenant (`knowledge_base_tenant_id`) and the corpus in it stay; deleting a tenant is the provisioning identity's act (#1201).
|
|
51341
51801
|
*
|
|
51342
51802
|
* @tags research
|
|
51343
51803
|
* @name ResearchDeleteSession
|
|
@@ -51432,7 +51892,7 @@ var Research = class {
|
|
|
51432
51892
|
...params
|
|
51433
51893
|
});
|
|
51434
51894
|
/**
|
|
51435
|
-
* @description With a `session_id`, a successful ingest is RECORDED on that session — see [`record_ingest_on_session`] — so the paper appears in `GET /sessions/{id}`'s `papers` and every term the ingestion touched resolves back to it. Without one, the paper is ingested
|
|
51895
|
+
* @description With a `session_id`, a successful ingest is RECORDED on that session — see [`record_ingest_on_session`] — so the paper appears in `GET /sessions/{id}`'s `papers` and every term the ingestion touched resolves back to it. Without one, the paper is ingested into the caller's own tenant (`X-Tenant-Id`) and nothing is recorded: there is no session to attribute it to, and picking one would be a guess. The markdown itself is `paper_to_markdown`'s — the same function a cycle ingests through — over the same `fetch_full_text` lane, gated on the same `full_text_ingestion` switch. A paper ingested by hand is therefore the same document in the KB as one the pipeline found, which is the only way the two can be reasoned over together. **Which knowledge base it lands in follows the session.** With a `session_id` the paper is ingested through that session's own client (the `SessionScope` tenanted by the session id) — the KB `/run` and `/complete` drive and the one the session's own discovery reads. Without a `session_id` the paper is ingested into the caller's own tenant (`X-Tenant-Id`), not for any session, and nothing is recorded either (#1202). It is never written into the deployment's configured tenant, which every caller would share. This route used to ingest into the configured tenant unconditionally. The recorded `PaperTermLink` then named term ids in a KB the session never searches, so it resolved nothing — attribution that exists on the session row and nowhere the reasoning can reach.
|
|
51436
51896
|
*
|
|
51437
51897
|
* @tags research
|
|
51438
51898
|
* @name ResearchIngestPaper
|
|
@@ -51532,7 +51992,7 @@ var Research = class {
|
|
|
51532
51992
|
...params
|
|
51533
51993
|
});
|
|
51534
51994
|
/**
|
|
51535
|
-
*
|
|
51995
|
+
* @description With a `session_id` the claim is looked up and assessed in that session's own knowledge base tenant; without one, in the caller's own tenant (`X-Tenant-Id`), never in the deployment's configured tenant, which every caller would share (#1202).
|
|
51536
51996
|
*
|
|
51537
51997
|
* @tags research
|
|
51538
51998
|
* @name ResearchVerifyClaim
|
|
@@ -56083,6 +56543,11 @@ var TermsClient = class {
|
|
|
56083
56543
|
* take as `ifMatch` from the rule routes ({@link AddRuleResponse.etag},
|
|
56084
56544
|
* {@link RuleEntryDto.etag}).
|
|
56085
56545
|
*
|
|
56546
|
+
* The term is the caller's view of it (reasoninglayer#1221): a feature
|
|
56547
|
+
* that holds a term the caller's Read grant does not show is left out, and
|
|
56548
|
+
* `etag` is the tag of that view. Send it back as `ifMatch`; a `412` names
|
|
56549
|
+
* the current tag of the caller's view.
|
|
56550
|
+
*
|
|
56086
56551
|
* @example
|
|
56087
56552
|
* ```typescript
|
|
56088
56553
|
* const asIssued = await client.terms.getTerm(orderId, { asOf: invoicedAt });
|
|
@@ -56244,7 +56709,7 @@ var TermsClient = class {
|
|
|
56244
56709
|
* @throws {@link PreconditionFailedError} 412 when `ifMatch` is stale;
|
|
56245
56710
|
* `currentEtag` carries the tag the engine holds now.
|
|
56246
56711
|
* @throws {@link PreconditionRequiredError} 428 when `ifMatch` is omitted
|
|
56247
|
-
* and the
|
|
56712
|
+
* and the deployment requires conditional writes.
|
|
56248
56713
|
* @throws {@link ApiError} 404 when the term does not exist; 422 when the
|
|
56249
56714
|
* patched term violates its sort's declarations (a scalar literal in a
|
|
56250
56715
|
* feature whose declared range is an entity sort included); 409 when a bound
|
|
@@ -56271,7 +56736,7 @@ var TermsClient = class {
|
|
|
56271
56736
|
* last-writer-wins, and two editors of one term silently overwrite each
|
|
56272
56737
|
* other. Read the term with {@link TermsClient.getTerm}, keep its `etag`,
|
|
56273
56738
|
* and send it back as `ifMatch`: a write that lost the race answers 412
|
|
56274
|
-
* instead of overwriting.
|
|
56739
|
+
* instead of overwriting. A deployment that requires conditional writes
|
|
56275
56740
|
* refuses every term and rule mutation that carries no `ifMatch` (428).
|
|
56276
56741
|
*
|
|
56277
56742
|
* @example
|
|
@@ -56325,7 +56790,7 @@ var TermsClient = class {
|
|
|
56325
56790
|
* rule instead; `ruleIds` names it).
|
|
56326
56791
|
* @throws {@link PreconditionFailedError} 412 when `ifMatch` is stale.
|
|
56327
56792
|
* @throws {@link PreconditionRequiredError} 428 when `ifMatch` is omitted
|
|
56328
|
-
* and the
|
|
56793
|
+
* and the deployment requires conditional writes.
|
|
56329
56794
|
* @throws {@link ConstraintViolationError} 409 `term_named_by_rules` under
|
|
56330
56795
|
* every disposition when a rule names the term, or when a cascade's closure
|
|
56331
56796
|
* reaches a rule term (withdraw the rule first); 409 `term_has_referrers`
|
|
@@ -56462,7 +56927,11 @@ var TermsClient = class {
|
|
|
56462
56927
|
* "feature":"price","message":"Constraint violation: …"}]}`. With
|
|
56463
56928
|
* `partial: true` and BOTH rows bad, the same `422`:
|
|
56464
56929
|
* `"2 of 2 entries were refused; the whole batch was refused and nothing
|
|
56465
|
-
* was written"`.
|
|
56930
|
+
* was written"`. A row the write guard refused carries its closed
|
|
56931
|
+
* `code` (`BulkRowRefusal.code`): `reference_term_unknown` for a
|
|
56932
|
+
* reference to a term that does not exist or that the caller's Read
|
|
56933
|
+
* grant does not show (reasoninglayer#1212), or the write denial a
|
|
56934
|
+
* single-term write answers.
|
|
56466
56935
|
*
|
|
56467
56936
|
* **`dryRun` runs every check and writes nothing**, and it answers in the
|
|
56468
56937
|
* same two shapes. A clean dry run is `200` and reports NO `termIds` —
|
|
@@ -56505,7 +56974,7 @@ var TermsClient = class {
|
|
|
56505
56974
|
features: convertFeatures(t.features)
|
|
56506
56975
|
}))
|
|
56507
56976
|
});
|
|
56508
|
-
const response = await this.api.bulkAddTerms(wireRequest, toRequestParams(requestOptions));
|
|
56977
|
+
const response = await this.api.bulkAddTerms(wireRequest, toRequestParams(requestOptions)).catch(rethrowBulkRowCodes);
|
|
56509
56978
|
return decodeResponse(response, BulkAddTermsResponseFromApiToFront);
|
|
56510
56979
|
}
|
|
56511
56980
|
/**
|
|
@@ -57440,7 +57909,7 @@ var InferenceClient = class {
|
|
|
57440
57909
|
* `derivations` with `ruleRefusalOf(error)`.
|
|
57441
57910
|
* @throws {@link PreconditionFailedError} 412 when `ifMatch` is stale.
|
|
57442
57911
|
* @throws {@link PreconditionRequiredError} 428 when `ifMatch` is omitted
|
|
57443
|
-
* and the
|
|
57912
|
+
* and the deployment requires conditional writes.
|
|
57444
57913
|
*
|
|
57445
57914
|
* @remarks
|
|
57446
57915
|
* A rule is not a row. Withdrawing one deletes its conclusion AND the
|
|
@@ -57502,7 +57971,7 @@ var InferenceClient = class {
|
|
|
57502
57971
|
* `ruleRefusalOf(error)`.
|
|
57503
57972
|
* @throws {@link PreconditionFailedError} 412 when `ifMatch` is stale.
|
|
57504
57973
|
* @throws {@link PreconditionRequiredError} 428 when `ifMatch` is omitted
|
|
57505
|
-
* and the
|
|
57974
|
+
* and the deployment requires conditional writes.
|
|
57506
57975
|
* @throws {@link ValidationError} before the request is sent, when a term
|
|
57507
57976
|
* cannot be encoded, or `antecedents` is not an array — `field` names it
|
|
57508
57977
|
* (`term`, `antecedents`, `antecedents[i]`).
|
|
@@ -57639,7 +58108,7 @@ var InferenceClient = class {
|
|
|
57639
58108
|
*
|
|
57640
58109
|
* `timeoutMs` is a server-side deadline in milliseconds, checked at every
|
|
57641
58110
|
* fixpoint boundary and every rule application. Omitted means the engine's own
|
|
57642
|
-
*
|
|
58111
|
+
* time limit (300 s by default); `0` opts out entirely.
|
|
57643
58112
|
* The route answers `504` when the deadline passes, and the body says whether
|
|
57644
58113
|
* a `keepDerived` run kept the partial derivation it had reached. A
|
|
57645
58114
|
* deadline-cut `keepDerived: false` run (`200` or `504`) leaves nothing
|
|
@@ -58432,6 +58901,9 @@ function osfqlRowFromApiToFront(row) {
|
|
|
58432
58901
|
function ConversationMessageRequestFromFrontToApi(model) {
|
|
58433
58902
|
return {
|
|
58434
58903
|
source_scope: model.sourceScope,
|
|
58904
|
+
search_web: model.searchWeb,
|
|
58905
|
+
confirm_external: model.confirmExternal,
|
|
58906
|
+
project_id: model.projectId,
|
|
58435
58907
|
follow_up_to: model.followUpTo,
|
|
58436
58908
|
resume_answer: model.resumeAnswer,
|
|
58437
58909
|
clarify_after_repeats: model.clarifyAfterRepeats,
|
|
@@ -58641,6 +59113,15 @@ function MatchedEntityDtoFromApiToFront(dto) {
|
|
|
58641
59113
|
}
|
|
58642
59114
|
function ReasoningStageDtoFromApiToFront(dto) {
|
|
58643
59115
|
return {
|
|
59116
|
+
...dto.blocked_sites === void 0 ? {} : { blockedSites: dto.blocked_sites },
|
|
59117
|
+
...dto.elapsed_ms === void 0 ? {} : { elapsedMs: dto.elapsed_ms },
|
|
59118
|
+
...dto.extracted === void 0 ? {} : { extracted: dto.extracted },
|
|
59119
|
+
...dto.follow_up_of === void 0 ? {} : { followUpOf: dto.follow_up_of },
|
|
59120
|
+
...dto.outcome === void 0 ? {} : { outcome: dto.outcome },
|
|
59121
|
+
...dto.read === void 0 ? {} : { read: dto.read },
|
|
59122
|
+
...dto.reading_deadline === void 0 ? {} : { readingDeadline: dto.reading_deadline },
|
|
59123
|
+
...dto.reason === void 0 ? {} : { reason: dto.reason },
|
|
59124
|
+
...dto.searched === void 0 ? {} : { searched: dto.searched },
|
|
58644
59125
|
name: dto.name,
|
|
58645
59126
|
order: dto.order,
|
|
58646
59127
|
kind: dto.kind,
|
|
@@ -58661,6 +59142,7 @@ function ReasoningTraceDtoFromApiToFront(dto) {
|
|
|
58661
59142
|
}
|
|
58662
59143
|
function AbstentionFromApiToFront(dto) {
|
|
58663
59144
|
const out = { reason: dto.reason };
|
|
59145
|
+
if (dto.cause != null) out.cause = dto.cause;
|
|
58664
59146
|
if (dto.gate_code != null) out.gateCode = dto.gate_code;
|
|
58665
59147
|
if (dto.osfql_tried != null) out.osfqlTried = dto.osfql_tried;
|
|
58666
59148
|
if (dto.answerability != null) out.answerability = dto.answerability;
|
|
@@ -58677,6 +59159,8 @@ function ClaimProvenanceFromApiToFront(dto) {
|
|
|
58677
59159
|
if (dto.passage_id != null) out.passageId = dto.passage_id;
|
|
58678
59160
|
if (dto.section != null) out.section = dto.section;
|
|
58679
59161
|
if (dto.page != null) out.page = dto.page;
|
|
59162
|
+
if (dto.media_start_ms != null) out.mediaStartMs = dto.media_start_ms;
|
|
59163
|
+
if (dto.media_end_ms != null) out.mediaEndMs = dto.media_end_ms;
|
|
58680
59164
|
return out;
|
|
58681
59165
|
}
|
|
58682
59166
|
function ClaimStatedValueFromApiToFront(dto) {
|
|
@@ -58723,6 +59207,10 @@ function answerContractFromApiToFront(dto) {
|
|
|
58723
59207
|
return {
|
|
58724
59208
|
...dto.answer_state != null ? { answerState: dto.answer_state } : {},
|
|
58725
59209
|
...dto.abstention != null ? { abstention: AbstentionFromApiToFront(dto.abstention) } : {},
|
|
59210
|
+
...dto.to_verify === void 0 ? {} : { toVerify: dto.to_verify.map(ToVerifyPointFromApiToFront) },
|
|
59211
|
+
...dto.web_sources === void 0 ? {} : { webSources: dto.web_sources.map(WebSourceFromApiToFront) },
|
|
59212
|
+
...dto.unconfirmed === void 0 ? {} : { unconfirmed: dto.unconfirmed.map(UnconfirmedRecordFromApiToFront) },
|
|
59213
|
+
...dto.unread_pages === void 0 ? {} : { unreadPages: dto.unread_pages.map(UnreadPagesFromApiToFront) },
|
|
58726
59214
|
claims: (dto.claims ?? []).map(VerifiedClaimFromApiToFront),
|
|
58727
59215
|
strippedClaims: (dto.stripped_claims ?? []).map(StrippedClaimFromApiToFront),
|
|
58728
59216
|
nextQuestions: (dto.next_questions ?? []).map((q) => ({
|
|
@@ -58817,6 +59305,20 @@ function FrameAmbiguityFromApiToFront(dto) {
|
|
|
58817
59305
|
function isJsonObject(value) {
|
|
58818
59306
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
58819
59307
|
}
|
|
59308
|
+
function isVerifiedClaimDto(value) {
|
|
59309
|
+
const nullableString2 = (item) => item == null || typeof item === "string";
|
|
59310
|
+
if (!isJsonObject(value)) return false;
|
|
59311
|
+
const { span, provenance, source_term_ids, stated, absence } = value;
|
|
59312
|
+
return typeof value.text === "string" && typeof value.verdict === "string" && nullableString2(value.certificate_id) && (value.wording === void 0 || value.wording === "engine" || value.wording === "model") && Array.isArray(span) && span.length === 2 && span.every(Number.isSafeInteger) && Array.isArray(source_term_ids) && source_term_ids.every((id) => typeof id === "string") && Array.isArray(provenance) && provenance.every(
|
|
59313
|
+
(source) => isJsonObject(source) && typeof source.source_scope === "string" && typeof source.source_sort === "string" && typeof source.source_term_id === "string" && (source.page == null || typeof source.page === "number") && [source.document_id, source.document_title, source.passage_id, source.section].every(
|
|
59314
|
+
nullableString2
|
|
59315
|
+
)
|
|
59316
|
+
) && (stated === void 0 || Array.isArray(stated) && stated.every(
|
|
59317
|
+
(item) => isJsonObject(item) && typeof item.value === "string" && [item.feature_name, item.sort_name, item.term_id].every(nullableString2)
|
|
59318
|
+
)) && (absence == null || isJsonObject(absence) && [absence.declared_by, absence.osfql, absence.sort_id, absence.sort_name].every(
|
|
59319
|
+
(item) => typeof item === "string"
|
|
59320
|
+
) && nullableString2(absence.package_id));
|
|
59321
|
+
}
|
|
58820
59322
|
function isConversationMessageResponseDto(value) {
|
|
58821
59323
|
if (!isJsonObject(value)) return false;
|
|
58822
59324
|
return typeof Reflect.get(value, "assistant_message") === "string" && typeof Reflect.get(value, "conversation_id") === "string" && typeof Reflect.get(value, "intent") === "string" && typeof Reflect.get(value, "turn_id") === "string" && Array.isArray(Reflect.get(value, "produced_term_ids")) && Array.isArray(Reflect.get(value, "suggestions")) && Array.isArray(Reflect.get(value, "notices"));
|
|
@@ -58830,6 +59332,19 @@ function ConversationStreamEventFromApiToFront(event, payload) {
|
|
|
58830
59332
|
return response === null ? null : { type: "done", response };
|
|
58831
59333
|
}
|
|
58832
59334
|
if (!isJsonObject(payload)) return null;
|
|
59335
|
+
if (event === "claim") {
|
|
59336
|
+
return isVerifiedClaimDto(payload) ? { type: "claim", claim: VerifiedClaimFromApiToFront(payload) } : null;
|
|
59337
|
+
}
|
|
59338
|
+
if (event === "step_start" || event === "step_end") {
|
|
59339
|
+
const { stage_id: stageId, kind, order, outcome } = payload;
|
|
59340
|
+
if (typeof stageId !== "string" || kind !== "symbolic" && kind !== "sensor" || typeof order !== "number" || !Number.isSafeInteger(order))
|
|
59341
|
+
return null;
|
|
59342
|
+
if (event === "step_start" && outcome === null)
|
|
59343
|
+
return { type: event, stageId, kind, order, outcome };
|
|
59344
|
+
if (event === "step_end" && typeof outcome === "string")
|
|
59345
|
+
return { type: event, stageId, kind, order, outcome };
|
|
59346
|
+
return null;
|
|
59347
|
+
}
|
|
58833
59348
|
if (event === "token") {
|
|
58834
59349
|
const delta = Reflect.get(payload, "delta");
|
|
58835
59350
|
return typeof delta === "string" ? { type: "token", delta } : null;
|
|
@@ -58863,6 +59378,7 @@ function TurnDtoFromApiToFront(dto) {
|
|
|
58863
59378
|
validityCertificateRuleProgramHash: dto.validity_certificate_rule_program_hash ?? void 0,
|
|
58864
59379
|
validityCertificateRuleRevision: dto.validity_certificate_rule_revision ?? void 0,
|
|
58865
59380
|
...answerContractFromApiToFront(dto),
|
|
59381
|
+
...dto.follow_up_of === void 0 ? {} : { followUpOf: dto.follow_up_of },
|
|
58866
59382
|
framePages: (dto.frame_pages ?? []).map((page) => ({
|
|
58867
59383
|
frameId: page.frame_id,
|
|
58868
59384
|
page: page.page,
|
|
@@ -58980,6 +59496,68 @@ function SessionGraphDtoFromApiToFront(dto) {
|
|
|
58980
59496
|
resolvedCoreferences: dto.resolved_coreferences.map(ResolvedCoreferenceDtoFromApiToFront)
|
|
58981
59497
|
};
|
|
58982
59498
|
}
|
|
59499
|
+
function ClaimAttestationRequestFromFrontToApi(model) {
|
|
59500
|
+
return { turn_id: model.turnId, point_ref: model.pointRef, kind: model.kind };
|
|
59501
|
+
}
|
|
59502
|
+
function ClaimAttestationResponseFromApiToFront(dto) {
|
|
59503
|
+
if (dto.kind !== "confirmed" && dto.kind !== "reported_error") {
|
|
59504
|
+
throw new TypeError(`Unknown claim attestation kind: ${dto.kind}`);
|
|
59505
|
+
}
|
|
59506
|
+
return {
|
|
59507
|
+
attestationId: dto.attestation_id,
|
|
59508
|
+
conversationId: dto.conversation_id,
|
|
59509
|
+
turnId: dto.turn_id,
|
|
59510
|
+
pointRef: dto.point_ref,
|
|
59511
|
+
kind: dto.kind,
|
|
59512
|
+
attestedBy: dto.attested_by,
|
|
59513
|
+
attestedAt: dto.attested_at
|
|
59514
|
+
};
|
|
59515
|
+
}
|
|
59516
|
+
function UnconfirmedRecordFromApiToFront(dto) {
|
|
59517
|
+
const out = { recordId: dto.record_id, sort: dto.sort };
|
|
59518
|
+
if (dto.document_id != null) out.documentId = dto.document_id;
|
|
59519
|
+
if (dto.passage_id != null) out.passageId = dto.passage_id;
|
|
59520
|
+
if (dto.provenance != null) out.provenance = dto.provenance;
|
|
59521
|
+
if (dto.status != null) out.status = dto.status;
|
|
59522
|
+
if (dto.text != null) out.text = dto.text;
|
|
59523
|
+
if (dto.start_seconds != null) out.startSeconds = dto.start_seconds;
|
|
59524
|
+
if (dto.end_seconds != null) out.endSeconds = dto.end_seconds;
|
|
59525
|
+
if (dto.page_start != null) out.pageStart = dto.page_start;
|
|
59526
|
+
if (dto.page_end != null) out.pageEnd = dto.page_end;
|
|
59527
|
+
return out;
|
|
59528
|
+
}
|
|
59529
|
+
function UnreadPagesFromApiToFront(dto) {
|
|
59530
|
+
return { documentId: dto.document_id, pages: [...dto.pages], reason: dto.reason };
|
|
59531
|
+
}
|
|
59532
|
+
function ToVerifyPointFromApiToFront(dto) {
|
|
59533
|
+
return {
|
|
59534
|
+
...dto.attestations === void 0 ? {} : { attestations: dto.attestations },
|
|
59535
|
+
...dto.fact_term_ids === void 0 ? {} : { factTermIds: dto.fact_term_ids },
|
|
59536
|
+
kind: dto.kind,
|
|
59537
|
+
pointRef: dto.point_ref,
|
|
59538
|
+
reason: dto.reason,
|
|
59539
|
+
...dto.record_term_id === void 0 ? {} : { recordTermId: dto.record_term_id },
|
|
59540
|
+
text: dto.text
|
|
59541
|
+
};
|
|
59542
|
+
}
|
|
59543
|
+
function WebSourceQualificationFromApiToFront(dto) {
|
|
59544
|
+
return {
|
|
59545
|
+
...dto.explanation === void 0 ? {} : { explanation: dto.explanation },
|
|
59546
|
+
level: dto.level,
|
|
59547
|
+
...dto.rule_id === void 0 ? {} : { ruleId: dto.rule_id }
|
|
59548
|
+
};
|
|
59549
|
+
}
|
|
59550
|
+
function WebSourceFromApiToFront(dto) {
|
|
59551
|
+
return {
|
|
59552
|
+
...dto.fetched_at === void 0 ? {} : { fetchedAt: dto.fetched_at },
|
|
59553
|
+
qualification: WebSourceQualificationFromApiToFront(dto.qualification),
|
|
59554
|
+
recordTermId: dto.record_term_id,
|
|
59555
|
+
...dto.source_verdict === void 0 ? {} : { sourceVerdict: dto.source_verdict },
|
|
59556
|
+
...dto.title === void 0 ? {} : { title: dto.title },
|
|
59557
|
+
url: dto.url,
|
|
59558
|
+
used: dto.used
|
|
59559
|
+
};
|
|
59560
|
+
}
|
|
58983
59561
|
|
|
58984
59562
|
// src/normalizers/query.ts
|
|
58985
59563
|
function TrizRecordOutcomeRequestFromFrontToApi(model) {
|
|
@@ -65431,7 +66009,9 @@ function IngestionConfigDtoFromFrontToApi(model) {
|
|
|
65431
66009
|
reject_anonymized_references: model.rejectAnonymizedReferences,
|
|
65432
66010
|
skip_fingerprint: model.skipFingerprint,
|
|
65433
66011
|
fresh_work: model.freshWork,
|
|
65434
|
-
skip_relation_completion: model.skipRelationCompletion
|
|
66012
|
+
skip_relation_completion: model.skipRelationCompletion,
|
|
66013
|
+
text_provenance: model.textProvenance,
|
|
66014
|
+
derived_from: model.derivedFrom
|
|
65435
66015
|
};
|
|
65436
66016
|
}
|
|
65437
66017
|
function ChunkFailureDtoFromApiToFront(dto) {
|
|
@@ -65525,6 +66105,13 @@ function IngestionWorkCacheDtoFromApiToFront(dto) {
|
|
|
65525
66105
|
reusedRecordedTokenUsage: TokenUsageDtoFromApiToFront(dto.reused_recorded_token_usage)
|
|
65526
66106
|
};
|
|
65527
66107
|
}
|
|
66108
|
+
function IngestionValuePassDtoFromApiToFront(dto) {
|
|
66109
|
+
return {
|
|
66110
|
+
valuesRead: dto.values_read,
|
|
66111
|
+
valuesHeld: dto.values_held,
|
|
66112
|
+
passagesNotRead: dto.passages_not_read
|
|
66113
|
+
};
|
|
66114
|
+
}
|
|
65528
66115
|
function AlignmentStatsDtoFromApiToFront(dto) {
|
|
65529
66116
|
return {
|
|
65530
66117
|
avgFuzzyRatio: dto.avg_fuzzy_ratio,
|
|
@@ -66047,7 +66634,8 @@ function DocumentStatsDtoFromApiToFront(dto) {
|
|
|
66047
66634
|
termIds: dto.term_ids,
|
|
66048
66635
|
totalTokens: dto.total_tokens,
|
|
66049
66636
|
fcaDiscovery: dto.fca_discovery ? FcaIngestionReportFromApiToFront(dto.fca_discovery) : void 0,
|
|
66050
|
-
workCache: dto.work_cache ? IngestionWorkCacheDtoFromApiToFront(dto.work_cache) : void 0
|
|
66637
|
+
workCache: dto.work_cache ? IngestionWorkCacheDtoFromApiToFront(dto.work_cache) : void 0,
|
|
66638
|
+
...dto.value_pass ? { valuePass: IngestionValuePassDtoFromApiToFront(dto.value_pass) } : {}
|
|
66051
66639
|
};
|
|
66052
66640
|
}
|
|
66053
66641
|
function SessionStatsResponseFromApiToFront(dto) {
|
|
@@ -66304,6 +66892,8 @@ function isIngestUrlStoreFailedBody(body) {
|
|
|
66304
66892
|
}
|
|
66305
66893
|
function WebSearchRequestFromFrontToApi(model) {
|
|
66306
66894
|
const dto = { query: model.query };
|
|
66895
|
+
if (model.confirmExternal !== void 0) dto.confirm_external = model.confirmExternal;
|
|
66896
|
+
if (model.project !== void 0) dto.project = model.project;
|
|
66307
66897
|
if (model.limit !== void 0) dto.limit = model.limit;
|
|
66308
66898
|
return dto;
|
|
66309
66899
|
}
|
|
@@ -66407,6 +66997,19 @@ function IngestAudioResponseFromApiToFront(dto) {
|
|
|
66407
66997
|
translatedLang: dto.translated_lang ?? void 0
|
|
66408
66998
|
};
|
|
66409
66999
|
}
|
|
67000
|
+
function LiveRecordingViewFromApiToFront(dto) {
|
|
67001
|
+
const out = {
|
|
67002
|
+
id: dto.id,
|
|
67003
|
+
state: dto.state,
|
|
67004
|
+
bytes: dto.bytes,
|
|
67005
|
+
durationSecs: dto.duration_secs,
|
|
67006
|
+
finals: dto.finals.map((final) => ({ ...final }))
|
|
67007
|
+
};
|
|
67008
|
+
if (dto.audio_file_id != null) out.audioFileId = dto.audio_file_id;
|
|
67009
|
+
if (dto.error != null) out.error = dto.error;
|
|
67010
|
+
if (dto.result != null) out.result = IngestAudioResponseFromApiToFront(dto.result);
|
|
67011
|
+
return out;
|
|
67012
|
+
}
|
|
66410
67013
|
function CreateRdfUploadRequestFromFrontToApi(request) {
|
|
66411
67014
|
return {
|
|
66412
67015
|
name: request.name,
|
|
@@ -66453,6 +67056,57 @@ function RdfUploadPauseReceiptFromApiToFront(dto) {
|
|
|
66453
67056
|
status: dto.status
|
|
66454
67057
|
};
|
|
66455
67058
|
}
|
|
67059
|
+
function VideoIngestRequestFromFrontToApi(model) {
|
|
67060
|
+
const options = model.options;
|
|
67061
|
+
const asr = options?.asr;
|
|
67062
|
+
return {
|
|
67063
|
+
video_base64: model.videoBase64,
|
|
67064
|
+
...model.filename !== void 0 ? { filename: model.filename } : {},
|
|
67065
|
+
...options !== void 0 ? {
|
|
67066
|
+
options: {
|
|
67067
|
+
...asr !== void 0 ? {
|
|
67068
|
+
asr: {
|
|
67069
|
+
...asr.diarize !== void 0 ? { diarize: asr.diarize } : {},
|
|
67070
|
+
...asr.language !== void 0 ? { language: asr.language } : {},
|
|
67071
|
+
...asr.numSpeakers !== void 0 ? { num_speakers: asr.numSpeakers } : {}
|
|
67072
|
+
}
|
|
67073
|
+
} : {},
|
|
67074
|
+
...options.lanes !== void 0 ? { lanes: options.lanes } : {},
|
|
67075
|
+
...options.maxFrames !== void 0 ? { max_frames: options.maxFrames } : {},
|
|
67076
|
+
...options.sceneThreshold !== void 0 ? { scene_threshold: options.sceneThreshold } : {},
|
|
67077
|
+
...options.visionTemplate !== void 0 ? { vision_template: options.visionTemplate } : {}
|
|
67078
|
+
}
|
|
67079
|
+
} : {}
|
|
67080
|
+
};
|
|
67081
|
+
}
|
|
67082
|
+
function VideoIngestResponseFromApiToFront(dto) {
|
|
67083
|
+
return {
|
|
67084
|
+
stats: IngestionStatsDtoFromApiToFront(dto.stats),
|
|
67085
|
+
evidence: {
|
|
67086
|
+
documentTermId: dto.evidence.document_term_id,
|
|
67087
|
+
locatedTerms: dto.evidence.located_terms,
|
|
67088
|
+
unlocatedTermIds: dto.evidence.unlocated_term_ids
|
|
67089
|
+
}
|
|
67090
|
+
};
|
|
67091
|
+
}
|
|
67092
|
+
function RetainedOriginalFromApiToFront(dto) {
|
|
67093
|
+
return {
|
|
67094
|
+
id: dto.id,
|
|
67095
|
+
name: dto.name,
|
|
67096
|
+
size: dto.size,
|
|
67097
|
+
contentUrl: dto.content_url
|
|
67098
|
+
};
|
|
67099
|
+
}
|
|
67100
|
+
function QueuedVideoIngestResponseFromApiToFront(dto) {
|
|
67101
|
+
return {
|
|
67102
|
+
documentId: dto.document_id,
|
|
67103
|
+
sessionId: dto.session_id,
|
|
67104
|
+
status: dto.status,
|
|
67105
|
+
statusUrl: dto.status_url,
|
|
67106
|
+
originalFiles: dto.original_files.map(RetainedOriginalFromApiToFront),
|
|
67107
|
+
sourceText: dto.source_text
|
|
67108
|
+
};
|
|
67109
|
+
}
|
|
66456
67110
|
|
|
66457
67111
|
// src/resources/ingestion-session.ts
|
|
66458
67112
|
var IngestionFailedError = class extends ReasoningLayerError {
|
|
@@ -67098,15 +67752,38 @@ var IngestionClient = class {
|
|
|
67098
67752
|
* @param request - The SUO-KIF source, an optional `goal`/`query` to
|
|
67099
67753
|
* prove, and a `persist` flag (import into the tenant substrate vs an
|
|
67100
67754
|
* ephemeral request-scoped world).
|
|
67755
|
+
* @param requestOptions - Per-call request options.
|
|
67101
67756
|
* @returns Import counts (forms, facts, rules, sorts, …) plus, when a
|
|
67102
67757
|
* goal/query was supplied, a `provable` verdict and the non-firing
|
|
67103
67758
|
* residue breakdown.
|
|
67759
|
+
* @throws {GovernanceRefusedError} With `persist: true`, when the write
|
|
67760
|
+
* guard refuses a fact, individual or rule the import writes; nothing of
|
|
67761
|
+
* the import is stored. `403` `reserved_sort_write_refused`,
|
|
67762
|
+
* `sort_write_not_granted`, `operational_authority_denied` or
|
|
67763
|
+
* `operational_authority_undetermined`; `409` `authz_relation_derived`;
|
|
67764
|
+
* `422`
|
|
67765
|
+
* `operational_rule_conclusion`, `authz_rule_shape`,
|
|
67766
|
+
* `authz_parent_of_sort_refused` or `filing_term_unread`.
|
|
67767
|
+
* @throws {VocabularyRefusedError} `409` `governed_sort_write_refused`: that
|
|
67768
|
+
* code is in the vocabulary set too, which the SDK reads first.
|
|
67769
|
+
*
|
|
67770
|
+
* @remarks
|
|
67771
|
+
* Sent to `POST /api/v1/ingest/kif`; the body is snake_case on the wire.
|
|
67772
|
+
* The refusals are the engine's `GovernanceRefusalBody`
|
|
67773
|
+
* (`{ error, code, message }`), read into a typed
|
|
67774
|
+
* `GovernanceRefusedError`; any other failure stays the plain `ApiError`.
|
|
67775
|
+
*
|
|
67776
|
+
* @example
|
|
67777
|
+
* ```typescript
|
|
67778
|
+
* const result = await client.ingestion.ingestKif({
|
|
67779
|
+
* content: '(instance Socrates Human)',
|
|
67780
|
+
* persist: true,
|
|
67781
|
+
* });
|
|
67782
|
+
* console.log(result.facts);
|
|
67783
|
+
* ```
|
|
67104
67784
|
*/
|
|
67105
67785
|
async ingestKif(request, requestOptions) {
|
|
67106
|
-
const response = await this.api.ingestKif(
|
|
67107
|
-
IngestKifRequestFromFrontToApi(request),
|
|
67108
|
-
toRequestParams(requestOptions)
|
|
67109
|
-
);
|
|
67786
|
+
const response = await this.api.ingestKif(IngestKifRequestFromFrontToApi(request), toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
67110
67787
|
return decodeResponse(response, IngestKifResponseFromApiToFront);
|
|
67111
67788
|
}
|
|
67112
67789
|
/**
|
|
@@ -67537,6 +68214,10 @@ var IngestionClient = class {
|
|
|
67537
68214
|
* @returns The pages read (created, updated or unchanged) and the pages
|
|
67538
68215
|
* skipped, each with a reason.
|
|
67539
68216
|
* @throws {BadRequestError} If the body is malformed.
|
|
68217
|
+
* @throws {ForbiddenError} `403` when the Space's boundary refuses the start host.
|
|
68218
|
+
* `errorBodyCode` gives the reason, such as `egress_denied`.
|
|
68219
|
+
* @throws {PreconditionRequiredError} `428` with `boundary_needs_confirmation`
|
|
68220
|
+
* when the Web connector requires confirmation before fetching the page.
|
|
67540
68221
|
* @throws {ApiError} `422` if the URL is not absolute `http`/`https`, a
|
|
67541
68222
|
* limit is out of range (depth above `maxDepthLimit`, pages above
|
|
67542
68223
|
* `maxPagesLimit`), the body has an unknown field, or the crawl ingested
|
|
@@ -67606,13 +68287,16 @@ var IngestionClient = class {
|
|
|
67606
68287
|
* Search the web through the deployment's search providers —
|
|
67607
68288
|
* `POST /api/v1/web/search`.
|
|
67608
68289
|
*
|
|
67609
|
-
* @param request - The query
|
|
68290
|
+
* @param request - The query, result limit, project and confirmation for this search.
|
|
67610
68291
|
* @param requestOptions - Per-call request options.
|
|
67611
68292
|
* @returns The trimmed query and the pages found, best first.
|
|
67612
68293
|
* @throws {BadRequestError} `400` if the body is malformed.
|
|
67613
68294
|
* @throws {ApiError} `422` if the query is blank or longer than
|
|
67614
68295
|
* `webSearch.maxQueryChars`, the `limit` is out of range (1 to
|
|
67615
|
-
* `webSearch.maxResultsLimit`), or the body has an unknown field.
|
|
68296
|
+
* `webSearch.maxResultsLimit`), the project is malformed, or the body has an unknown field.
|
|
68297
|
+
* @throws {ForbiddenError} `403` when the setting, boundary or connector refuses the search.
|
|
68298
|
+
* @throws {PreconditionRequiredError} `428` with `boundary_needs_confirmation`
|
|
68299
|
+
* when the boundary requires the person to confirm this call.
|
|
67616
68300
|
* @throws {InternalServerError} `502` with `errorBodyCode`
|
|
67617
68301
|
* `'web_search_providers_failed'` if every registered provider failed
|
|
67618
68302
|
* this search. The next call can succeed.
|
|
@@ -67686,6 +68370,72 @@ var IngestionClient = class {
|
|
|
67686
68370
|
);
|
|
67687
68371
|
return decodeResponse(response, IngestAudioResponseFromApiToFront);
|
|
67688
68372
|
}
|
|
68373
|
+
/**
|
|
68374
|
+
* Ingest a short video: read its timeline (speech, screen text, scenes) and
|
|
68375
|
+
* ingest the text with the full ontology extraction —
|
|
68376
|
+
* `POST /api/v1/ingest/video`.
|
|
68377
|
+
*
|
|
68378
|
+
* @param request - The clip in base64, its file name, and the timeline
|
|
68379
|
+
* options.
|
|
68380
|
+
* @param requestOptions - `sync` flag plus per-call request options. `sync`
|
|
68381
|
+
* defaults to `true`.
|
|
68382
|
+
* @returns `inline` with the statistics and the evidence receipt (HTTP 201),
|
|
68383
|
+
* or, with `sync: false`, `queued` with an {@link IngestionSession} and the
|
|
68384
|
+
* 202 body (HTTP 202).
|
|
68385
|
+
* @throws {BadRequestError} `400` if `videoBase64` is not standard base64,
|
|
68386
|
+
* or the clip is empty or over 16 MiB.
|
|
68387
|
+
* @throws {ForbiddenError} `403` if the caller may not write, or a
|
|
68388
|
+
* `sync: false` call carries no acting user
|
|
68389
|
+
* (`errorBodyCode(e) === 'ingestion_execution_actor_required'`).
|
|
68390
|
+
* @throws {InternalServerError} `500` if the timeline service failed or
|
|
68391
|
+
* answered invalid evidence, or the ingestion failed; nothing was
|
|
68392
|
+
* committed.
|
|
68393
|
+
* @throws {ServiceUnavailableError} `503` if no video timeline service is
|
|
68394
|
+
* configured.
|
|
68395
|
+
* @throws {IngestionQueueUnavailableError} With `sync: false`, a `503`
|
|
68396
|
+
* becomes this error: the deployment runs no background queue, session
|
|
68397
|
+
* tracking or task retention (or no timeline service).
|
|
68398
|
+
*
|
|
68399
|
+
* @remarks
|
|
68400
|
+
* Request body is snake_case on the wire (`video_base64`,
|
|
68401
|
+
* `options.max_frames`, `options.asr.num_speakers`); `sync` travels as a
|
|
68402
|
+
* query parameter. The run commits the document, its terms, the video
|
|
68403
|
+
* evidence and one passage per utterance or frame together, or none of
|
|
68404
|
+
* them. The SDK reads the HTTP status to tell the two answers apart.
|
|
68405
|
+
*
|
|
68406
|
+
* @example
|
|
68407
|
+
* ```ts
|
|
68408
|
+
* const outcome = await client.ingestion.ingestVideo({ videoBase64: clip, filename: 'demo.mp4' });
|
|
68409
|
+
* if (outcome.kind === 'inline') console.log(outcome.result.evidence.locatedTerms);
|
|
68410
|
+
* ```
|
|
68411
|
+
*/
|
|
68412
|
+
async ingestVideo(request, requestOptions) {
|
|
68413
|
+
const sync = requestOptions?.sync ?? true;
|
|
68414
|
+
let response;
|
|
68415
|
+
try {
|
|
68416
|
+
response = await this.api.http.request({
|
|
68417
|
+
...toRequestParams(requestOptions),
|
|
68418
|
+
path: `/api/v1/ingest/video`,
|
|
68419
|
+
method: "POST",
|
|
68420
|
+
query: { sync },
|
|
68421
|
+
body: VideoIngestRequestFromFrontToApi(request),
|
|
68422
|
+
secure: true,
|
|
68423
|
+
type: "application/json",
|
|
68424
|
+
format: "json"
|
|
68425
|
+
});
|
|
68426
|
+
} catch (error) {
|
|
68427
|
+
throw sync ? error : asQueueRefusal(error);
|
|
68428
|
+
}
|
|
68429
|
+
return decodeResponse(response, (data) => {
|
|
68430
|
+
if (response.status === 202) {
|
|
68431
|
+
if (!("status_url" in data)) throw contractViolation("/ingest/video", 202);
|
|
68432
|
+
const queued = QueuedVideoIngestResponseFromApiToFront(data);
|
|
68433
|
+
return { kind: "queued", session: new IngestionSession(this.api, queued), queued };
|
|
68434
|
+
}
|
|
68435
|
+
if ("status_url" in data) throw contractViolation("/ingest/video", response.status);
|
|
68436
|
+
return { kind: "inline", result: VideoIngestResponseFromApiToFront(data) };
|
|
68437
|
+
});
|
|
68438
|
+
}
|
|
67689
68439
|
/**
|
|
67690
68440
|
* Poll an audio ingestion job — `GET /api/v1/ingest/audio/jobs/{job_id}`.
|
|
67691
68441
|
*
|
|
@@ -67738,6 +68488,92 @@ var IngestionClient = class {
|
|
|
67738
68488
|
const response = await this.api.resumeAudioJob(jobId, toRequestParams(requestOptions));
|
|
67739
68489
|
return decodeResponse(response, IngestAudioResponseFromApiToFront);
|
|
67740
68490
|
}
|
|
68491
|
+
/**
|
|
68492
|
+
* Read a live recording — `GET /api/v1/audio/recordings/{id}`.
|
|
68493
|
+
*
|
|
68494
|
+
* @param id - The live recording id the client chose when it opened the
|
|
68495
|
+
* caption socket (`/ws/audio/stream?protocol_version=2&recording=<id>`).
|
|
68496
|
+
* @param requestOptions - Per-call request options.
|
|
68497
|
+
* @returns Its state, the audio held and the finals so far; once `ready`,
|
|
68498
|
+
* the retained original and the parse-only audio result.
|
|
68499
|
+
* @throws {ForbiddenError} 403 when the recording is another user's.
|
|
68500
|
+
* @throws {NotFoundError} 404 when there is no such recording, or it expired.
|
|
68501
|
+
* @throws {TenantDeletedError} 410 when the tenant was deleted.
|
|
68502
|
+
*
|
|
68503
|
+
* @remarks
|
|
68504
|
+
* Only the user who started a recording may read it. A ready or failed
|
|
68505
|
+
* recording expires after the engine's parse-only retention (a day by
|
|
68506
|
+
* default). `liveRecording` on `client.health.check()` says whether the
|
|
68507
|
+
* engine keeps live recordings at all.
|
|
68508
|
+
*
|
|
68509
|
+
* @example
|
|
68510
|
+
* ```ts
|
|
68511
|
+
* const recording = await client.ingestion.getLiveRecording(recordingId);
|
|
68512
|
+
* if (recording.state === 'ready') console.log(recording.result?.transcriptMarkdown);
|
|
68513
|
+
* ```
|
|
68514
|
+
*/
|
|
68515
|
+
async getLiveRecording(id, requestOptions) {
|
|
68516
|
+
const response = await this.api.getLiveRecording(id, toRequestParams(requestOptions));
|
|
68517
|
+
return decodeResponse(response, LiveRecordingViewFromApiToFront);
|
|
68518
|
+
}
|
|
68519
|
+
/**
|
|
68520
|
+
* Stop a live recording whose socket is gone, and finalize it —
|
|
68521
|
+
* `POST /api/v1/audio/recordings/{id}/stop`.
|
|
68522
|
+
*
|
|
68523
|
+
* @param id - The live recording id.
|
|
68524
|
+
* @param requestOptions - Per-call request options.
|
|
68525
|
+
* @returns The recording: `finalizing` (HTTP 202), or as it stands when it
|
|
68526
|
+
* is already `ready` or `failed` (HTTP 200).
|
|
68527
|
+
* @throws {ForbiddenError} 403 when the recording is another user's.
|
|
68528
|
+
* @throws {NotFoundError} 404 when there is no such recording.
|
|
68529
|
+
* @throws {TenantDeletedError} 410 when the tenant was deleted.
|
|
68530
|
+
*
|
|
68531
|
+
* @remarks
|
|
68532
|
+
* The audio is sealed and retained as the meeting's original, then the
|
|
68533
|
+
* parse-only audio pipeline writes the transcript, summary and actions.
|
|
68534
|
+
* Idempotent: a recording already finalizing answers 202 (and finalizing
|
|
68535
|
+
* starts again if its worker stopped). Audio a live socket had not yet
|
|
68536
|
+
* written (at most about five seconds) is not kept.
|
|
68537
|
+
*
|
|
68538
|
+
* @example
|
|
68539
|
+
* ```ts
|
|
68540
|
+
* const recording = await client.ingestion.stopLiveRecording(recordingId);
|
|
68541
|
+
* console.log(recording.state); // 'finalizing'
|
|
68542
|
+
* ```
|
|
68543
|
+
*/
|
|
68544
|
+
async stopLiveRecording(id, requestOptions) {
|
|
68545
|
+
const response = await this.api.stopLiveRecording(id, toRequestParams(requestOptions));
|
|
68546
|
+
return decodeResponse(response, LiveRecordingViewFromApiToFront);
|
|
68547
|
+
}
|
|
68548
|
+
/**
|
|
68549
|
+
* Finalize again a recording whose finalizing failed —
|
|
68550
|
+
* `POST /api/v1/audio/recordings/{id}/retry`.
|
|
68551
|
+
*
|
|
68552
|
+
* @param id - The live recording id of a `failed` recording.
|
|
68553
|
+
* @param requestOptions - Per-call request options.
|
|
68554
|
+
* @returns The recording: `finalizing` again (HTTP 202), or as it stands
|
|
68555
|
+
* when it is already `ready` (HTTP 200).
|
|
68556
|
+
* @throws {ForbiddenError} 403 when the recording is another user's.
|
|
68557
|
+
* @throws {NotFoundError} 404 when there is no such recording.
|
|
68558
|
+
* @throws {ConstraintViolationError} 409 when the recording is still
|
|
68559
|
+
* recording or finalizing.
|
|
68560
|
+
* @throws {TenantDeletedError} 410 when the tenant was deleted.
|
|
68561
|
+
*
|
|
68562
|
+
* @remarks
|
|
68563
|
+
* The engine finalizes again from the audio it kept, so no audio is resent.
|
|
68564
|
+
*
|
|
68565
|
+
* @example
|
|
68566
|
+
* ```ts
|
|
68567
|
+
* const recording = await client.ingestion.getLiveRecording(recordingId);
|
|
68568
|
+
* if (recording.state === 'failed') {
|
|
68569
|
+
* await client.ingestion.retryLiveRecording(recordingId);
|
|
68570
|
+
* }
|
|
68571
|
+
* ```
|
|
68572
|
+
*/
|
|
68573
|
+
async retryLiveRecording(id, requestOptions) {
|
|
68574
|
+
const response = await this.api.retryLiveRecording(id, toRequestParams(requestOptions));
|
|
68575
|
+
return decodeResponse(response, LiveRecordingViewFromApiToFront);
|
|
68576
|
+
}
|
|
67741
68577
|
/**
|
|
67742
68578
|
* Open a resumable upload of one original RDF file —
|
|
67743
68579
|
* `POST /api/v1/ingest/rdf/uploads`.
|
|
@@ -68289,6 +69125,7 @@ function ReviewSummaryFromApiToFront(dto) {
|
|
|
68289
69125
|
totalRejected: dto.total_rejected,
|
|
68290
69126
|
totalCorrected: dto.total_corrected,
|
|
68291
69127
|
totalMerged: dto.total_merged,
|
|
69128
|
+
totalSuperseded: dto.total_superseded ?? 0,
|
|
68292
69129
|
avgPendingConfidence: dto.avg_pending_confidence,
|
|
68293
69130
|
...typeof dto.oldest_pending === "string" ? { oldestPending: dto.oldest_pending } : {},
|
|
68294
69131
|
byReason: byReasonFromApiToFront(dto.by_reason),
|
|
@@ -70901,7 +71738,7 @@ var SourcesClient = class {
|
|
|
70901
71738
|
* Parquet) or `config.database_path` (SQLite) to {@link SourcesClient.register}.
|
|
70902
71739
|
* @throws {BadRequestError} **400** when the engine cannot read the multipart body.
|
|
70903
71740
|
* @throws {ApiError} **413** when the file is larger than the engine's
|
|
70904
|
-
*
|
|
71741
|
+
* configured upload limit (256 MiB by default).
|
|
70905
71742
|
*
|
|
70906
71743
|
* @remarks
|
|
70907
71744
|
* Sent to `POST /api/v1/sources/files` as `multipart/form-data` with exactly
|
|
@@ -71062,7 +71899,7 @@ var SourcesClient = class {
|
|
|
71062
71899
|
* Sent to `GET /api/v1/sources/{source_id}/tables`. The cheap counterpart to
|
|
71063
71900
|
* {@link SourcesClient.discoverSchema}: one catalog query, no per-type
|
|
71064
71901
|
* introspection, and — unlike discovery — **never subject to the discovery
|
|
71065
|
-
* cap**. A source with more tables than
|
|
71902
|
+
* cap**. A source with more tables than the configured discovery limit allows
|
|
71066
71903
|
* has its discovery refused, so this listing is the un-capped payload to
|
|
71067
71904
|
* narrow *from*: list the names, let the user pick, then hand the picked
|
|
71068
71905
|
* subset back as the `typeFilter` of a `discoverSchema` call. The response
|
|
@@ -72195,6 +73032,11 @@ var ScenariosClient = class {
|
|
|
72195
73032
|
* @returns Created scenario (may include interactive questions). A complete
|
|
72196
73033
|
* answer's `materialization.warnings` names every rule the engine refused.
|
|
72197
73034
|
* @throws {BadRequestError} If a binding in `prefixes` is malformed.
|
|
73035
|
+
* @throws {ForbiddenError} `403` with `errorBodyCode(e)`
|
|
73036
|
+
* `sort_write_not_granted` (the caller's Write grants do not cover a
|
|
73037
|
+
* belief, the goal or a constraint as it is stored),
|
|
73038
|
+
* `operational_authority_denied` or `operational_authority_undetermined`;
|
|
73039
|
+
* nothing is written (reasoninglayer#1227).
|
|
72198
73040
|
* @throws {ConstraintViolationError} `409` if `prefixes` binds a prefix the
|
|
72199
73041
|
* tenant already binds to a different namespace.
|
|
72200
73042
|
* @throws {ApiError} **422** if the generated scenario is invalid — among
|
|
@@ -72246,6 +73088,12 @@ var ScenariosClient = class {
|
|
|
72246
73088
|
* `property` name the creation gate of `sorts.createSort` refuses: a name
|
|
72247
73089
|
* OSFQL cannot read (`patient-id`), or a CURIE whose prefix the tenant does
|
|
72248
73090
|
* not bind canonically. Nothing is written.
|
|
73091
|
+
* @throws {ForbiddenError} `403` if the authorization context grants no
|
|
73092
|
+
* Manage on a sort the scenario writes, or with `errorBodyCode(e)`
|
|
73093
|
+
* `reserved_sort_write_refused` (a belief, goal or constraint names a
|
|
73094
|
+
* reserved sort), `sort_write_not_granted`, `operational_authority_denied`
|
|
73095
|
+
* or `operational_authority_undetermined`. Nothing is written
|
|
73096
|
+
* (reasoninglayer#1227).
|
|
72249
73097
|
* @throws {ConstraintViolationError} `409` if `prefixes` binds a prefix the
|
|
72250
73098
|
* tenant already binds to a different namespace. Nothing is written.
|
|
72251
73099
|
* @throws {ApiError} **422** `Invalid scenario payload: …` if an item has the
|
|
@@ -72349,6 +73197,11 @@ var ScenariosClient = class {
|
|
|
72349
73197
|
* `addSorts` mints a sort or feature name the creation gate of
|
|
72350
73198
|
* `sorts.createSort` refuses. Nothing is written.
|
|
72351
73199
|
* @throws {NotFoundError} If no scenario has this id.
|
|
73200
|
+
* @throws {ForbiddenError} `403` with `errorBodyCode(e)`
|
|
73201
|
+
* `sort_write_not_granted`, `reserved_sort_write_refused`,
|
|
73202
|
+
* `operational_authority_denied` or `operational_authority_undetermined`
|
|
73203
|
+
* for an added belief or constraint; nothing is written
|
|
73204
|
+
* (reasoninglayer#1227).
|
|
72352
73205
|
* @throws {ConstraintViolationError} `409` if `prefixes` binds a prefix the
|
|
72353
73206
|
* tenant already binds to a different namespace. Nothing is written.
|
|
72354
73207
|
* @throws {ApiError} **422** if an added item is malformed.
|
|
@@ -77461,7 +78314,7 @@ var AnalysisClient = class {
|
|
|
77461
78314
|
* @param requestOptions - Per-call request options.
|
|
77462
78315
|
* @returns The subgroups, best first, each a concept with its positions,
|
|
77463
78316
|
* extent, quality and rates; the search that ran and how far it went;
|
|
77464
|
-
* and the derived
|
|
78317
|
+
* and the derived terms the concepts resolve in.
|
|
77465
78318
|
* @throws {BadRequestError} 400 for an empty or duplicated population,
|
|
77466
78319
|
* nothing in the store, a graded target or one without a measured
|
|
77467
78320
|
* positive and negative, an exact strategy outside the categorical
|
|
@@ -77508,7 +78361,7 @@ var AnalysisClient = class {
|
|
|
77508
78361
|
* @param requestOptions - Per-call request options.
|
|
77509
78362
|
* @returns The distinct patterns in order of first draw, each with its
|
|
77510
78363
|
* equalities, extent, exact `weight`, draw count, quality and rates; the
|
|
77511
|
-
* `normalizer`; the order of the draws; and the derived
|
|
78364
|
+
* `normalizer`; the order of the draws; and the derived terms the
|
|
77512
78365
|
* descriptions resolve in.
|
|
77513
78366
|
* @throws {BadRequestError} 400 for an empty or duplicated population,
|
|
77514
78367
|
* nothing in the store, a graded target or one without a measured positive
|
|
@@ -80102,7 +80955,9 @@ function EnrichedHealthResponseFromApiToFront(dto) {
|
|
|
80102
80955
|
startedAt: dto.started_at,
|
|
80103
80956
|
status: dto.status ?? "unknown",
|
|
80104
80957
|
uptimeSeconds: dto.uptime_seconds,
|
|
80105
|
-
sovereign: dto.sovereign
|
|
80958
|
+
sovereign: dto.sovereign,
|
|
80959
|
+
holdsUnprovenText: dto.holds_unproven_text,
|
|
80960
|
+
liveRecording: dto.live_recording
|
|
80106
80961
|
};
|
|
80107
80962
|
}
|
|
80108
80963
|
|
|
@@ -80115,7 +80970,7 @@ var HealthClient = class {
|
|
|
80115
80970
|
this.api = api;
|
|
80116
80971
|
}
|
|
80117
80972
|
/**
|
|
80118
|
-
* Check the health of the
|
|
80973
|
+
* Check the health of the ReasoningLayer backend.
|
|
80119
80974
|
*
|
|
80120
80975
|
* @returns Enriched health response with overall status, component statuses,
|
|
80121
80976
|
* build info, and the identity of the engine process (`bootId`, `startedAt`,
|
|
@@ -81387,7 +82242,8 @@ function ProvenanceDtoFromApiToFront(dto) {
|
|
|
81387
82242
|
return {
|
|
81388
82243
|
description: dto.description,
|
|
81389
82244
|
location: dto.location,
|
|
81390
|
-
sourceFactId: dto.source_fact_id
|
|
82245
|
+
sourceFactId: dto.source_fact_id,
|
|
82246
|
+
...dto.unconfirmed !== void 0 ? { unconfirmed: dto.unconfirmed } : {}
|
|
81391
82247
|
};
|
|
81392
82248
|
}
|
|
81393
82249
|
function DiagnosticDtoFromApiToFront(dto) {
|
|
@@ -81432,7 +82288,8 @@ function GenerateDocumentRequestFromFrontToApi(model) {
|
|
|
81432
82288
|
metadata: model.metadata,
|
|
81433
82289
|
modality: model.modality,
|
|
81434
82290
|
root_term_id: model.rootTermId,
|
|
81435
|
-
tenant_id: model.tenantId
|
|
82291
|
+
tenant_id: model.tenantId,
|
|
82292
|
+
...model.unconfirmedSupport === void 0 ? {} : { unconfirmed_support: model.unconfirmedSupport }
|
|
81436
82293
|
};
|
|
81437
82294
|
}
|
|
81438
82295
|
function GenerateDocumentResponseFromApiToFront(dto) {
|
|
@@ -81800,6 +82657,9 @@ function extractQueryTimeMs(dto) {
|
|
|
81800
82657
|
function extractDerivationComplete(dto) {
|
|
81801
82658
|
return dto.derivation_complete === true;
|
|
81802
82659
|
}
|
|
82660
|
+
function extractValidBefore(dto) {
|
|
82661
|
+
return dto.valid_before ?? void 0;
|
|
82662
|
+
}
|
|
81803
82663
|
function extractRuleTermId(dto) {
|
|
81804
82664
|
return dto.term.term_id;
|
|
81805
82665
|
}
|
|
@@ -81890,14 +82750,19 @@ var OptimizeClient = class {
|
|
|
81890
82750
|
},
|
|
81891
82751
|
toRequestParams(requestOptions)
|
|
81892
82752
|
);
|
|
81893
|
-
const { queryTimeMs, solutions, derivationComplete } = decodeResponse(
|
|
81894
|
-
|
|
81895
|
-
|
|
81896
|
-
|
|
81897
|
-
|
|
82753
|
+
const { queryTimeMs, solutions, derivationComplete, validBefore } = decodeResponse(
|
|
82754
|
+
bcResponse,
|
|
82755
|
+
(dto) => ({
|
|
82756
|
+
queryTimeMs: extractQueryTimeMs(dto),
|
|
82757
|
+
solutions: dto.solutions.slice(),
|
|
82758
|
+
derivationComplete: extractDerivationComplete(dto),
|
|
82759
|
+
validBefore: extractValidBefore(dto)
|
|
82760
|
+
})
|
|
82761
|
+
);
|
|
82762
|
+
const validity = validBefore === void 0 ? {} : { validBefore };
|
|
81898
82763
|
const solution = solutions[0];
|
|
81899
82764
|
if (solution === void 0) {
|
|
81900
|
-
return derivationComplete ? { status: "infeasible", solveTimeMs: queryTimeMs } : { status: "undetermined", solveTimeMs: queryTimeMs };
|
|
82765
|
+
return derivationComplete ? { status: "infeasible", solveTimeMs: queryTimeMs, ...validity } : { status: "undetermined", solveTimeMs: queryTimeMs, ...validity };
|
|
81901
82766
|
}
|
|
81902
82767
|
const variables = {};
|
|
81903
82768
|
for (const binding of solution.substitution.bindings) {
|
|
@@ -81917,7 +82782,8 @@ var OptimizeClient = class {
|
|
|
81917
82782
|
status: "optimal",
|
|
81918
82783
|
variables,
|
|
81919
82784
|
objectiveValue,
|
|
81920
|
-
solveTimeMs: queryTimeMs
|
|
82785
|
+
solveTimeMs: queryTimeMs,
|
|
82786
|
+
...validity
|
|
81921
82787
|
};
|
|
81922
82788
|
} finally {
|
|
81923
82789
|
if (cleanup) {
|
|
@@ -82481,7 +83347,8 @@ var OsfqlClient = class {
|
|
|
82481
83347
|
* @param options - Optional execution options. Set `reactive` to fire suspended
|
|
82482
83348
|
* `AWAIT` demons whose triggers the program has just satisfied, and
|
|
82483
83349
|
* `semantics: 'rdf'` to run a statement {@link SparqlClient.translateQuery}
|
|
82484
|
-
* returned.
|
|
83350
|
+
* returned. Set `confirmExternal` when the person has confirmed this program's
|
|
83351
|
+
* open-web calls.
|
|
82485
83352
|
* @param requestOptions - Per-call transport options (timeout, signal, headers).
|
|
82486
83353
|
* @returns The execution result including variable bindings, created and
|
|
82487
83354
|
* updated term IDs, defined sort IDs, diagnostics, and statement count.
|
|
@@ -82503,6 +83370,9 @@ var OsfqlClient = class {
|
|
|
82503
83370
|
* `PREFIX p: <iri>;` that binds a bound prefix to another namespace, and a
|
|
82504
83371
|
* `DEFINE` / `AGENT CREATE SORT` of a CURIE whose prefix the tenant does
|
|
82505
83372
|
* not bind, are `execution` failures (HTTP 422); the program is rolled back.
|
|
83373
|
+
* @throws {OsfqlError} HTTP 428 with `errorType` equal to `boundary_needs_confirmation`
|
|
83374
|
+
* when a `SEARCH WEB` or `READ PAGE` requires a person's confirmation. Earlier
|
|
83375
|
+
* statements have already run. Execution stops at the statement requiring confirmation.
|
|
82506
83376
|
* @throws {OsfqlError} With `errorType: 'lock_timeout'` (HTTP 503) when other
|
|
82507
83377
|
* writers kept the tenant's knowledge base locked until the request
|
|
82508
83378
|
* deadline. Nothing ran, so the program is safe to retry as is; a larger
|
|
@@ -82966,6 +83836,24 @@ var Conversation = class {
|
|
|
82966
83836
|
format: "json",
|
|
82967
83837
|
...params
|
|
82968
83838
|
});
|
|
83839
|
+
/**
|
|
83840
|
+
* No description
|
|
83841
|
+
*
|
|
83842
|
+
* @tags conversation
|
|
83843
|
+
* @name AttestConversationPoint
|
|
83844
|
+
* @summary `POST /api/v1/conversation/{id}/attestations`
|
|
83845
|
+
* @request POST:/api/v1/conversation/{id}/attestations
|
|
83846
|
+
* @secure
|
|
83847
|
+
*/
|
|
83848
|
+
attestConversationPoint = (id, data, params = {}) => this.http.request({
|
|
83849
|
+
path: `/api/v1/conversation/${id}/attestations`,
|
|
83850
|
+
method: "POST",
|
|
83851
|
+
body: data,
|
|
83852
|
+
secure: true,
|
|
83853
|
+
type: "application/json",
|
|
83854
|
+
format: "json",
|
|
83855
|
+
...params
|
|
83856
|
+
});
|
|
82969
83857
|
/**
|
|
82970
83858
|
* @description Delete a conversation and all its turns.
|
|
82971
83859
|
*
|
|
@@ -83253,7 +84141,14 @@ var Conversation = class {
|
|
|
83253
84141
|
|
|
83254
84142
|
// src/resources/conversation.ts
|
|
83255
84143
|
var SSE_MEDIA_TYPE = "text/event-stream";
|
|
83256
|
-
var STREAM_EVENTS = /* @__PURE__ */ new Set([
|
|
84144
|
+
var STREAM_EVENTS = /* @__PURE__ */ new Set([
|
|
84145
|
+
"token",
|
|
84146
|
+
"step_start",
|
|
84147
|
+
"step_end",
|
|
84148
|
+
"claim",
|
|
84149
|
+
"done",
|
|
84150
|
+
"error"
|
|
84151
|
+
]);
|
|
83257
84152
|
var ConversationClient = class {
|
|
83258
84153
|
/** @internal */
|
|
83259
84154
|
http;
|
|
@@ -83324,6 +84219,8 @@ var ConversationClient = class {
|
|
|
83324
84219
|
* {@link ConversationClient.sendMessage} takes.
|
|
83325
84220
|
* @returns An async iterable of stream events, discriminated on `type`:
|
|
83326
84221
|
* - `token` — a preview chunk (`delta`) of the answer text;
|
|
84222
|
+
* - `step_start`, `step_end` — a pipeline stage and its outcome;
|
|
84223
|
+
* - `claim` — one verified claim before the full answer;
|
|
83327
84224
|
* - `done` — the complete response, identical to what `sendMessage`
|
|
83328
84225
|
* returns for the turn. It is authoritative: replace the previewed text
|
|
83329
84226
|
* with `response.assistantMessage`;
|
|
@@ -83375,14 +84272,14 @@ var ConversationClient = class {
|
|
|
83375
84272
|
* })) {
|
|
83376
84273
|
* if (event.type === 'token') preview += event.delta;
|
|
83377
84274
|
* else if (event.type === 'done') preview = event.response.assistantMessage;
|
|
83378
|
-
* else if (event.status !== undefined) {
|
|
84275
|
+
* else if (event.type === 'error' && event.status !== undefined) {
|
|
83379
84276
|
* // The same class sendMessage throws: InternalServerError for 500, ...
|
|
83380
84277
|
* throw createApiError(
|
|
83381
84278
|
* event.status,
|
|
83382
84279
|
* { error: event.error, message: event.error },
|
|
83383
84280
|
* new Headers(),
|
|
83384
84281
|
* );
|
|
83385
|
-
* } else throw new Error(event.error);
|
|
84282
|
+
* } else if (event.type === 'error') throw new Error(event.error);
|
|
83386
84283
|
* }
|
|
83387
84284
|
* ```
|
|
83388
84285
|
*/
|
|
@@ -83754,6 +84651,29 @@ var ConversationClient = class {
|
|
|
83754
84651
|
});
|
|
83755
84652
|
return decodeResponse(response, ConversationAnswerFeedbackResponseFromApiToFront);
|
|
83756
84653
|
}
|
|
84654
|
+
/**
|
|
84655
|
+
* Confirm a point on an answer or report an error as the conversation's owner.
|
|
84656
|
+
* @param conversationId - The conversation containing the answer.
|
|
84657
|
+
* @param request - Answer turn, point reference and judgment.
|
|
84658
|
+
* @param requestOptions - Per-call transport overrides.
|
|
84659
|
+
* @returns The stored judgment with the signer and timestamp recorded by the engine.
|
|
84660
|
+
* @throws {ForbiddenError} If an agent or service account tries to attest.
|
|
84661
|
+
* @throws {NotFoundError} If the caller cannot see that answer or point.
|
|
84662
|
+
* @throws {ApiError} If the request fails.
|
|
84663
|
+
* @remarks The request contains `turn_id`, `point_ref` and `kind`. Authentication supplies the signer.
|
|
84664
|
+
* @example
|
|
84665
|
+
* ```typescript
|
|
84666
|
+
* await client.conversation.attestPoint(conversationId, { turnId, pointRef, kind: 'confirmed' });
|
|
84667
|
+
* ```
|
|
84668
|
+
*/
|
|
84669
|
+
async attestPoint(conversationId, request, requestOptions) {
|
|
84670
|
+
const response = await this.api.attestConversationPoint(
|
|
84671
|
+
conversationId,
|
|
84672
|
+
ClaimAttestationRequestFromFrontToApi(request),
|
|
84673
|
+
toRequestParams(requestOptions)
|
|
84674
|
+
);
|
|
84675
|
+
return decodeResponse(response, ClaimAttestationResponseFromApiToFront);
|
|
84676
|
+
}
|
|
83757
84677
|
/**
|
|
83758
84678
|
* Get the session memory graph for a conversation.
|
|
83759
84679
|
*
|
|
@@ -83858,7 +84778,7 @@ async function* readConversationStream(body) {
|
|
|
83858
84778
|
);
|
|
83859
84779
|
}
|
|
83860
84780
|
yield event;
|
|
83861
|
-
if (event.type
|
|
84781
|
+
if (event.type === "done" || event.type === "error") return;
|
|
83862
84782
|
}
|
|
83863
84783
|
throw new NetworkError("Conversation stream ended without a done or error event");
|
|
83864
84784
|
}
|
|
@@ -84185,6 +85105,7 @@ function SearchPapersResponseFromApiToFront(dto) {
|
|
|
84185
85105
|
function CreateResearchSessionResponseFromApiToFront(dto) {
|
|
84186
85106
|
return {
|
|
84187
85107
|
sessionId: dto.session_id,
|
|
85108
|
+
knowledgeBaseTenantId: dto.knowledge_base_tenant_id ?? null,
|
|
84188
85109
|
status: dto.status,
|
|
84189
85110
|
question: dto.question,
|
|
84190
85111
|
createdAt: dto.created_at
|
|
@@ -84209,6 +85130,7 @@ function ResearchCycleResultFromApiToFront(dto) {
|
|
|
84209
85130
|
function ResearchSessionResponseFromApiToFront(dto) {
|
|
84210
85131
|
return {
|
|
84211
85132
|
sessionId: dto.session_id,
|
|
85133
|
+
knowledgeBaseTenantId: dto.knowledge_base_tenant_id ?? null,
|
|
84212
85134
|
question: dto.question,
|
|
84213
85135
|
status: dto.status,
|
|
84214
85136
|
error: dto.error ?? null,
|
|
@@ -87565,10 +88487,8 @@ var SnapshotsClient = class {
|
|
|
87565
88487
|
* @throws {@link ApiError} 404 when it does not exist; 501 when the engine runs in memory.
|
|
87566
88488
|
*
|
|
87567
88489
|
* @remarks
|
|
87568
|
-
* The
|
|
87569
|
-
*
|
|
87570
|
-
* shape is the engine's to change. Treat it as a blob to hand back to
|
|
87571
|
-
* {@link SnapshotsClient.import}, not as something to read fields out of.
|
|
88490
|
+
* Metadata uses the engine’s wire keys. The data payload preserves record keys
|
|
88491
|
+
* verbatim for offline storage and {@link SnapshotsClient.import}.
|
|
87572
88492
|
*
|
|
87573
88493
|
* @example
|
|
87574
88494
|
* ```typescript
|
|
@@ -89563,7 +90483,8 @@ function ExecuteTranspiledResponseFromApiToFront(dto) {
|
|
|
89563
90483
|
rowCount: dto.row_count,
|
|
89564
90484
|
query: dto.query,
|
|
89565
90485
|
dialect: dto.dialect,
|
|
89566
|
-
sourceId: dto.source_id
|
|
90486
|
+
sourceId: dto.source_id,
|
|
90487
|
+
completeness: dto.completeness
|
|
89567
90488
|
};
|
|
89568
90489
|
}
|
|
89569
90490
|
function TranspileRequestFromFrontToApi(model) {
|
|
@@ -89596,6 +90517,10 @@ var OntologyBridgeClient = class {
|
|
|
89596
90517
|
* columns, and per-feature column mappings.
|
|
89597
90518
|
* @returns Whether the binding succeeded plus the bound sort and table names.
|
|
89598
90519
|
* @throws {ApiError} If the request fails.
|
|
90520
|
+
* @throws {InternalServerError} `502` with `errorBodyCode(e)` `source_query_failed` or
|
|
90521
|
+
* `source_stream_failed`, or `504` `source_timeout`, when the discovery or
|
|
90522
|
+
* key-count read the bind runs did not reach the end of the source's
|
|
90523
|
+
* answer (`LiveSourceErrorCode`, reasoninglayer#1218).
|
|
89599
90524
|
*
|
|
89600
90525
|
* @remarks
|
|
89601
90526
|
* Sent to `POST /api/v1/ontology/bindings`. Request/response use the
|
|
@@ -89838,11 +90763,18 @@ var OntologyBridgeClient = class {
|
|
|
89838
90763
|
* source, and the source's type decides the dialect.
|
|
89839
90764
|
* @param requestOptions - Per-call request options.
|
|
89840
90765
|
* @returns The rows the source returned, the native query that fetched them,
|
|
89841
|
-
* its dialect, and the
|
|
90766
|
+
* its dialect, the source id, and `completeness: 'complete'`: the rows are
|
|
90767
|
+
* the source's whole answer, so an empty list is a source with no rows.
|
|
89842
90768
|
* @throws {NotFoundError} If a scanned sort does not exist, or has no binding
|
|
89843
90769
|
* (404; the message says which).
|
|
89844
90770
|
* @throws {ApiError} With `status` 422 if the query's sorts are bound to two
|
|
89845
90771
|
* different sources, or 500 if the binding store cannot be read.
|
|
90772
|
+
* @throws {InternalServerError} `502` with `errorBodyCode(e)` `source_query_failed`
|
|
90773
|
+
* (the source refused or failed the query, or could not be reached) or
|
|
90774
|
+
* `source_stream_failed` (its row stream failed before its end), or `504`
|
|
90775
|
+
* `source_timeout` (the read passed the source's `query_timeout_secs`):
|
|
90776
|
+
* no partial rows are returned (`LiveSourceErrorCode`,
|
|
90777
|
+
* reasoninglayer#1213). `501` if the source has no native query backend.
|
|
89846
90778
|
*
|
|
89847
90779
|
* @remarks
|
|
89848
90780
|
* Sent to `POST /api/v1/ontology/query`. The response uses the snake_case
|
|
@@ -90714,6 +91646,16 @@ var PropertyGraphClient = class _PropertyGraphClient {
|
|
|
90714
91646
|
* @returns Execution result: bindings, the OSFQL program that ran, produced term IDs,
|
|
90715
91647
|
* defined sort IDs, diagnostics, compatibility notes, and the statement count.
|
|
90716
91648
|
* @throws {ApiError} If the query cannot be parsed, cannot be lowered to OSFQL, or fails to execute.
|
|
91649
|
+
* @throws {ForbiddenError} `403` when a write or delete the translated
|
|
91650
|
+
* program makes is denied; `body.error_type` names why:
|
|
91651
|
+
* `reserved_sort_write_refused`, `reserved_sort_delete_refused`,
|
|
91652
|
+
* `sort_write_not_granted`, `sort_delete_not_granted`,
|
|
91653
|
+
* `operational_authority_denied` or `operational_authority_undetermined`.
|
|
91654
|
+
* Nothing is written.
|
|
91655
|
+
* @throws {ConstraintViolationError} `409` when the program mutates governed
|
|
91656
|
+
* schema, or writes or removes a term of a `@governed` sort
|
|
91657
|
+
* (`error_type: governed_sort_write_refused`) or a derived authority
|
|
91658
|
+
* relation (`authz_relation_derived`). Nothing is written.
|
|
90717
91659
|
* @throws {ReasoningLayerError} If the server returns bindings that do not satisfy the
|
|
90718
91660
|
* published {@link PropertyGraphValue} contract.
|
|
90719
91661
|
*
|
|
@@ -90745,6 +91687,16 @@ var PropertyGraphClient = class _PropertyGraphClient {
|
|
|
90745
91687
|
* @returns Execution result: bindings, the OSFQL program that ran, produced term IDs,
|
|
90746
91688
|
* defined sort IDs, diagnostics, compatibility notes, and the statement count.
|
|
90747
91689
|
* @throws {ApiError} If the query cannot be parsed, cannot be lowered to OSFQL, or fails to execute.
|
|
91690
|
+
* @throws {ForbiddenError} `403` when a write or delete the translated
|
|
91691
|
+
* program makes is denied; `body.error_type` names why:
|
|
91692
|
+
* `reserved_sort_write_refused`, `reserved_sort_delete_refused`,
|
|
91693
|
+
* `sort_write_not_granted`, `sort_delete_not_granted`,
|
|
91694
|
+
* `operational_authority_denied` or `operational_authority_undetermined`.
|
|
91695
|
+
* Nothing is written.
|
|
91696
|
+
* @throws {ConstraintViolationError} `409` when the program mutates governed
|
|
91697
|
+
* schema, or writes or removes a term of a `@governed` sort
|
|
91698
|
+
* (`error_type: governed_sort_write_refused`) or a derived authority
|
|
91699
|
+
* relation (`authz_relation_derived`). Nothing is written.
|
|
90748
91700
|
* @throws {ReasoningLayerError} If the server returns bindings that do not satisfy the
|
|
90749
91701
|
* published {@link PropertyGraphValue} contract.
|
|
90750
91702
|
*
|
|
@@ -90776,6 +91728,16 @@ var PropertyGraphClient = class _PropertyGraphClient {
|
|
|
90776
91728
|
* @returns Execution result: bindings, the OSFQL program that ran, produced term IDs,
|
|
90777
91729
|
* defined sort IDs, diagnostics, compatibility notes, and the statement count.
|
|
90778
91730
|
* @throws {ApiError} If the traversal cannot be parsed, cannot be lowered to OSFQL, or fails to execute.
|
|
91731
|
+
* @throws {ForbiddenError} `403` when a write or delete the translated
|
|
91732
|
+
* program makes is denied; `body.error_type` names why:
|
|
91733
|
+
* `reserved_sort_write_refused`, `reserved_sort_delete_refused`,
|
|
91734
|
+
* `sort_write_not_granted`, `sort_delete_not_granted`,
|
|
91735
|
+
* `operational_authority_denied` or `operational_authority_undetermined`.
|
|
91736
|
+
* Nothing is written.
|
|
91737
|
+
* @throws {ConstraintViolationError} `409` when the program mutates governed
|
|
91738
|
+
* schema, or writes or removes a term of a `@governed` sort
|
|
91739
|
+
* (`error_type: governed_sort_write_refused`) or a derived authority
|
|
91740
|
+
* relation (`authz_relation_derived`). Nothing is written.
|
|
90779
91741
|
* @throws {ReasoningLayerError} If the server returns bindings that do not satisfy the
|
|
90780
91742
|
* published {@link PropertyGraphValue} contract.
|
|
90781
91743
|
*
|
|
@@ -91188,8 +92150,22 @@ var SparqlClient = class {
|
|
|
91188
92150
|
* @throws {InternalServerError} `502` when a `LOAD` names a source the SSRF guard
|
|
91189
92151
|
* blocks (a private or loopback address, a loopback host name such as
|
|
91190
92152
|
* `localhost`, or a refused scheme): `LOAD could not retrieve <…>`.
|
|
92153
|
+
* @throws {ForbiddenError} `403` when a term the update writes or removes is
|
|
92154
|
+
* in the reserved namespace or outside the caller's grants (`error_type`
|
|
92155
|
+
* `reserved_sort_write_refused`, `sort_write_not_granted`,
|
|
92156
|
+
* `reserved_sort_delete_refused`, `sort_delete_not_granted`).
|
|
92157
|
+
* @throws {ConstraintViolationError} `409` when a term it writes or removes
|
|
92158
|
+
* is of a `@governed` sort (`governed_sort_write_refused`) or is a derived
|
|
92159
|
+
* authority relation (`authz_relation_derived`); when its prefixes conflict
|
|
92160
|
+
* with a binding another request made meanwhile (`prefix_conflict`); or
|
|
92161
|
+
* when an IRI-valued `INSERT DATA` names a resource the caller's Read grant
|
|
92162
|
+
* hides (`term_id_unavailable`, reasoninglayer#1215).
|
|
92163
|
+
* @throws {ApiError} `422` when a term it writes wraps a constraint the
|
|
92164
|
+
* update cannot read (`error_type: filing_term_unread`).
|
|
92165
|
+
*
|
|
92166
|
+
* @remarks
|
|
92167
|
+
* A refused update applies nothing of the update (reasoninglayer#1214).
|
|
91191
92168
|
*
|
|
91192
|
-
* @remarks
|
|
91193
92169
|
* Supports `INSERT DATA` / `DELETE DATA` and `DELETE/INSERT … WHERE`; the update maps
|
|
91194
92170
|
* onto tenant-scoped OSFQL `INSERT` / `RETRACT` statements. The update text is sent as
|
|
91195
92171
|
* an `application/x-www-form-urlencoded` body (`update=…`).
|
|
@@ -91658,6 +92634,36 @@ function CheckDocumentResponseFromApiToFront(dto) {
|
|
|
91658
92634
|
function CheckPassFromApiToFront(dto) {
|
|
91659
92635
|
return { pass: dto.pass, status: dto.status, reason: dto.reason };
|
|
91660
92636
|
}
|
|
92637
|
+
function ClausePolicyProposalFromFrontToApi(model) {
|
|
92638
|
+
return {
|
|
92639
|
+
evidence_sort: model.evidenceSort,
|
|
92640
|
+
result_sort: model.resultSort,
|
|
92641
|
+
branches: model.branches.map((branch) => ({
|
|
92642
|
+
name: branch.name,
|
|
92643
|
+
effect: branch.effect,
|
|
92644
|
+
quote: branch.quote,
|
|
92645
|
+
conditions: branch.conditions.map((condition) => ({
|
|
92646
|
+
feature: condition.feature,
|
|
92647
|
+
comparison: condition.comparison,
|
|
92648
|
+
value: condition.value,
|
|
92649
|
+
quote: condition.quote
|
|
92650
|
+
}))
|
|
92651
|
+
}))
|
|
92652
|
+
};
|
|
92653
|
+
}
|
|
92654
|
+
function ClausePolicyDraftRequestFromFrontToApi(model) {
|
|
92655
|
+
return {
|
|
92656
|
+
policy: ClausePolicyProposalFromFrontToApi(model.policy),
|
|
92657
|
+
...model.supportingClauseIds !== void 0 ? { supporting_clause_ids: model.supportingClauseIds } : {}
|
|
92658
|
+
};
|
|
92659
|
+
}
|
|
92660
|
+
function ClausePolicyDraftFromApiToFront(dto) {
|
|
92661
|
+
return {
|
|
92662
|
+
sourceDocumentId: dto.source_document_id,
|
|
92663
|
+
sourceClauseId: dto.source_clause_id,
|
|
92664
|
+
rlql: dto.rlql
|
|
92665
|
+
};
|
|
92666
|
+
}
|
|
91661
92667
|
|
|
91662
92668
|
// src/resources/document-check.ts
|
|
91663
92669
|
var DocumentCheckClient = class {
|
|
@@ -91711,6 +92717,60 @@ var DocumentCheckClient = class {
|
|
|
91711
92717
|
);
|
|
91712
92718
|
return decodeResponse(response, CheckDocumentResponseFromApiToFront);
|
|
91713
92719
|
}
|
|
92720
|
+
/**
|
|
92721
|
+
* Compile a reading of one extracted clause into unpublished RLQL, without
|
|
92722
|
+
* writing any fact or rule.
|
|
92723
|
+
*
|
|
92724
|
+
* @param documentId - The source document (UUID).
|
|
92725
|
+
* @param clauseId - The extracted clause the reading interprets (UUID).
|
|
92726
|
+
* @param request - The reading (`policy`) and other clauses of the same
|
|
92727
|
+
* document revision that support it.
|
|
92728
|
+
* @param requestOptions - Per-call request options.
|
|
92729
|
+
* @returns The source-anchored draft: the document, the clause and the RLQL.
|
|
92730
|
+
* @throws {BadRequestError} `400` if the clause selection exceeds the
|
|
92731
|
+
* resolution budget.
|
|
92732
|
+
* @throws {NotFoundError} `404` if the document or the clause is unavailable.
|
|
92733
|
+
* @throws {ApiError} `422` if the reading is invalid for its sorts.
|
|
92734
|
+
* @throws {ServiceUnavailableError} `503` if the tenant hierarchy is
|
|
92735
|
+
* unavailable.
|
|
92736
|
+
*
|
|
92737
|
+
* @remarks
|
|
92738
|
+
* Sent to `POST /api/v1/documents/{document_id}/clauses/{clause_id}/policy-draft`.
|
|
92739
|
+
* Plain JSON, snake_case on the wire (`evidence_sort`, `result_sort`,
|
|
92740
|
+
* `supporting_clause_ids`); condition values are a JSON boolean or integer.
|
|
92741
|
+
* A reviewer publishes the draft through the ordinary OSFQL route, under its
|
|
92742
|
+
* own authorization; this call writes nothing.
|
|
92743
|
+
*
|
|
92744
|
+
* @example
|
|
92745
|
+
* ```typescript
|
|
92746
|
+
* const draft = await client.documentCheck.draftClausePolicy(documentId, clauseId, {
|
|
92747
|
+
* policy: {
|
|
92748
|
+
* evidenceSort: 'invoice_case',
|
|
92749
|
+
* resultSort: 'invoice_policy_result',
|
|
92750
|
+
* branches: [
|
|
92751
|
+
* {
|
|
92752
|
+
* name: 'late',
|
|
92753
|
+
* effect: 'penalty_due',
|
|
92754
|
+
* quote: 'a penalty is due',
|
|
92755
|
+
* conditions: [
|
|
92756
|
+
* { feature: 'days_late', comparison: 'gt', value: 30, quote: 'more than thirty days' },
|
|
92757
|
+
* ],
|
|
92758
|
+
* },
|
|
92759
|
+
* ],
|
|
92760
|
+
* },
|
|
92761
|
+
* });
|
|
92762
|
+
* console.log(draft.rlql);
|
|
92763
|
+
* ```
|
|
92764
|
+
*/
|
|
92765
|
+
async draftClausePolicy(documentId, clauseId, request, requestOptions) {
|
|
92766
|
+
const response = await this.api.draftClausePolicy(
|
|
92767
|
+
documentId,
|
|
92768
|
+
clauseId,
|
|
92769
|
+
ClausePolicyDraftRequestFromFrontToApi(request),
|
|
92770
|
+
toRequestParams(requestOptions)
|
|
92771
|
+
);
|
|
92772
|
+
return decodeResponse(response, ClausePolicyDraftFromApiToFront);
|
|
92773
|
+
}
|
|
91714
92774
|
};
|
|
91715
92775
|
|
|
91716
92776
|
// src/normalizers/corpus.ts
|
|
@@ -94223,7 +95283,7 @@ var AguiClient = class {
|
|
|
94223
95283
|
* writes the store is refused without an exception or a `RUN_ERROR`: the
|
|
94224
95284
|
* run emits a `CUSTOM` event named `reasoninglayer.data_load_error` whose `value` is
|
|
94225
95285
|
* `{ code, message, query }`, and the `STATE_SNAPSHOT` carries the same
|
|
94226
|
-
* object at `reasoninglayer.dataLoadError`; branch on `code`. No rows are loaded.
|
|
95286
|
+
* object at `snapshot.reasoninglayer.dataLoadError`; branch on `code`. No rows are loaded.
|
|
94227
95287
|
*
|
|
94228
95288
|
* @example
|
|
94229
95289
|
* ```typescript
|
|
@@ -94519,9 +95579,7 @@ var ArgumentationClient = class {
|
|
|
94519
95579
|
|
|
94520
95580
|
// src/normalizers/demo.ts
|
|
94521
95581
|
function DemoSeedRequestFromFrontToApi(model) {
|
|
94522
|
-
|
|
94523
|
-
if (model.sumoDir !== void 0) dto.sumo_dir = model.sumoDir;
|
|
94524
|
-
return dto;
|
|
95582
|
+
return { ...model };
|
|
94525
95583
|
}
|
|
94526
95584
|
function DemoSeedResponseFromApiToFront(dto) {
|
|
94527
95585
|
return {
|
|
@@ -94542,17 +95600,36 @@ var DemoClient = class {
|
|
|
94542
95600
|
* Seed the request tenant's persistent substrate with full SUMO + the
|
|
94543
95601
|
* demo scenario situations.
|
|
94544
95602
|
*
|
|
94545
|
-
* @param request -
|
|
95603
|
+
* @param request - The empty request body (`{}`). The request names no
|
|
95604
|
+
* SUMO directory: the engine reads its own (reasoninglayer#1229).
|
|
95605
|
+
* @param requestOptions - Per-call request options.
|
|
94546
95606
|
* @returns The imported form count and the tenant's total sort count.
|
|
94547
95607
|
*
|
|
94548
|
-
* @throws {
|
|
94549
|
-
* the
|
|
95608
|
+
* @throws {NotFoundError} `404` with `errorBodyCode(e) ===
|
|
95609
|
+
* 'demo_corpus_unavailable'` if the deployment's SUMO files cannot be
|
|
95610
|
+
* read; the answer names no server path.
|
|
95611
|
+
* @throws {ApiError} `400` if the assembled source fails to import.
|
|
95612
|
+
* @throws {GovernanceRefusedError} When the write guard refuses a fact,
|
|
95613
|
+
* individual or rule the seed writes; nothing of the seed is stored.
|
|
95614
|
+
* `403` `reserved_sort_write_refused`, `sort_write_not_granted`,
|
|
95615
|
+
* `operational_authority_denied` or `operational_authority_undetermined`;
|
|
95616
|
+
* `409` `authz_relation_derived`; `422`
|
|
95617
|
+
* `operational_rule_conclusion`, `authz_rule_shape`,
|
|
95618
|
+
* `authz_parent_of_sort_refused` or `filing_term_unread` (#1227).
|
|
95619
|
+
* @throws {VocabularyRefusedError} `409` `governed_sort_write_refused`: that
|
|
95620
|
+
* code is in the vocabulary set too, which the SDK reads first.
|
|
95621
|
+
*
|
|
95622
|
+
* @remarks
|
|
95623
|
+
* Sent to `POST /api/v1/demo/seed` with the body `{}`; the engine refuses
|
|
95624
|
+
* an unknown field with `422`.
|
|
95625
|
+
*
|
|
95626
|
+
* @example
|
|
95627
|
+
* ```typescript
|
|
95628
|
+
* const { forms, sorts } = await client.demo.seed();
|
|
95629
|
+
* ```
|
|
94550
95630
|
*/
|
|
94551
95631
|
async seed(request = {}, requestOptions) {
|
|
94552
|
-
const response = await this.api.demoSeed(
|
|
94553
|
-
DemoSeedRequestFromFrontToApi(request),
|
|
94554
|
-
toRequestParams(requestOptions)
|
|
94555
|
-
);
|
|
95632
|
+
const response = await this.api.demoSeed(DemoSeedRequestFromFrontToApi(request), toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
94556
95633
|
return decodeResponse(response, DemoSeedResponseFromApiToFront);
|
|
94557
95634
|
}
|
|
94558
95635
|
};
|
|
@@ -96860,6 +97937,19 @@ var ConnectorsClient = class {
|
|
|
96860
97937
|
};
|
|
96861
97938
|
|
|
96862
97939
|
// src/normalizers/boundary.ts
|
|
97940
|
+
var decisionCodes = [
|
|
97941
|
+
"boundary_space_invalid",
|
|
97942
|
+
"boundary_registry_unreadable",
|
|
97943
|
+
"boundary_no_caller_credential",
|
|
97944
|
+
"boundary_space_forbidden",
|
|
97945
|
+
"boundary_policy_unreadable",
|
|
97946
|
+
"boundary_entry_not_allowed",
|
|
97947
|
+
"boundary_data_class_not_allowed",
|
|
97948
|
+
"egress_denied",
|
|
97949
|
+
"boundary_needs_confirmation",
|
|
97950
|
+
"boundary_quota_exhausted",
|
|
97951
|
+
"boundary_quota_unreadable"
|
|
97952
|
+
];
|
|
96863
97953
|
var privacyModes = ["off", "user", "required"];
|
|
96864
97954
|
function mapEntries(record3, map) {
|
|
96865
97955
|
return Object.fromEntries(
|
|
@@ -96870,7 +97960,9 @@ function mapEntries(record3, map) {
|
|
|
96870
97960
|
);
|
|
96871
97961
|
}
|
|
96872
97962
|
function grantFromApi(dto) {
|
|
96873
|
-
const grant = {
|
|
97963
|
+
const grant = {
|
|
97964
|
+
...dto.sites === void 0 ? {} : { sites: dto.sites }
|
|
97965
|
+
};
|
|
96874
97966
|
if (dto.data_classes !== void 0)
|
|
96875
97967
|
grant.dataClasses = dto.data_classes === null ? null : wireStringArray(dto.data_classes, "data_classes");
|
|
96876
97968
|
if (dto.confirm_each_use !== void 0)
|
|
@@ -96894,6 +97986,7 @@ function BoundaryPolicyFromFrontToApi(policy) {
|
|
|
96894
97986
|
if (policy.allowed !== void 0)
|
|
96895
97987
|
out.allowed = mapEntries(policy.allowed, (grant) => {
|
|
96896
97988
|
const wire = {};
|
|
97989
|
+
if (grant.sites !== void 0) wire.sites = grant.sites;
|
|
96897
97990
|
if (grant.dataClasses !== void 0) wire.data_classes = grant.dataClasses;
|
|
96898
97991
|
if (grant.confirmEachUse !== void 0) wire.confirm_each_use = grant.confirmEachUse;
|
|
96899
97992
|
if (grant.outboundPrivacy !== void 0) wire.outbound_privacy = grant.outboundPrivacy;
|
|
@@ -96914,6 +98007,10 @@ function EffectiveBoundaryFromApiToFront(dto) {
|
|
|
96914
98007
|
spaceId: wireString(dto.space_id, "space_id"),
|
|
96915
98008
|
registryApplied: wireBoolean(dto.registry_applied, "registry_applied"),
|
|
96916
98009
|
entries: mapEntries(dto.entries, (entry2) => ({
|
|
98010
|
+
badge: entry2.badge,
|
|
98011
|
+
...entry2.kind === void 0 ? {} : { kind: entry2.kind },
|
|
98012
|
+
...entry2.name === void 0 ? {} : { name: entry2.name },
|
|
98013
|
+
sites: entry2.sites,
|
|
96917
98014
|
dataClasses: wireStringArray(entry2.data_classes, "data_classes"),
|
|
96918
98015
|
confirmEachUse: wireBoolean(entry2.confirm_each_use, "confirm_each_use"),
|
|
96919
98016
|
outboundPrivacy: mapEntries(
|
|
@@ -96964,6 +98061,43 @@ function SiteRequestFiledFromApiToFront(dto) {
|
|
|
96964
98061
|
function SiteRequestListFromApiToFront(dto) {
|
|
96965
98062
|
return dto.items.map(SiteRequestFromApiToFront);
|
|
96966
98063
|
}
|
|
98064
|
+
function BoundaryDecideRequestFromFrontToApi(request) {
|
|
98065
|
+
return {
|
|
98066
|
+
entry_id: request.entryId,
|
|
98067
|
+
...request.spaceId === void 0 ? {} : { space_id: request.spaceId },
|
|
98068
|
+
...request.dataClass === void 0 ? {} : { data_class: request.dataClass },
|
|
98069
|
+
...request.targetHost === void 0 ? {} : { target_host: request.targetHost },
|
|
98070
|
+
...request.confirmed === void 0 ? {} : { confirmed: request.confirmed }
|
|
98071
|
+
};
|
|
98072
|
+
}
|
|
98073
|
+
function BoundaryDecisionFromApiToFront(dto) {
|
|
98074
|
+
const decision = {
|
|
98075
|
+
verdict: wireLiteral(dto.verdict, ["allowed", "confirm", "blocked"], "verdict"),
|
|
98076
|
+
sanitise: wireBoolean(dto.sanitise, "sanitise")
|
|
98077
|
+
};
|
|
98078
|
+
if (dto.code !== void 0)
|
|
98079
|
+
decision.code = dto.code === null ? null : wireLiteral(dto.code, decisionCodes, "code");
|
|
98080
|
+
if (dto.rule !== void 0)
|
|
98081
|
+
decision.rule = dto.rule === null ? null : wireLiteral(dto.rule, ["not_allowed_in_space", "blocked_in_space"], "rule");
|
|
98082
|
+
if (dto.badge !== void 0)
|
|
98083
|
+
decision.badge = dto.badge === null ? null : wireLiteral(dto.badge, ["on_box", "external"], "badge");
|
|
98084
|
+
if (dto.kind !== void 0)
|
|
98085
|
+
decision.kind = dto.kind === null ? null : wireString(dto.kind, "kind");
|
|
98086
|
+
if (dto.name !== void 0)
|
|
98087
|
+
decision.name = dto.name === null ? null : wireString(dto.name, "name");
|
|
98088
|
+
if (dto.quota !== void 0)
|
|
98089
|
+
decision.quota = dto.quota === null ? null : {
|
|
98090
|
+
limit: wireNumber(dto.quota.limit, "quota.limit"),
|
|
98091
|
+
used: wireNumber(dto.quota.used, "quota.used"),
|
|
98092
|
+
resetsAt: wireString(dto.quota.resets_at, "quota.resets_at")
|
|
98093
|
+
};
|
|
98094
|
+
if (dto.sites !== void 0)
|
|
98095
|
+
decision.sites = dto.sites === null ? null : {
|
|
98096
|
+
allow: wireStringArray(dto.sites.allow, "sites.allow"),
|
|
98097
|
+
block: wireStringArray(dto.sites.block, "sites.block")
|
|
98098
|
+
};
|
|
98099
|
+
return decision;
|
|
98100
|
+
}
|
|
96967
98101
|
|
|
96968
98102
|
// src/resources/boundary.ts
|
|
96969
98103
|
var BoundaryClient = class {
|
|
@@ -96972,6 +98106,23 @@ var BoundaryClient = class {
|
|
|
96972
98106
|
this.api = api;
|
|
96973
98107
|
}
|
|
96974
98108
|
api;
|
|
98109
|
+
/** Ask the engine to decide one outbound call.
|
|
98110
|
+
* @param request - The registry entry and circumstances of this call.
|
|
98111
|
+
* @param requestOptions - Per-call cancellation, timeout and request options.
|
|
98112
|
+
* @returns The engine's verdict and any associated restrictions, reason and quota.
|
|
98113
|
+
* @throws {ApiError} When the HTTP request fails.
|
|
98114
|
+
* @throws {ResponseShapeError} When the decision cannot be decoded.
|
|
98115
|
+
* @remarks Sends snake_case JSON to `POST /api/v1/boundary/decide`.
|
|
98116
|
+
* The engine can count an admitted call against the entry's daily quota.
|
|
98117
|
+
* @example const decision = await client.boundary.decide({ entryId: 'web-search' });
|
|
98118
|
+
*/
|
|
98119
|
+
async decide(request, requestOptions) {
|
|
98120
|
+
const response = await this.api.postDecide(
|
|
98121
|
+
BoundaryDecideRequestFromFrontToApi(request),
|
|
98122
|
+
toRequestParams(requestOptions)
|
|
98123
|
+
);
|
|
98124
|
+
return decodeResponse(response, BoundaryDecisionFromApiToFront);
|
|
98125
|
+
}
|
|
96975
98126
|
/** Read the effective restrictions computed by the engine.
|
|
96976
98127
|
* @param spaceId - Project/space identifier, or `*` for the admin cap.
|
|
96977
98128
|
* @param requestOptions - Per-call cancellation, timeout and request options.
|
|
@@ -98531,6 +99682,228 @@ var TextClient = class {
|
|
|
98531
99682
|
}
|
|
98532
99683
|
};
|
|
98533
99684
|
|
|
99685
|
+
// src/normalizers/browser-agent.ts
|
|
99686
|
+
function opaqueAction(action) {
|
|
99687
|
+
return Object.fromEntries(Object.entries(action));
|
|
99688
|
+
}
|
|
99689
|
+
function BrowserLinkFromFrontToApi(model) {
|
|
99690
|
+
return { ref_id: model.refId, label: model.label, url: model.url };
|
|
99691
|
+
}
|
|
99692
|
+
function BrowserTabFromFrontToApi(model) {
|
|
99693
|
+
return {
|
|
99694
|
+
tab_id: model.tabId,
|
|
99695
|
+
...model.current !== void 0 ? { current: model.current } : {},
|
|
99696
|
+
...model.openedByAgent !== void 0 ? { opened_by_agent: model.openedByAgent } : {},
|
|
99697
|
+
...model.title !== void 0 ? { title: model.title } : {},
|
|
99698
|
+
...model.url !== void 0 ? { url: model.url } : {}
|
|
99699
|
+
};
|
|
99700
|
+
}
|
|
99701
|
+
function BrowserStepRequestFromFrontToApi(model) {
|
|
99702
|
+
return {
|
|
99703
|
+
task: model.task,
|
|
99704
|
+
url: model.url,
|
|
99705
|
+
dom_snapshot: model.domSnapshot,
|
|
99706
|
+
...model.title !== void 0 ? { title: model.title } : {},
|
|
99707
|
+
...model.history !== void 0 ? { history: model.history } : {},
|
|
99708
|
+
...model.marks !== void 0 ? { marks: model.marks } : {},
|
|
99709
|
+
...model.maxTokens !== void 0 ? { max_tokens: model.maxTokens } : {},
|
|
99710
|
+
...model.memory !== void 0 ? { memory: model.memory } : {},
|
|
99711
|
+
...model.navigationLinks !== void 0 ? {
|
|
99712
|
+
navigation_links: model.navigationLinks === null ? null : model.navigationLinks.map(BrowserLinkFromFrontToApi)
|
|
99713
|
+
} : {},
|
|
99714
|
+
...model.screenshot !== void 0 ? { screenshot: model.screenshot } : {},
|
|
99715
|
+
...model.tabs !== void 0 ? { tabs: model.tabs.map(BrowserTabFromFrontToApi) } : {}
|
|
99716
|
+
};
|
|
99717
|
+
}
|
|
99718
|
+
function BrowserStepResponseFromApiToFront(dto) {
|
|
99719
|
+
return {
|
|
99720
|
+
evaluationPreviousGoal: dto.evaluation_previous_goal,
|
|
99721
|
+
memory: dto.memory,
|
|
99722
|
+
nextGoal: dto.next_goal,
|
|
99723
|
+
actions: dto.actions.map(opaqueAction)
|
|
99724
|
+
};
|
|
99725
|
+
}
|
|
99726
|
+
function BrowserRunRequestFromFrontToApi(model) {
|
|
99727
|
+
switch (model.operation) {
|
|
99728
|
+
case "start":
|
|
99729
|
+
return { operation: "start", task: model.task, browser_session: model.browserSession };
|
|
99730
|
+
case "inspect":
|
|
99731
|
+
return { operation: "inspect" };
|
|
99732
|
+
case "observe":
|
|
99733
|
+
return {
|
|
99734
|
+
operation: "observe",
|
|
99735
|
+
revision: model.revision,
|
|
99736
|
+
observation: BrowserStepRequestFromFrontToApi(model.observation)
|
|
99737
|
+
};
|
|
99738
|
+
case "authorize":
|
|
99739
|
+
return { operation: "authorize", revision: model.revision, command: model.command };
|
|
99740
|
+
case "discard":
|
|
99741
|
+
return { operation: "discard", revision: model.revision, command: model.command };
|
|
99742
|
+
case "receipt":
|
|
99743
|
+
return {
|
|
99744
|
+
operation: "receipt",
|
|
99745
|
+
command: model.command,
|
|
99746
|
+
outcome: {
|
|
99747
|
+
ok: model.outcome.ok,
|
|
99748
|
+
...model.outcome.observation !== void 0 ? { observation: model.outcome.observation } : {}
|
|
99749
|
+
}
|
|
99750
|
+
};
|
|
99751
|
+
case "resolve":
|
|
99752
|
+
return { operation: "resolve", command: model.command, outcome: model.outcome };
|
|
99753
|
+
case "cancel":
|
|
99754
|
+
return { operation: "cancel", revision: model.revision };
|
|
99755
|
+
}
|
|
99756
|
+
}
|
|
99757
|
+
function BrowserRunViewFromApiToFront(dto) {
|
|
99758
|
+
return {
|
|
99759
|
+
id: dto.id,
|
|
99760
|
+
browserSession: dto.browser_session,
|
|
99761
|
+
task: dto.task,
|
|
99762
|
+
phase: dto.phase,
|
|
99763
|
+
revision: dto.revision,
|
|
99764
|
+
step: dto.step,
|
|
99765
|
+
pending: dto.pending == null ? null : { command: dto.pending.command, name: dto.pending.name, intent: dto.pending.intent },
|
|
99766
|
+
result: dto.result == null ? null : { success: dto.result.success, text: dto.result.text }
|
|
99767
|
+
};
|
|
99768
|
+
}
|
|
99769
|
+
function BrowserRunResponseFromApiToFront(dto) {
|
|
99770
|
+
return {
|
|
99771
|
+
...BrowserRunViewFromApiToFront(dto),
|
|
99772
|
+
proposal: dto.proposal == null ? null : { id: dto.proposal.id, action: opaqueAction(dto.proposal.action) },
|
|
99773
|
+
authorized: dto.authorized ?? null
|
|
99774
|
+
};
|
|
99775
|
+
}
|
|
99776
|
+
|
|
99777
|
+
// src/resources/browser-agent.ts
|
|
99778
|
+
var BrowserAgentClient = class {
|
|
99779
|
+
/** @internal */
|
|
99780
|
+
api;
|
|
99781
|
+
/** @internal */
|
|
99782
|
+
constructor(api) {
|
|
99783
|
+
this.api = api;
|
|
99784
|
+
}
|
|
99785
|
+
/**
|
|
99786
|
+
* Decide the next browser actions for the current page state.
|
|
99787
|
+
*
|
|
99788
|
+
* @param request - The task and the page state (`domSnapshot`, `url`, tabs,
|
|
99789
|
+
* optional screenshot and marks).
|
|
99790
|
+
* @param requestOptions - Per-call request options.
|
|
99791
|
+
* @returns The evaluation of the previous goal, the planner's note, the next
|
|
99792
|
+
* goal and the ordered actions (verbatim).
|
|
99793
|
+
* @throws {BadRequestError} `400` for an empty task, or a body that is not JSON.
|
|
99794
|
+
* @throws {ApiError} `422` if the model returned no parseable step.
|
|
99795
|
+
* @throws {InternalServerError} `502` `llm_provider_failed`: the model's provider failed.
|
|
99796
|
+
* @throws {ServiceUnavailableError} `503` `llm_unconfigured`: no text model is configured.
|
|
99797
|
+
*
|
|
99798
|
+
* @remarks
|
|
99799
|
+
* Sent to `POST /api/v1/agent/browser-step`, snake_case on the wire
|
|
99800
|
+
* (`dom_snapshot`, `navigation_links`, `max_tokens`). Visual grounding is
|
|
99801
|
+
* best-effort: without a screenshot or a vision port the step reads the
|
|
99802
|
+
* element tree alone. The engine keeps nothing between steps: carry
|
|
99803
|
+
* `memory` and `history` forward yourself.
|
|
99804
|
+
*
|
|
99805
|
+
* @example
|
|
99806
|
+
* ```typescript
|
|
99807
|
+
* const step = await client.browserAgent.step({
|
|
99808
|
+
* task: 'Find the pricing page',
|
|
99809
|
+
* url: 'https://example.com',
|
|
99810
|
+
* domSnapshot: '[e1]<a href="/pricing">Pricing</a>',
|
|
99811
|
+
* });
|
|
99812
|
+
* console.log(step.nextGoal, step.actions);
|
|
99813
|
+
* ```
|
|
99814
|
+
*/
|
|
99815
|
+
async step(request, requestOptions) {
|
|
99816
|
+
const response = await this.api.agentBrowserStep(
|
|
99817
|
+
BrowserStepRequestFromFrontToApi(request),
|
|
99818
|
+
toRequestParams(requestOptions)
|
|
99819
|
+
);
|
|
99820
|
+
return decodeResponse(response, BrowserStepResponseFromApiToFront);
|
|
99821
|
+
}
|
|
99822
|
+
/**
|
|
99823
|
+
* List the signed-in person's resumable browser runs.
|
|
99824
|
+
*
|
|
99825
|
+
* @param requestOptions - Per-call request options.
|
|
99826
|
+
* @returns At most 50 runs, each `ready`, `proposed` or `in_flight`.
|
|
99827
|
+
* @throws {GovernanceRefusedError} `403` `browser_run_person_required` (the
|
|
99828
|
+
* caller is not a signed-in person) or `browser_run_access_denied`; `503`
|
|
99829
|
+
* `workflow_authority_unconfigured`, `browser_authority_unavailable` or
|
|
99830
|
+
* `browser_run_store_unavailable`.
|
|
99831
|
+
*
|
|
99832
|
+
* @remarks
|
|
99833
|
+
* Sent to `GET /api/v1/agent/browser-runs`; snake_case wire fields
|
|
99834
|
+
* (`browser_session`) are mapped to camelCase.
|
|
99835
|
+
*
|
|
99836
|
+
* @example
|
|
99837
|
+
* ```typescript
|
|
99838
|
+
* const runs = await client.browserAgent.listRuns();
|
|
99839
|
+
* for (const run of runs) console.log(run.id, run.phase);
|
|
99840
|
+
* ```
|
|
99841
|
+
*/
|
|
99842
|
+
async listRuns(requestOptions) {
|
|
99843
|
+
const response = await this.api.listBrowserAgentRuns(toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
99844
|
+
return decodeResponse(response, (runs) => runs.map(BrowserRunViewFromApiToFront));
|
|
99845
|
+
}
|
|
99846
|
+
/**
|
|
99847
|
+
* Run one operation on a browser run: `start`, `inspect`, `observe`,
|
|
99848
|
+
* `authorize`, `discard`, `receipt`, `resolve` or `cancel`.
|
|
99849
|
+
*
|
|
99850
|
+
* @param runId - The person's browser run id (UUID). A `start` names a new one.
|
|
99851
|
+
* @param request - The operation, discriminated by `operation`.
|
|
99852
|
+
* @param requestOptions - Per-call request options.
|
|
99853
|
+
* @returns The run, with `proposal` set only in the answer to the `observe`
|
|
99854
|
+
* that proposed an action, and `authorized` set only in the answer to the
|
|
99855
|
+
* `authorize` that won the command.
|
|
99856
|
+
* @throws {GovernanceRefusedError} `400` `browser_run_task_invalid` or
|
|
99857
|
+
* `browser_observation_out_of_bounds`; `403`
|
|
99858
|
+
* `browser_run_person_required` or `browser_run_access_denied`; `404`
|
|
99859
|
+
* `browser_run_not_found`; `409` `browser_run_conflict` (a stale revision,
|
|
99860
|
+
* a `start` that names another task or browser session, or a pending
|
|
99861
|
+
* action that needs reconciliation); `502` `llm_provider_failed`; `503`
|
|
99862
|
+
* `workflow_authority_unconfigured`, `browser_authority_unavailable`,
|
|
99863
|
+
* `browser_run_store_unavailable` or `llm_unconfigured`.
|
|
99864
|
+
* @throws {VocabularyRefusedError} `400` or `422` `invalid_request`: that
|
|
99865
|
+
* code is in the vocabulary set too, which the SDK reads first.
|
|
99866
|
+
* @throws {ApiError} `423` if the tenant's emergency stop is engaged (no
|
|
99867
|
+
* `code`); `503` without a `code` if the emergency stop could not be read.
|
|
99868
|
+
*
|
|
99869
|
+
* @remarks
|
|
99870
|
+
* Sent to `POST /api/v1/agent/browser-runs/{run_id}`, snake_case on the
|
|
99871
|
+
* wire (`browser_session`, the observation's `dom_snapshot`). The grant is
|
|
99872
|
+
* one-time: the run keeps the action's name and intent, never its
|
|
99873
|
+
* arguments, so read `proposal.action` from the `observe` answer.
|
|
99874
|
+
*
|
|
99875
|
+
* @example
|
|
99876
|
+
* ```typescript
|
|
99877
|
+
* let run = await client.browserAgent.operateRun(runId, {
|
|
99878
|
+
* operation: 'start',
|
|
99879
|
+
* task: 'Find the pricing page',
|
|
99880
|
+
* browserSession: sessionId,
|
|
99881
|
+
* });
|
|
99882
|
+
* run = await client.browserAgent.operateRun(runId, {
|
|
99883
|
+
* operation: 'observe',
|
|
99884
|
+
* revision: run.revision,
|
|
99885
|
+
* observation: { task: run.task, url, domSnapshot },
|
|
99886
|
+
* });
|
|
99887
|
+
* if (run.proposal !== null) {
|
|
99888
|
+
* const granted = await client.browserAgent.operateRun(runId, {
|
|
99889
|
+
* operation: 'authorize',
|
|
99890
|
+
* revision: run.revision,
|
|
99891
|
+
* command: run.proposal.id,
|
|
99892
|
+
* });
|
|
99893
|
+
* console.log(granted.authorized);
|
|
99894
|
+
* }
|
|
99895
|
+
* ```
|
|
99896
|
+
*/
|
|
99897
|
+
async operateRun(runId, request, requestOptions) {
|
|
99898
|
+
const response = await this.api.browserAgentRun(
|
|
99899
|
+
runId,
|
|
99900
|
+
BrowserRunRequestFromFrontToApi(request),
|
|
99901
|
+
toRequestParams(requestOptions)
|
|
99902
|
+
).catch(rethrowVocabularyRefusal);
|
|
99903
|
+
return decodeResponse(response, BrowserRunResponseFromApiToFront);
|
|
99904
|
+
}
|
|
99905
|
+
};
|
|
99906
|
+
|
|
98534
99907
|
// src/normalizers/platform.ts
|
|
98535
99908
|
function CreateBackupRequestFromFrontToApi(model) {
|
|
98536
99909
|
const out = {
|
|
@@ -103087,6 +104460,8 @@ var ReasoningLayerClient = class {
|
|
|
103087
104460
|
platform;
|
|
103088
104461
|
/** Text editing with the engine's text model: proofread and rewrite. */
|
|
103089
104462
|
text;
|
|
104463
|
+
/** The browser agent: planning steps and the browser runs the engine keeps for a person. */
|
|
104464
|
+
browserAgent;
|
|
103090
104465
|
/**
|
|
103091
104466
|
* Runtime native (WASM) plugins — register, list, enable, disable, delete.
|
|
103092
104467
|
* Restricted to the platform provisioning identity.
|
|
@@ -103519,6 +104894,7 @@ var ReasoningLayerClient = class {
|
|
|
103519
104894
|
encodePathParams(new Skills(generatedHttp))
|
|
103520
104895
|
);
|
|
103521
104896
|
this.text = new TextClient(encodePathParams(new Text(generatedHttp)));
|
|
104897
|
+
this.browserAgent = new BrowserAgentClient(encodePathParams(new Agent(generatedHttp)));
|
|
103522
104898
|
this.plugins = new PluginsClient(encodePathParams(new Plugins(generatedHttp)));
|
|
103523
104899
|
this.memory = new MemoryClient(encodePathParams(new Memory(generatedHttp)));
|
|
103524
104900
|
}
|
|
@@ -103870,6 +105246,9 @@ var skill_scripts_exports = {};
|
|
|
103870
105246
|
// src/types/text-editing.ts
|
|
103871
105247
|
var text_editing_exports = {};
|
|
103872
105248
|
|
|
105249
|
+
// src/types/browser-agent.ts
|
|
105250
|
+
var browser_agent_exports = {};
|
|
105251
|
+
|
|
103873
105252
|
// src/types/frame-authoring.ts
|
|
103874
105253
|
var frame_authoring_exports = {};
|
|
103875
105254
|
|
|
@@ -106713,6 +108092,7 @@ exports.BadRequestError = BadRequestError;
|
|
|
106713
108092
|
exports.Batch = batch_exports;
|
|
106714
108093
|
exports.Boundary = boundary_exports;
|
|
106715
108094
|
exports.BoundaryClient = BoundaryClient;
|
|
108095
|
+
exports.BrowserAgent = browser_agent_exports;
|
|
106716
108096
|
exports.BrowserPhoneRehearsal = BrowserPhoneRehearsal;
|
|
106717
108097
|
exports.BrowserSpeechAudio = BrowserSpeechAudio;
|
|
106718
108098
|
exports.BrowserSpeechOutput = BrowserSpeechOutput;
|