@kortexya/reasoninglayer 16.0.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.
Files changed (6) hide show
  1. package/README.md +15 -0
  2. package/dist/index.cjs +3342 -181
  3. package/dist/index.d.cts +21684 -16900
  4. package/dist/index.d.ts +21684 -16900
  5. package/dist/index.js +3337 -182
  6. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ var __export = (target, all) => {
5
5
  };
6
6
 
7
7
  // src/config.ts
8
- var SDK_VERSION = "16.0.0";
8
+ var SDK_VERSION = "17.0.0";
9
9
  function checkTimeoutMs(value, where) {
10
10
  if (!Number.isFinite(value) || value < 0) {
11
11
  throw new Error(
@@ -89,6 +89,8 @@ var ReasoningLayerError = class extends Error {
89
89
  };
90
90
  var ApiError = class extends ReasoningLayerError {
91
91
  name = "ApiError";
92
+ /** Health component that produced a structured refusal. */
93
+ component;
92
94
  /** HTTP status code. */
93
95
  status;
94
96
  /** Backend error code (from response body `error` field), if present. */
@@ -99,6 +101,7 @@ var ApiError = class extends ReasoningLayerError {
99
101
  headers;
100
102
  constructor(message, status, body, headers, errorCode) {
101
103
  super(message);
104
+ this.component = isRecord(body) && typeof body.component === "string" ? body.component : void 0;
102
105
  this.status = status;
103
106
  this.body = body;
104
107
  this.headers = headers;
@@ -2389,6 +2392,34 @@ var RESPONSE_COMPONENTS = {
2389
2392
  object: { message: [1, 0], message_ids: [1, { array: 0 }], recipients_count: [1, 0] }
2390
2393
  },
2391
2394
  BrowserReadCommand: { object: { command_id: [1, 0], origin: [1, 0], session_id: [1, 0] } },
2395
+ BrowserRunPendingAction: { object: { command: [1, 0], intent: [1, 0], name: [1, 0] } },
2396
+ BrowserRunProposal: { object: { action: [1, { object: {} }], id: [1, 0] } },
2397
+ BrowserRunResponse: {
2398
+ object: {
2399
+ browser_session: [1, 0],
2400
+ id: [1, 0],
2401
+ pending: [2, "BrowserRunPendingAction"],
2402
+ phase: [1, 0],
2403
+ result: [2, "BrowserRunResult"],
2404
+ revision: [1, 0],
2405
+ step: [1, 0],
2406
+ task: [1, 0],
2407
+ proposal: [2, "BrowserRunProposal"]
2408
+ }
2409
+ },
2410
+ BrowserRunResult: { object: { success: [1, 0], text: [1, 0] } },
2411
+ BrowserRunView: {
2412
+ object: {
2413
+ browser_session: [1, 0],
2414
+ id: [1, 0],
2415
+ pending: [2, "BrowserRunPendingAction"],
2416
+ phase: [1, 0],
2417
+ result: [2, "BrowserRunResult"],
2418
+ revision: [1, 0],
2419
+ step: [1, 0],
2420
+ task: [1, 0]
2421
+ }
2422
+ },
2392
2423
  BrowserStepResponse: {
2393
2424
  object: {
2394
2425
  actions: [1, { array: { object: {} } }],
@@ -2905,6 +2936,18 @@ var RESPONSE_COMPONENTS = {
2905
2936
  }
2906
2937
  },
2907
2938
  ClaimAssessmentDto: { object: { content: [1, 0], subtype: [1, 0], verdict: [1, 0] } },
2939
+ ClaimAttestationDto: { object: { at: [1, 0], by: [1, 0], kind: [1, 0] } },
2940
+ ClaimAttestationResponseDto: {
2941
+ object: {
2942
+ attestation_id: [1, 0],
2943
+ attested_at: [1, 0],
2944
+ attested_by: [1, 0],
2945
+ conversation_id: [1, 0],
2946
+ kind: [1, 0],
2947
+ point_ref: [1, 0],
2948
+ turn_id: [1, 0]
2949
+ }
2950
+ },
2908
2951
  ClaimProvenanceDto: {
2909
2952
  object: { source_scope: [1, 0], source_sort: [1, 0], source_term_id: [1, 0] }
2910
2953
  },
@@ -2952,6 +2995,9 @@ var RESPONSE_COMPONENTS = {
2952
2995
  question_probabilities: [1, { object: {} }]
2953
2996
  }
2954
2997
  },
2998
+ ClausePolicyDraftDto: {
2999
+ object: { rlql: [1, 0], source_clause_id: [1, 0], source_document_id: [1, 0] }
3000
+ },
2955
3001
  CleanupResponse: {
2956
3002
  object: {
2957
3003
  cleaned_curried_functions: [1, 0],
@@ -3868,8 +3914,12 @@ var RESPONSE_COMPONENTS = {
3868
3914
  reasoning_trace: [2, "ReasoningTraceDto"],
3869
3915
  stripped_claims: [0, { array: "StrippedClaimDto" }],
3870
3916
  suggestions: [1, { array: 0 }],
3917
+ to_verify: [0, { array: "ToVerifyPointDto" }],
3871
3918
  turn_id: [1, 0],
3872
- ui_customizations: [2, { array: "UICustomizationDto" }]
3919
+ ui_customizations: [2, { array: "UICustomizationDto" }],
3920
+ unconfirmed: [0, { array: "UnconfirmedRecordDto" }],
3921
+ unread_pages: [0, { array: "UnreadPagesDto" }],
3922
+ web_sources: [0, { array: "WebSourceDto" }]
3873
3923
  }
3874
3924
  },
3875
3925
  ConversationNextQuestionDto: { object: { claim_index: [1, 0], kind: [1, 0] } },
@@ -4055,7 +4105,13 @@ var RESPONSE_COMPONENTS = {
4055
4105
  },
4056
4106
  CreateModuleResponse: { object: { module_name: [1, 0], success: [1, 0] } },
4057
4107
  CreateResearchSessionResponse: {
4058
- object: { created_at: [1, 0], question: [1, 0], session_id: [1, 0], status: [1, 0] }
4108
+ object: {
4109
+ created_at: [1, 0],
4110
+ knowledge_base_tenant_id: [1, 0],
4111
+ question: [1, 0],
4112
+ session_id: [1, 0],
4113
+ status: [1, 0]
4114
+ }
4059
4115
  },
4060
4116
  CreateSessionResponse: { object: { created_at: [1, 0], session_id: [1, 0], status: [1, 0] } },
4061
4117
  CreateSubscriptionResponse: { object: { subscription_id: [1, 0] } },
@@ -4290,6 +4346,9 @@ var RESPONSE_COMPONENTS = {
4290
4346
  verified_count: [1, 0]
4291
4347
  }
4292
4348
  },
4349
+ Decision: {
4350
+ object: { quota: [2, "QuotaView"], sanitise: [1, 0], sites: [2, "Sites"], verdict: [1, 0] }
4351
+ },
4293
4352
  DecisionAuditResponse: {
4294
4353
  object: {
4295
4354
  acts: [1, { array: "ActValueDto" }],
@@ -4898,6 +4957,7 @@ var RESPONSE_COMPONENTS = {
4898
4957
  sort_names: [1, { array: 0 }],
4899
4958
  term_ids: [1, { array: 0 }],
4900
4959
  total_tokens: [1, 0],
4960
+ value_pass: [2, "IngestionValuePassDto"],
4901
4961
  work_cache: [2, "IngestionWorkCacheDto"]
4902
4962
  }
4903
4963
  },
@@ -5148,6 +5208,8 @@ var RESPONSE_COMPONENTS = {
5148
5208
  boot_id: [1, 0],
5149
5209
  build_info: [1, "BuildInfoDto"],
5150
5210
  components: [1, { array: "ComponentHealthDto" }],
5211
+ holds_unproven_text: [1, 0],
5212
+ live_recording: [1, 0],
5151
5213
  sovereign: [1, 0],
5152
5214
  started_at: [1, 0],
5153
5215
  status: [1, 0],
@@ -5375,6 +5437,7 @@ var RESPONSE_COMPONENTS = {
5375
5437
  },
5376
5438
  ExecuteTranspiledResponse: {
5377
5439
  object: {
5440
+ completeness: [1, 0],
5378
5441
  dialect: [1, 0],
5379
5442
  query: [1, 0],
5380
5443
  row_count: [1, 0],
@@ -5853,8 +5916,34 @@ var RESPONSE_COMPONENTS = {
5853
5916
  term_id: [1, 0]
5854
5917
  }
5855
5918
  },
5919
+ FindGroup: { object: { items: [1, { array: "FindHit" }], kind: [1, 0] } },
5920
+ FindHit: {
5921
+ object: {
5922
+ at: [1, "FindPlace"],
5923
+ id: [1, 0],
5924
+ marks: [1, { array: { array: 0 } }],
5925
+ people: [1, { array: 0 }],
5926
+ reading: [1, 0],
5927
+ snippet: [1, 0],
5928
+ sort: [1, 0],
5929
+ source: [1, "FindSource"],
5930
+ title: [1, 0]
5931
+ }
5932
+ },
5933
+ FindNotSearched: { object: { reason: [1, 0], unread_pages: [0, { array: 0 }] } },
5934
+ FindPlace: { object: {} },
5856
5935
  FindPlansResponse: { object: { count: [1, 0], plans: [1, { array: "PlanMatchDto" }] } },
5936
+ FindResponse: {
5937
+ object: {
5938
+ groups: [1, { array: "FindGroup" }],
5939
+ not_searched: [1, { array: "FindNotSearched" }],
5940
+ query: [1, 0],
5941
+ searched: [1, { array: "FindSearched" }]
5942
+ }
5943
+ },
5857
5944
  FindRulesResponse: { object: { matching_rules: [1, { array: "RuleDto" }] } },
5945
+ FindSearched: { object: { live: [1, 0], source: [1, 0] } },
5946
+ FindSource: { object: {} },
5858
5947
  FindingContextDto: {
5859
5948
  object: { related_record_ids: [1, { array: 0 }], roles: [1, { array: 0 }] }
5860
5949
  },
@@ -6307,6 +6396,7 @@ var RESPONSE_COMPONENTS = {
6307
6396
  created_at: [1, 0],
6308
6397
  cycles: [1, { array: "ResearchCycleResultDto" }],
6309
6398
  gap_check: [2, "GapCheck"],
6399
+ knowledge_base_tenant_id: [1, 0],
6310
6400
  papers: [1, { array: "PaperMetadataDto" }],
6311
6401
  question: [1, 0],
6312
6402
  session_id: [1, 0],
@@ -7031,6 +7121,9 @@ var RESPONSE_COMPONENTS = {
7031
7121
  work_cache: [0, "IngestionWorkCacheDto"]
7032
7122
  }
7033
7123
  },
7124
+ IngestionValuePassDto: {
7125
+ object: { passages_not_read: [1, 0], values_held: [1, 0], values_read: [1, 0] }
7126
+ },
7034
7127
  IngestionWorkCacheDto: {
7035
7128
  object: {
7036
7129
  model_calls: [1, 0],
@@ -7774,6 +7867,16 @@ var RESPONSE_COMPONENTS = {
7774
7867
  }
7775
7868
  },
7776
7869
  LiveDocVersionsResponse: { object: { versions: [1, { array: "LiveDocVersionDto" }] } },
7870
+ LiveRecordingView: {
7871
+ object: {
7872
+ bytes: [1, 0],
7873
+ duration_secs: [1, 0],
7874
+ finals: [1, { array: { object: {} } }],
7875
+ id: [1, 0],
7876
+ result: [2, "IngestAudioResponse"],
7877
+ state: [1, 0]
7878
+ }
7879
+ },
7777
7880
  LlmContextFeatureDto: { object: { name: [1, 0], required: [1, 0] } },
7778
7881
  LlmContextPreferenceDto: { object: { key: [1, 0], value: [1, 0] } },
7779
7882
  LlmContextSortDto: {
@@ -9763,6 +9866,17 @@ var RESPONSE_COMPONENTS = {
9763
9866
  worker_count: [1, 0]
9764
9867
  }
9765
9868
  },
9869
+ QueuedVideoIngestResponse: {
9870
+ object: {
9871
+ document_id: [1, 0],
9872
+ session_id: [1, 0],
9873
+ status: [1, 0],
9874
+ status_url: [1, 0],
9875
+ original_files: [1, { array: "RetainedOriginal" }],
9876
+ source_text: [1, 0]
9877
+ }
9878
+ },
9879
+ QuotaView: { object: { limit: [1, 0], resets_at: [1, 0], used: [1, 0] } },
9766
9880
  QuotientClass: { object: { alpha: [1, 0], size: [1, 0], sort_ids: [1, { array: 0 }] } },
9767
9881
  QuotientOrderEdge: { object: { degree: [1, 0], from: [1, 0], to: [1, 0] } },
9768
9882
  RangeDto: { object: { feature: [1, 0], lower: [1, "SideDto"], upper: [1, "SideDto"] } },
@@ -9837,6 +9951,7 @@ var RESPONSE_COMPONENTS = {
9837
9951
  },
9838
9952
  ReasoningStageDto: {
9839
9953
  object: {
9954
+ blocked_sites: [0, { array: 0 }],
9840
9955
  kind: [1, 0],
9841
9956
  llm_used: [1, 0],
9842
9957
  matched_entities: [0, { array: "MatchedEntityDto" }],
@@ -10453,7 +10568,8 @@ var RESPONSE_COMPONENTS = {
10453
10568
  total_corrected: [1, 0],
10454
10569
  total_merged: [1, 0],
10455
10570
  total_pending: [1, 0],
10456
- total_rejected: [1, 0]
10571
+ total_rejected: [1, 0],
10572
+ total_superseded: [1, 0]
10457
10573
  }
10458
10574
  },
10459
10575
  ReviewUnitResponse: {
@@ -11243,6 +11359,7 @@ var RESPONSE_COMPONENTS = {
11243
11359
  },
11244
11360
  SiteRequestFiled: { object: { created: [1, 0], request: [1, "SiteRequestDto"] } },
11245
11361
  SiteRequestList: { object: { items: [1, { array: "SiteRequestDto" }] } },
11362
+ Sites: { object: { allow: [1, { array: 0 }], block: [1, { array: 0 }] } },
11246
11363
  SkillDraftEditResponse: {
11247
11364
  object: { description: [1, 0], markdown: [1, 0], name: [1, 0], prompt_version: [1, 0] }
11248
11365
  },
@@ -11281,6 +11398,24 @@ var RESPONSE_COMPONENTS = {
11281
11398
  SlideNotes: { object: { page: [1, 0], text: [1, 0] } },
11282
11399
  SmoothingParametersDto: { object: { alpha: [1, 0] } },
11283
11400
  SmtCheckResponse: { object: { assignments: [2, { object: {} }], result: [1, 0] } },
11401
+ SnapshotEnvelope: {
11402
+ object: {
11403
+ data: [1, 0],
11404
+ format: [1, 0],
11405
+ metadata: [1, "SnapshotExportMetadata"],
11406
+ version: [1, 0]
11407
+ }
11408
+ },
11409
+ SnapshotExportMetadata: {
11410
+ object: {
11411
+ created_at: [1, 0],
11412
+ name: [1, 0],
11413
+ reasoninglayer_version: [1, 0],
11414
+ size_bytes: [1, 0],
11415
+ source_tenant_id: [1, 0],
11416
+ table_counts: [1, { object: {} }]
11417
+ }
11418
+ },
11284
11419
  SnapshotFilter: { object: { request_path_pattern: [1, 0] } },
11285
11420
  SnapshotResponse: {
11286
11421
  object: {
@@ -11735,6 +11870,7 @@ var RESPONSE_COMPONENTS = {
11735
11870
  supported_modes: [1, { array: 0 }]
11736
11871
  }
11737
11872
  },
11873
+ SourceVerdictDto: { object: { kind: [1, 0] } },
11738
11874
  SourcesResponse: { object: { sources: [1, { array: "SourceDto" }] } },
11739
11875
  SovereignEndpoint: { object: { host: [1, 0], internal: [1, 0], var: [1, 0] } },
11740
11876
  SovereigntyReport: {
@@ -12351,6 +12487,16 @@ var RESPONSE_COMPONENTS = {
12351
12487
  reachable: [2, "ReachableDto"]
12352
12488
  }
12353
12489
  },
12490
+ ToVerifyPointDto: {
12491
+ object: {
12492
+ attestations: [0, { array: "ClaimAttestationDto" }],
12493
+ fact_term_ids: [0, { array: 0 }],
12494
+ kind: [1, 0],
12495
+ point_ref: [1, 0],
12496
+ reason: [1, 0],
12497
+ text: [1, 0]
12498
+ }
12499
+ },
12354
12500
  TokenSummary: {
12355
12501
  object: { cache_read: [1, 0], cache_write: [1, 0], input: [1, 0], output: [1, 0] }
12356
12502
  },
@@ -12504,7 +12650,11 @@ var RESPONSE_COMPONENTS = {
12504
12650
  reasoning_trace: [2, "ReasoningTraceDto"],
12505
12651
  role: [1, 0],
12506
12652
  stripped_claims: [0, { array: "StrippedClaimDto" }],
12507
- timestamp: [1, 0]
12653
+ timestamp: [1, 0],
12654
+ to_verify: [0, { array: "ToVerifyPointDto" }],
12655
+ unconfirmed: [0, { array: "UnconfirmedRecordDto" }],
12656
+ unread_pages: [0, { array: "UnreadPagesDto" }],
12657
+ web_sources: [0, { array: "WebSourceDto" }]
12508
12658
  }
12509
12659
  },
12510
12660
  TurnFeedbackDto: { object: { feedback_id: [1, 0], rating: [1, 0], recorded_at: [1, 0] } },
@@ -12599,6 +12749,7 @@ var RESPONSE_COMPONENTS = {
12599
12749
  y: [1, 0]
12600
12750
  }
12601
12751
  },
12752
+ UnconfirmedRecordDto: { object: { record_id: [1, 0], sort: [1, 0] } },
12602
12753
  UndeterminedDriftDto: { object: { crosswalk_id: [1, 0], reason: [1, 0] } },
12603
12754
  UndoRuleStoreResponse: { object: { rule_count: [1, 0], success: [1, 0] } },
12604
12755
  UnificationQueryResponse: { object: { count: [1, 0], results: [1, { array: "TermDto" }] } },
@@ -12680,6 +12831,7 @@ var RESPONSE_COMPONENTS = {
12680
12831
  records: [1, 0]
12681
12832
  }
12682
12833
  },
12834
+ UnreadPagesDto: { object: { document_id: [1, 0], pages: [1, { array: 0 }], reason: [1, 0] } },
12683
12835
  UnreadableRecordDto: { object: { reason: [1, 0], record_id: [1, 0] } },
12684
12836
  UnsatisfiableClassDto: { object: { class: [1, 0], disjoint_pair: [1, { array: 0 }] } },
12685
12837
  UnsatisfiableSortDto: { object: { disjoint_pair: [1, { array: 0 }], sort: [1, 0] } },
@@ -12913,6 +13065,16 @@ var RESPONSE_COMPONENTS = {
12913
13065
  }
12914
13066
  },
12915
13067
  VersionDto: { object: { bundle_id: [1, 0], engine_req: [1, 0], version: [1, 0] } },
13068
+ VideoEvidenceReceiptDto: {
13069
+ object: {
13070
+ document_term_id: [1, 0],
13071
+ located_terms: [1, 0],
13072
+ unlocated_term_ids: [1, { array: 0 }]
13073
+ }
13074
+ },
13075
+ VideoIngestResponse: {
13076
+ object: { evidence: [1, "VideoEvidenceReceiptDto"], stats: [1, "IngestionStatsDto"] }
13077
+ },
12916
13078
  ViewRefDto: { object: { draft_not_active: [1, 0], kind: [1, 0] } },
12917
13079
  ViolatedConstraintDto: { object: { feature: [1, 0], kind: [1, 0] } },
12918
13080
  ViolationCounts: {
@@ -13069,6 +13231,16 @@ var RESPONSE_COMPONENTS = {
13069
13231
  WebSearchHitDto: { object: { provider: [1, 0], snippet: [1, 0], title: [1, 0], url: [1, 0] } },
13070
13232
  WebSearchProviderDto: { object: { healthy: [1, 0], name: [1, 0] } },
13071
13233
  WebSearchResponse: { object: { query: [1, 0], results: [1, { array: "WebSearchHitDto" }] } },
13234
+ WebSourceDto: {
13235
+ object: {
13236
+ qualification: [1, "WebSourceQualificationDto"],
13237
+ record_term_id: [1, 0],
13238
+ source_verdict: [2, "SourceVerdictDto"],
13239
+ url: [1, 0],
13240
+ used: [1, 0]
13241
+ }
13242
+ },
13243
+ WebSourceQualificationDto: { object: { level: [1, 0] } },
13072
13244
  WebhookCallbackResponse: {
13073
13245
  object: { demons_fired: [1, 0], message: [1, 0], status: [1, 0], term_updated: [1, 0] }
13074
13246
  },
@@ -13636,6 +13808,11 @@ var RESPONSE_OPERATIONS = {
13636
13808
  path: "/api/v1/feasibility/sessions/{session_id}/assumptions",
13637
13809
  responses: { 200: "SchedulingDeltaResponse" }
13638
13810
  },
13811
+ attestConversationPoint: {
13812
+ method: "POST",
13813
+ path: "/api/v1/conversation/{id}/attestations",
13814
+ responses: { 200: "ClaimAttestationResponseDto" }
13815
+ },
13639
13816
  auditAssumptions: {
13640
13817
  method: "POST",
13641
13818
  path: "/api/v1/causal/assumptions/audit",
@@ -13741,6 +13918,11 @@ var RESPONSE_OPERATIONS = {
13741
13918
  path: "/api/v1/cognitive/agents/messages/broadcast",
13742
13919
  responses: { 200: "BroadcastMessageResponse" }
13743
13920
  },
13921
+ browserAgentRun: {
13922
+ method: "POST",
13923
+ path: "/api/v1/agent/browser-runs/{run_id}",
13924
+ responses: { 200: "BrowserRunResponse" }
13925
+ },
13744
13926
  buildTaxonomy: {
13745
13927
  method: "POST",
13746
13928
  path: "/api/v1/grounded-synthesis/taxonomies/build",
@@ -14753,6 +14935,11 @@ var RESPONSE_OPERATIONS = {
14753
14935
  path: "/api/v1/governance/change-requests/{change_request_id}/dispose",
14754
14936
  responses: { 200: "ChangeRequestResponse" }
14755
14937
  },
14938
+ draftClausePolicy: {
14939
+ method: "POST",
14940
+ path: "/api/v1/documents/{document_id}/clauses/{clause_id}/policy-draft",
14941
+ responses: { 200: "ClausePolicyDraftDto" }
14942
+ },
14756
14943
  draftSkillEdit: {
14757
14944
  method: "POST",
14758
14945
  path: "/api/v1/skills/draft-edit",
@@ -15079,6 +15266,11 @@ var RESPONSE_OPERATIONS = {
15079
15266
  path: "/api/v1/vocabulary/exports/skos",
15080
15267
  responses: { 200: "SkosExportResponse" }
15081
15268
  },
15269
+ exportSnapshot: {
15270
+ method: "GET",
15271
+ path: "/api/v1/admin/snapshots/{snapshot_id}/export",
15272
+ responses: { 200: "SnapshotEnvelope" }
15273
+ },
15082
15274
  extendDsr: {
15083
15275
  method: "POST",
15084
15276
  path: "/api/v1/dsr/{id}/extend",
@@ -15124,6 +15316,7 @@ var RESPONSE_OPERATIONS = {
15124
15316
  path: "/api/v1/oversight/sessions/{session_id}/finalize",
15125
15317
  responses: { 200: "FormalJudgeResponse" }
15126
15318
  },
15319
+ find: { method: "POST", path: "/api/v1/find", responses: { 200: "FindResponse" } },
15127
15320
  findBySort: {
15128
15321
  method: "POST",
15129
15322
  path: "/api/v1/query/by-sort",
@@ -15771,6 +15964,11 @@ var RESPONSE_OPERATIONS = {
15771
15964
  path: "/api/v1/sorts/least/{tenant_id}",
15772
15965
  responses: { 200: "LeastSortsResponse" }
15773
15966
  },
15967
+ getLiveRecording: {
15968
+ method: "GET",
15969
+ path: "/api/v1/audio/recordings/{id}",
15970
+ responses: { 200: "LiveRecordingView" }
15971
+ },
15774
15972
  getLlmMetrics: {
15775
15973
  method: "GET",
15776
15974
  path: "/api/v1/metrics/llm",
@@ -16345,6 +16543,11 @@ var RESPONSE_OPERATIONS = {
16345
16543
  path: "/api/v1/ingest/url",
16346
16544
  responses: { 200: "IngestUrlResponse" }
16347
16545
  },
16546
+ ingestVideo: {
16547
+ method: "POST",
16548
+ path: "/api/v1/ingest/video",
16549
+ responses: { 201: "VideoIngestResponse", 202: "QueuedVideoIngestResponse" }
16550
+ },
16348
16551
  installConceptRules: {
16349
16552
  method: "POST",
16350
16553
  path: "/api/v1/analysis/concept-rules",
@@ -16493,7 +16696,7 @@ var RESPONSE_OPERATIONS = {
16493
16696
  listBrowserAgentRuns: {
16494
16697
  method: "GET",
16495
16698
  path: "/api/v1/agent/browser-runs",
16496
- responses: { 200: { array: 0 } }
16699
+ responses: { 200: { array: "BrowserRunView" } }
16497
16700
  },
16498
16701
  listCandidates: {
16499
16702
  method: "GET",
@@ -17385,6 +17588,7 @@ var RESPONSE_OPERATIONS = {
17385
17588
  path: "/api/v1/execution/sessions/{session_id}/goals/pop",
17386
17589
  responses: { 200: "GoalStackResponse" }
17387
17590
  },
17591
+ postDecide: { method: "POST", path: "/api/v1/boundary/decide", responses: { 200: "Decision" } },
17388
17592
  postExchange: {
17389
17593
  method: "POST",
17390
17594
  path: "/api/v1/gateway-sessions/{key}/exchanges",
@@ -18066,6 +18270,11 @@ var RESPONSE_OPERATIONS = {
18066
18270
  path: "/api/v1/ingest/dlq/{id}/retry",
18067
18271
  responses: { 202: "DlqRetryResponse" }
18068
18272
  },
18273
+ retryLiveRecording: {
18274
+ method: "POST",
18275
+ path: "/api/v1/audio/recordings/{id}/retry",
18276
+ responses: { 200: "LiveRecordingView", 202: "LiveRecordingView" }
18277
+ },
18069
18278
  review: {
18070
18279
  method: "POST",
18071
18280
  path: "/api/v1/runtime/builder-review",
@@ -18476,6 +18685,11 @@ var RESPONSE_OPERATIONS = {
18476
18685
  path: "/api/v1/cognitive/agents/{agent_id}/stop",
18477
18686
  responses: { 200: "AgentStatusChangeResponse" }
18478
18687
  },
18688
+ stopLiveRecording: {
18689
+ method: "POST",
18690
+ path: "/api/v1/audio/recordings/{id}/stop",
18691
+ responses: { 200: "LiveRecordingView", 202: "LiveRecordingView" }
18692
+ },
18479
18693
  storePlan: {
18480
18694
  method: "POST",
18481
18695
  path: "/api/v1/cognitive/agents/plans",
@@ -19550,7 +19764,8 @@ function BulkRowRefusalFromApiToFront(dto) {
19550
19764
  message: dto.message,
19551
19765
  ...dto.feature ? { feature: dto.feature } : {},
19552
19766
  ...dto.constraint_name != null ? { constraintName: dto.constraint_name } : {},
19553
- ...dto.constraint_message != null ? { constraintMessage: dto.constraint_message } : {}
19767
+ ...dto.constraint_message != null ? { constraintMessage: dto.constraint_message } : {},
19768
+ ...dto.code != null ? { code: dto.code } : {}
19554
19769
  };
19555
19770
  }
19556
19771
  function ClearTermsResponseFromApiToFront(dto) {
@@ -21658,6 +21873,7 @@ function BackwardChainResponseFromApiToFront(dto) {
21658
21873
  };
21659
21874
  if (dto.derivation_complete != null) out.derivationComplete = dto.derivation_complete;
21660
21875
  if (dto.completed_proof_count != null) out.completedProofCount = dto.completed_proof_count;
21876
+ if (dto.valid_before != null) out.validBefore = dto.valid_before;
21661
21877
  if (dto.open_world_search != null) {
21662
21878
  out.openWorldSearch = OpenWorldSearchCompletionFromApiToFront(dto.open_world_search);
21663
21879
  }
@@ -21730,7 +21946,11 @@ function BulkAddRulesResponseFromApiToFront(dto) {
21730
21946
  return out;
21731
21947
  }
21732
21948
  function RejectedBulkItemFromApiToFront(dto) {
21733
- return { index: dto.index, reason: dto.reason };
21949
+ return {
21950
+ index: dto.index,
21951
+ reason: dto.reason,
21952
+ ...dto.code != null ? { code: dto.code } : {}
21953
+ };
21734
21954
  }
21735
21955
  function BulkAddFactsResponseFromApiToFront(dto) {
21736
21956
  const out = {
@@ -21850,6 +22070,7 @@ function NafProveResponseFromApiToFront(dto) {
21850
22070
  };
21851
22071
  if (dto.derivation_complete != null) out.derivationComplete = dto.derivation_complete;
21852
22072
  if (dto.completed_proof_count != null) out.completedProofCount = dto.completed_proof_count;
22073
+ if (dto.valid_before != null) out.validBefore = dto.valid_before;
21853
22074
  return out;
21854
22075
  }
21855
22076
  function CreateGoalResponseFromApiToFront(dto) {
@@ -26945,7 +27166,9 @@ function VocabularyAuthorityRelationFromApiToFront(dto) {
26945
27166
  key,
26946
27167
  wireString(value, `body.fact.features.${key}`)
26947
27168
  ])
26948
- )
27169
+ ),
27170
+ ...present(dto.valid_until) ? { validUntil: wireString(dto.valid_until, "body.fact.valid_until") } : {},
27171
+ ...dto.expired === void 0 ? {} : { expired: wireBoolean(dto.expired, "body.fact.expired") }
26949
27172
  };
26950
27173
  }
26951
27174
  function VocabularyAuthorityRelationAssertedFromApiToFront(dto) {
@@ -27310,7 +27533,9 @@ function GovernanceAuthorityRelationFromApiToFront(dto) {
27310
27533
  return {
27311
27534
  features: definedRecord(dto.features),
27312
27535
  id: dto.id,
27313
- relation: dto.relation
27536
+ relation: dto.relation,
27537
+ ...dto.valid_until === void 0 ? {} : { validUntil: dto.valid_until === null ? null : dto.valid_until },
27538
+ ...dto.expired === void 0 ? {} : { expired: wireBoolean(dto.expired, "authorityRelation.expired") }
27314
27539
  };
27315
27540
  }
27316
27541
  function GovernanceAuthorityRelationPageResponseFromApiToFront(dto) {
@@ -28822,6 +29047,14 @@ var GOVERNANCE_REFUSAL_CODES = members({
28822
29047
  llm_provider_failed: true,
28823
29048
  subscription_source_unconfigured: true,
28824
29049
  subscription_source_foreign: true,
29050
+ browser_run_person_required: true,
29051
+ browser_run_access_denied: true,
29052
+ browser_authority_unavailable: true,
29053
+ browser_run_not_found: true,
29054
+ browser_run_conflict: true,
29055
+ browser_run_task_invalid: true,
29056
+ browser_observation_out_of_bounds: true,
29057
+ browser_run_store_unavailable: true,
28825
29058
  workflow_authority_unconfigured: true,
28826
29059
  action_approval_denied: true,
28827
29060
  action_approval_undetermined: true,
@@ -28858,7 +29091,14 @@ var GOVERNANCE_REFUSAL_CODES = members({
28858
29091
  statement_not_a_rule: true,
28859
29092
  statement_refused: true,
28860
29093
  rule_comparison_timeout: true,
28861
- rule_comparison_failed: true
29094
+ rule_comparison_failed: true,
29095
+ reserved_sort_write_refused: true,
29096
+ sort_write_not_granted: true,
29097
+ filing_term_unread: true,
29098
+ reference_term_unknown: true,
29099
+ term_id_unavailable: true,
29100
+ reserved_sort_delete_refused: true,
29101
+ sort_delete_not_granted: true
28862
29102
  });
28863
29103
 
28864
29104
  // src/utils/vocabulary-refusal.ts
@@ -29086,12 +29326,30 @@ function rethrowVocabularyRefusal(error) {
29086
29326
  }
29087
29327
  throw error;
29088
29328
  }
29329
+ function rethrowBulkRowCodes(error) {
29330
+ if (error instanceof BulkRefusedError) {
29331
+ const body = error.body;
29332
+ const wireRows = typeof body === "object" && body !== null && "errors" in body ? body.errors : void 0;
29333
+ if (Array.isArray(wireRows) && wireRows.length === error.rows.length) {
29334
+ const entries = wireRows;
29335
+ const rows = error.rows.map((row, position) => {
29336
+ const entry2 = entries[position];
29337
+ const code = typeof entry2 === "object" && entry2 !== null && "code" in entry2 ? entry2.code : void 0;
29338
+ const known = GOVERNANCE_REFUSAL_CODES.find((member) => member === code);
29339
+ return known === void 0 ? row : { ...row, code: known };
29340
+ });
29341
+ throw new BulkRefusedError(error.message, body, error.headers, rows, error.errorCode);
29342
+ }
29343
+ }
29344
+ throw error;
29345
+ }
29089
29346
  function governanceRefusalOfBody(body) {
29090
29347
  try {
29091
29348
  const wire = wireObject(body, "body");
29092
29349
  return {
29093
29350
  error: wireString(wire.error, "error"),
29094
29351
  code: wireLiteral(wire.code, GOVERNANCE_REFUSAL_CODES, "code"),
29352
+ ...isAbsent(wire.component) ? {} : { component: wireString(wire.component, "component") },
29095
29353
  message: wireString(wire.message, "message")
29096
29354
  };
29097
29355
  } catch (failure) {
@@ -30780,7 +31038,7 @@ var Sorts = class {
30780
31038
  ...params
30781
31039
  });
30782
31040
  /**
30783
- * @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 native [`SortHierarchy::compile_fuzzy_subsumptions`](osfkb_domain::types::SortHierarchy::compile_fuzzy_subsumptions): 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).
31041
+ * @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).
30784
31042
  *
30785
31043
  * @tags sorts
30786
31044
  * @name CompileSubsumptions
@@ -31932,7 +32190,7 @@ var Terms = class {
31932
32190
  ...params
31933
32191
  });
31934
32192
  /**
31935
- * @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 with `osfkb_domain::versioning::compute_diff`, which skips 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`.
32193
+ * @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`.
31936
32194
  *
31937
32195
  * @tags terms
31938
32196
  * @name ListTermVersions
@@ -32223,7 +32481,7 @@ var Inference = class {
32223
32481
  ...params
32224
32482
  });
32225
32483
  /**
32226
- * @description Phase 2 v2 entry point for retraction: 1. Removes each term from PG + in-memory stores via [`HomoiconicTermService::remove_term`](osfkb_application::services::HomoiconicTermService::remove_term). 2. When `state.use_plan_engine` is on, submits a single [`DeltaEvent::Retract`](osfkb_application::services::dataflow::DeltaEvent::Retract) 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 [`DeltaEvent::Retract`](osfkb_application::services::dataflow::DeltaEvent::Retract) 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).
32484
+ * @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).
32227
32485
  *
32228
32486
  * @tags inference
32229
32487
  * @name BulkRetractTerms
@@ -34542,6 +34800,22 @@ var Ingestion = class {
34542
34800
  format: "json",
34543
34801
  ...params
34544
34802
  });
34803
+ /**
34804
+ * @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).
34805
+ *
34806
+ * @tags ingestion
34807
+ * @name GetLiveRecording
34808
+ * @summary Read a live recording.
34809
+ * @request GET:/api/v1/audio/recordings/{id}
34810
+ * @secure
34811
+ */
34812
+ getLiveRecording = (id, params = {}) => this.http.request({
34813
+ path: `/api/v1/audio/recordings/${id}`,
34814
+ method: "GET",
34815
+ secure: true,
34816
+ format: "json",
34817
+ ...params
34818
+ });
34545
34819
  /**
34546
34820
  * @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).
34547
34821
  *
@@ -34720,7 +34994,7 @@ var Ingestion = class {
34720
34994
  ...params
34721
34995
  });
34722
34996
  /**
34723
- * @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.
34997
+ * @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.
34724
34998
  *
34725
34999
  * @tags ingestion
34726
35000
  * @name IngestUrl
@@ -34737,6 +35011,25 @@ var Ingestion = class {
34737
35011
  format: "json",
34738
35012
  ...params
34739
35013
  });
35014
+ /**
35015
+ * @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.
35016
+ *
35017
+ * @tags ingestion
35018
+ * @name IngestVideo
35019
+ * @summary Ingest a short video
35020
+ * @request POST:/api/v1/ingest/video
35021
+ * @secure
35022
+ */
35023
+ ingestVideo = (data, query, params = {}) => this.http.request({
35024
+ path: `/api/v1/ingest/video`,
35025
+ method: "POST",
35026
+ query,
35027
+ body: data,
35028
+ secure: true,
35029
+ type: "application/json",
35030
+ format: "json",
35031
+ ...params
35032
+ });
34740
35033
  /**
34741
35034
  * @description Returns paginated list of chunk failures in the dead-letter queue.
34742
35035
  *
@@ -34995,6 +35288,22 @@ var Ingestion = class {
34995
35288
  format: "json",
34996
35289
  ...params
34997
35290
  });
35291
+ /**
35292
+ * @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.
35293
+ *
35294
+ * @tags ingestion
35295
+ * @name RetryLiveRecording
35296
+ * @summary Finalize again a recording whose finalizing failed.
35297
+ * @request POST:/api/v1/audio/recordings/{id}/retry
35298
+ * @secure
35299
+ */
35300
+ retryLiveRecording = (id, params = {}) => this.http.request({
35301
+ path: `/api/v1/audio/recordings/${id}/retry`,
35302
+ method: "POST",
35303
+ secure: true,
35304
+ format: "json",
35305
+ ...params
35306
+ });
34998
35307
  /**
34999
35308
  * @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
35000
35309
  *
@@ -35013,6 +35322,22 @@ var Ingestion = class {
35013
35322
  format: "json",
35014
35323
  ...params
35015
35324
  });
35325
+ /**
35326
+ * @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.
35327
+ *
35328
+ * @tags ingestion
35329
+ * @name StopLiveRecording
35330
+ * @summary Stop a live recording whose socket is gone, and finalize it.
35331
+ * @request POST:/api/v1/audio/recordings/{id}/stop
35332
+ * @secure
35333
+ */
35334
+ stopLiveRecording = (id, params = {}) => this.http.request({
35335
+ path: `/api/v1/audio/recordings/${id}/stop`,
35336
+ method: "POST",
35337
+ secure: true,
35338
+ format: "json",
35339
+ ...params
35340
+ });
35016
35341
  /**
35017
35342
  * No description
35018
35343
  *
@@ -35077,11 +35402,11 @@ var Ingestion = class {
35077
35402
  ...params
35078
35403
  });
35079
35404
  /**
35080
- * @description The search goes through the same `WebSearchRouter` the `web_search` agent action uses: the providers, their failover order and their health marks are the ones `GET /api/v1/web/capabilities` reports. The route does not enforce health — a provider marked unhealthy is still tried in order, as the router does for the agent action, and a success marks it healthy again. 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.
35405
+ * @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.
35081
35406
  *
35082
35407
  * @tags ingestion
35083
35408
  * @name WebSearch
35084
- * @summary Search the web through the deployment's search providers (#413).
35409
+ * @summary Search the web through the box's search (#413, gate 1 WP-0).
35085
35410
  * @request POST:/api/v1/web/search
35086
35411
  * @secure
35087
35412
  */
@@ -37580,7 +37905,7 @@ var Visualization = class {
37580
37905
  ...params
37581
37906
  });
37582
37907
  /**
37583
- * @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 graph is built by [`osfkb_domain::visualization::build_constraint_graph`]; `dot_output` renders that same graph. Before #341 this route answered one `Constraint System` placeholder node, never filled `fd_domains`, and rendered DOT from an empty graph.
37908
+ * @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.
37584
37909
  *
37585
37910
  * @tags visualization
37586
37911
  * @name GetConstraintGraph
@@ -39559,6 +39884,7 @@ function OsfqlBindingsFromApiToFront(value) {
39559
39884
  }
39560
39885
  function OsfqlRequestFromFrontToApi(model) {
39561
39886
  const dto = { query: model.query };
39887
+ if (model.confirmExternal !== void 0) dto.confirm_external = model.confirmExternal;
39562
39888
  if (model.reactive !== void 0) dto.reactive = model.reactive;
39563
39889
  if (model.atomic !== void 0) dto.atomic = model.atomic;
39564
39890
  if (model.maxRows !== void 0) dto.max_rows = model.maxRows;
@@ -39915,6 +40241,14 @@ function OsfqlRefusalFromApiToFront(value) {
39915
40241
  parsedRepairs.push(repair);
39916
40242
  }
39917
40243
  const refusal = { code, sort, candidates, repairs: parsedRepairs };
40244
+ const denialCode = value["denial_code"];
40245
+ if (typeof denialCode === "string") {
40246
+ const known = GOVERNANCE_REFUSAL_CODES.find((member) => member === denialCode);
40247
+ if (known === void 0) return void 0;
40248
+ refusal.denialCode = known;
40249
+ } else if (denialCode !== void 0 && denialCode !== null) {
40250
+ return void 0;
40251
+ }
39918
40252
  if (typeof role === "string") {
39919
40253
  refusal.role = role;
39920
40254
  } else if (role !== void 0 && role !== null) {
@@ -40168,28 +40502,30 @@ function definitionToApi(value) {
40168
40502
  own_created_records: value.ownCreatedRecords
40169
40503
  };
40170
40504
  }
40505
+ function definitionFromApi(d) {
40506
+ return {
40507
+ name: d.name,
40508
+ body: d.body,
40509
+ params: d.params,
40510
+ returns: d.returns,
40511
+ writes: d.writes,
40512
+ rules: d.rules?.map(ruleFromApi),
40513
+ projectId: d.project_id ?? void 0,
40514
+ frame: d.frame ?? void 0,
40515
+ boundParam: d.bound_param ?? void 0,
40516
+ requiredRoles: d.required_roles,
40517
+ approval: d.approval ?? void 0,
40518
+ riskTier: d.risk_tier ?? void 0,
40519
+ ownCreatedRecords: d.own_created_records
40520
+ };
40521
+ }
40171
40522
  function actionFromApi(dto) {
40172
- const d = dto.definition;
40173
40523
  return {
40174
40524
  id: dto.id,
40175
40525
  version: dto.version,
40176
40526
  owner: dto.owner ?? void 0,
40177
40527
  origin: dto.origin,
40178
- definition: {
40179
- name: d.name,
40180
- body: d.body,
40181
- params: d.params,
40182
- returns: d.returns,
40183
- writes: d.writes,
40184
- rules: d.rules?.map(ruleFromApi),
40185
- projectId: d.project_id ?? void 0,
40186
- frame: d.frame ?? void 0,
40187
- boundParam: d.bound_param ?? void 0,
40188
- requiredRoles: d.required_roles,
40189
- approval: d.approval ?? void 0,
40190
- riskTier: d.risk_tier ?? void 0,
40191
- ownCreatedRecords: d.own_created_records
40192
- }
40528
+ definition: definitionFromApi(dto.definition)
40193
40529
  };
40194
40530
  }
40195
40531
  function applyFromApi(dto) {
@@ -40217,6 +40553,215 @@ function applyFromApi(dto) {
40217
40553
  };
40218
40554
  }
40219
40555
 
40556
+ // src/normalizers/frame-authoring.ts
40557
+ function FrameCalculationDraftResponseFromApiToFront(dto) {
40558
+ switch (dto.status) {
40559
+ case "needs_clarification":
40560
+ return {
40561
+ questions: dto.questions.map(
40562
+ (item0) => RuleDraftClarificationQuestionDtoFromApiToFront(item0)
40563
+ ),
40564
+ status: dto.status
40565
+ };
40566
+ case "complete":
40567
+ return {
40568
+ definition: definitionFromApi(dto.definition),
40569
+ draft: CalculationFromApiToFront(dto.draft),
40570
+ status: dto.status
40571
+ };
40572
+ }
40573
+ }
40574
+ function CalculationFromApiToFront(dto) {
40575
+ return {
40576
+ function: dto.function,
40577
+ inputs: dto.inputs.map((item0) => CalculationInputFromApiToFront(item0)),
40578
+ name: dto.name,
40579
+ outputs: dto.outputs.map((item0) => CalculationOutputFromApiToFront(item0))
40580
+ };
40581
+ }
40582
+ function CalculationFromFrontToApi(model) {
40583
+ return {
40584
+ function: model.function,
40585
+ inputs: model.inputs.map((item0) => CalculationInputFromFrontToApi(item0)),
40586
+ name: model.name,
40587
+ outputs: model.outputs.map((item0) => CalculationOutputFromFrontToApi(item0))
40588
+ };
40589
+ }
40590
+ function CalculationInputFromApiToFront(dto) {
40591
+ return {
40592
+ integerRange: dto.integer_range == null ? dto.integer_range : IntegerRangeFromApiToFront(dto.integer_range),
40593
+ kind: dto.kind,
40594
+ name: dto.name
40595
+ };
40596
+ }
40597
+ function CalculationInputFromFrontToApi(model) {
40598
+ return {
40599
+ integer_range: model.integerRange == null ? model.integerRange : IntegerRangeFromFrontToApi(model.integerRange),
40600
+ kind: model.kind,
40601
+ name: model.name
40602
+ };
40603
+ }
40604
+ function CalculationOutputFromApiToFront(dto) {
40605
+ return {
40606
+ formula: dto.formula == null ? dto.formula : FormulaFromApiToFront(dto.formula),
40607
+ indices: dto.indices,
40608
+ kind: dto.kind,
40609
+ name: dto.name
40610
+ };
40611
+ }
40612
+ function CalculationOutputFromFrontToApi(model) {
40613
+ return {
40614
+ formula: model.formula == null ? model.formula : FormulaFromFrontToApi(model.formula),
40615
+ indices: model.indices,
40616
+ kind: model.kind,
40617
+ name: model.name
40618
+ };
40619
+ }
40620
+ function FormulaFromApiToFront(dto) {
40621
+ switch (dto.node) {
40622
+ case "input":
40623
+ return { name: dto.name, node: dto.node };
40624
+ case "number":
40625
+ return { node: dto.node, value: dto.value };
40626
+ case "arithmetic":
40627
+ return {
40628
+ left: FormulaFromApiToFront(dto.left),
40629
+ node: dto.node,
40630
+ operator: dto.operator,
40631
+ right: FormulaFromApiToFront(dto.right)
40632
+ };
40633
+ }
40634
+ }
40635
+ function FormulaFromFrontToApi(model) {
40636
+ switch (model.node) {
40637
+ case "input":
40638
+ return { name: model.name, node: model.node };
40639
+ case "number":
40640
+ return { node: model.node, value: model.value };
40641
+ case "arithmetic":
40642
+ return {
40643
+ left: FormulaFromFrontToApi(model.left),
40644
+ node: model.node,
40645
+ operator: model.operator,
40646
+ right: FormulaFromFrontToApi(model.right)
40647
+ };
40648
+ }
40649
+ }
40650
+ function IntegerRangeFromApiToFront(dto) {
40651
+ return {
40652
+ max: dto.max,
40653
+ min: dto.min
40654
+ };
40655
+ }
40656
+ function IntegerRangeFromFrontToApi(model) {
40657
+ return {
40658
+ max: model.max,
40659
+ min: model.min
40660
+ };
40661
+ }
40662
+ function FrameWriteDraftResponseFromApiToFront(dto) {
40663
+ switch (dto.status) {
40664
+ case "needs_clarification":
40665
+ return {
40666
+ questions: dto.questions.map(
40667
+ (item0) => RuleDraftClarificationQuestionDtoFromApiToFront(item0)
40668
+ ),
40669
+ status: dto.status
40670
+ };
40671
+ case "complete":
40672
+ return {
40673
+ definition: definitionFromApi(dto.definition),
40674
+ draft: FrameWriteDraftFromApiToFront(dto.draft),
40675
+ status: dto.status
40676
+ };
40677
+ }
40678
+ }
40679
+ function FrameWriteDraftFromApiToFront(dto) {
40680
+ return {
40681
+ fields: dto.fields.map((item0) => item0),
40682
+ name: dto.name,
40683
+ operation: dto.operation,
40684
+ sort: dto.sort
40685
+ };
40686
+ }
40687
+ function FrameConsultantRevisionFromApiToFront(dto) {
40688
+ return {
40689
+ added: dto.added,
40690
+ frameId: dto.frame_id,
40691
+ moved: dto.moved,
40692
+ name: dto.name,
40693
+ version: dto.version
40694
+ };
40695
+ }
40696
+ function FrameConsultantPlacementFromFrontToApi(model) {
40697
+ return {
40698
+ move_existing: model.moveExisting,
40699
+ section: model.section
40700
+ };
40701
+ }
40702
+ function RestoreFramePageResponseFromApiToFront(dto) {
40703
+ return {
40704
+ frameId: dto.frame_id,
40705
+ name: dto.name,
40706
+ restoredFrom: dto.restored_from,
40707
+ version: dto.version
40708
+ };
40709
+ }
40710
+ function UIFrameTableSourcesFromApiToFront(dto) {
40711
+ return {
40712
+ sources: dto.sources.map((item0) => UIFrameTableSourceFromApiToFront(item0)),
40713
+ total: dto.total
40714
+ };
40715
+ }
40716
+ function UIFrameTableSourceFromApiToFront(dto) {
40717
+ return {
40718
+ columns: dto.columns.map((item0) => item0),
40719
+ sort: dto.sort
40720
+ };
40721
+ }
40722
+ function AddFrameConsultantFromFrontToApi(model) {
40723
+ return {
40724
+ authoring: model.authoring == null ? model.authoring : FrameAuthoringOriginFromFrontToApi(model.authoring),
40725
+ expected_version: model.expectedVersion,
40726
+ frame_id: model.frameId,
40727
+ placement: model.placement == null ? model.placement : FrameConsultantPlacementFromFrontToApi(model.placement)
40728
+ };
40729
+ }
40730
+ function FrameAuthoringOriginFromFrontToApi(model) {
40731
+ return {
40732
+ conversation_id: model.conversationId,
40733
+ turn_id: model.turnId
40734
+ };
40735
+ }
40736
+ function FrameCalculationDraftRequestFromFrontToApi(model) {
40737
+ return {
40738
+ answers: model.answers,
40739
+ current_draft: model.currentDraft == null ? model.currentDraft : CalculationFromFrontToApi(model.currentDraft),
40740
+ description: model.description,
40741
+ frame_id: model.frameId
40742
+ };
40743
+ }
40744
+ function FrameWriteDraftRequestFromFrontToApi(model) {
40745
+ return {
40746
+ answers: model.answers,
40747
+ description: model.description,
40748
+ frame_id: model.frameId
40749
+ };
40750
+ }
40751
+ function RestoreFramePageRequestFromFrontToApi(model) {
40752
+ return {
40753
+ expected_latest_version: model.expectedLatestVersion,
40754
+ frame_id: model.frameId,
40755
+ version: model.version
40756
+ };
40757
+ }
40758
+ function RunAppCalculationRequestFromFrontToApi(model) {
40759
+ return {
40760
+ params: model.params,
40761
+ version: model.version
40762
+ };
40763
+ }
40764
+
40220
40765
  // src/resources/app-actions.ts
40221
40766
  var AppActionsClient = class {
40222
40767
  /** @internal */
@@ -40260,6 +40805,88 @@ var AppActionsClient = class {
40260
40805
  );
40261
40806
  return decodeResponse(response, applyFromApi);
40262
40807
  }
40808
+ /**
40809
+ * Draft a calculation for a Frame the caller may edit. Saving uses the ordinary action writer and
40810
+ * repeats its current scope and definition checks.
40811
+ *
40812
+ * @param request - The request (`FrameCalculationDraftRequest`), camelCase; sent snake_case.
40813
+ * @param requestOptions - Per-call cancellation, timeout and request options.
40814
+ * @returns The engine's answer as `FrameCalculationDraftResponse`, camelCase.
40815
+ * @throws {ApiError} 403: Frame edit access required
40816
+ * @throws {ApiError} 404: Frame unavailable
40817
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
40818
+ * @throws {ApiError} 422: Invalid calculation or draft
40819
+ * @throws {ApiError} 502: `llm_provider_failed` (`component`: `text_model`): the text model's provider failed or refused
40820
+ * @throws {ApiError} 503: `llm_unconfigured` (`component`: `text_model`): no text model is configured on this engine
40821
+ *
40822
+ * @remarks Uses POST `/api/v1/app-actions/calculations/draft`.
40823
+ *
40824
+ * @example
40825
+ * ```typescript
40826
+ * const draft = await client.appActions.draftCalculation(request);
40827
+ * ```
40828
+ */
40829
+ async draftCalculation(request, requestOptions) {
40830
+ const response = await this.api.draftFrameCalculation(
40831
+ FrameCalculationDraftRequestFromFrontToApi(request),
40832
+ toRequestParams(requestOptions)
40833
+ );
40834
+ return decodeResponse(response, FrameCalculationDraftResponseFromApiToFront);
40835
+ }
40836
+ /**
40837
+ * draftWrite
40838
+ *
40839
+ * @param request - The request (`FrameWriteDraftRequest`), camelCase; sent snake_case.
40840
+ * @param requestOptions - Per-call cancellation, timeout and request options.
40841
+ * @returns The engine's answer as `FrameWriteDraftResponse`, camelCase.
40842
+ * @throws {ApiError} 404: Frame unavailable
40843
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
40844
+ * @throws {ApiError} 422: The draft cannot be expressed with the available tables and fields
40845
+ * @throws {ApiError} 502: `llm_provider_failed` (`component`: `text_model`): the text model's provider failed or refused
40846
+ * @throws {ApiError} 503: `llm_unconfigured` (`component`: `text_model`): no text model is configured on this engine
40847
+ *
40848
+ * @remarks Uses POST `/api/v1/app-actions/writes/draft`.
40849
+ *
40850
+ * @example
40851
+ * ```typescript
40852
+ * const draft = await client.appActions.draftWrite(request);
40853
+ * ```
40854
+ */
40855
+ async draftWrite(request, requestOptions) {
40856
+ const response = await this.api.draftFrameWrite(
40857
+ FrameWriteDraftRequestFromFrontToApi(request),
40858
+ toRequestParams(requestOptions)
40859
+ );
40860
+ return decodeResponse(response, FrameWriteDraftResponseFromApiToFront);
40861
+ }
40862
+ /**
40863
+ * Calculate with the same Frame and term visibility as the action editor.
40864
+ *
40865
+ * @param id - The calculation action.
40866
+ * @param request - The request (`RunAppCalculationRequest`), camelCase; sent snake_case.
40867
+ * @param requestOptions - Per-call cancellation, timeout and request options.
40868
+ * @returns The engine's answer as `ApplyAppActionResult`, camelCase.
40869
+ * @throws {ApiError} 403: The action is not a read-only Frame calculation
40870
+ * @throws {ApiError} 404: No Frame or calculation the caller can read
40871
+ * @throws {ApiError} 409: The calculation changed or cannot run
40872
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
40873
+ * @throws {ApiError} 422: One or more input values are invalid
40874
+ *
40875
+ * @remarks Uses POST `/api/v1/app-actions/{id}/calculate`.
40876
+ *
40877
+ * @example
40878
+ * ```typescript
40879
+ * const result = await client.appActions.calculate(actionId, { version: 2 });
40880
+ * ```
40881
+ */
40882
+ async calculate(id, request, requestOptions) {
40883
+ const response = await this.api.runAppCalculation(
40884
+ id,
40885
+ RunAppCalculationRequestFromFrontToApi(request),
40886
+ toRequestParams(requestOptions)
40887
+ );
40888
+ return decodeResponse(response, applyFromApi);
40889
+ }
40263
40890
  };
40264
40891
 
40265
40892
  // src/api-spec/generated/ActionReviews.ts
@@ -41459,7 +42086,7 @@ var Reasoning = class {
41459
42086
  ...params
41460
42087
  });
41461
42088
  /**
41462
- * @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. See [`osfkb_domain::operations::homoiconic_entailment`] for the full semantics. `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.
42089
+ * @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.
41463
42090
  *
41464
42091
  * @tags reasoning
41465
42092
  * @name Entailment
@@ -44996,7 +45623,7 @@ var Osfql = class {
44996
45623
  ...params
44997
45624
  });
44998
45625
  /**
44999
- * @description Parses, compiles, and executes an OSFQL program against the caller's tenant-isolated knowledge base. Supports all OSFQL statement types: MATCH, INSERT, RETRACT, DERIVE, UNIFY, AWAIT, COUNTERFACTUAL, CAUSES. # Examples ```json { "query": "INSERT person(name: \"Alice\", age: 30);" } ``` ```json { "query": "MATCH person(name: ?N, age: ?A) WHERE ?A > 18;" } ```
45626
+ * @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;" } ```
45000
45627
  *
45001
45628
  * @tags osfql
45002
45629
  * @name ExecuteOsfql
@@ -45385,6 +46012,150 @@ var Ui = class {
45385
46012
  });
45386
46013
  };
45387
46014
 
46015
+ // src/api-spec/generated/Skills.ts
46016
+ var Skills = class {
46017
+ http;
46018
+ constructor(http) {
46019
+ this.http = http;
46020
+ }
46021
+ /**
46022
+ * @description POST /api/v1/skills/draft-edit
46023
+ *
46024
+ * @tags skills
46025
+ * @name DraftSkillEdit
46026
+ * @summary Propose an edited SKILL.md for a requested change.
46027
+ * @request POST:/api/v1/skills/draft-edit
46028
+ * @secure
46029
+ */
46030
+ draftSkillEdit = (data, params = {}) => this.http.request({
46031
+ path: `/api/v1/skills/draft-edit`,
46032
+ method: "POST",
46033
+ body: data,
46034
+ secure: true,
46035
+ type: "application/json",
46036
+ format: "json",
46037
+ ...params
46038
+ });
46039
+ };
46040
+
46041
+ // src/api-spec/generated/Text.ts
46042
+ var Text = class {
46043
+ http;
46044
+ constructor(http) {
46045
+ this.http = http;
46046
+ }
46047
+ /**
46048
+ * @description POST /api/v1/text/proofread
46049
+ *
46050
+ * @tags text
46051
+ * @name ProofreadText
46052
+ * @summary Proofread a text: spelling, agreement and grammar only.
46053
+ * @request POST:/api/v1/text/proofread
46054
+ * @secure
46055
+ */
46056
+ proofreadText = (data, params = {}) => this.http.request({
46057
+ path: `/api/v1/text/proofread`,
46058
+ method: "POST",
46059
+ body: data,
46060
+ secure: true,
46061
+ type: "application/json",
46062
+ format: "json",
46063
+ ...params
46064
+ });
46065
+ /**
46066
+ * @description POST /api/v1/text/rewrite
46067
+ *
46068
+ * @tags text
46069
+ * @name RewriteText
46070
+ * @summary Rewrite a passage in a tone, optionally following a template.
46071
+ * @request POST:/api/v1/text/rewrite
46072
+ * @secure
46073
+ */
46074
+ rewriteText = (data, params = {}) => this.http.request({
46075
+ path: `/api/v1/text/rewrite`,
46076
+ method: "POST",
46077
+ body: data,
46078
+ secure: true,
46079
+ type: "application/json",
46080
+ format: "json",
46081
+ ...params
46082
+ });
46083
+ };
46084
+
46085
+ // src/api-spec/generated/Agent.ts
46086
+ var Agent = class {
46087
+ http;
46088
+ constructor(http) {
46089
+ this.http = http;
46090
+ }
46091
+ /**
46092
+ * @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.
46093
+ *
46094
+ * @tags agent
46095
+ * @name AgentBrowserStep
46096
+ * @summary Decide the next browser action(s) for the current page state.
46097
+ * @request POST:/api/v1/agent/browser-step
46098
+ * @secure
46099
+ */
46100
+ agentBrowserStep = (data, params = {}) => this.http.request({
46101
+ path: `/api/v1/agent/browser-step`,
46102
+ method: "POST",
46103
+ body: data,
46104
+ secure: true,
46105
+ type: "application/json",
46106
+ format: "json",
46107
+ ...params
46108
+ });
46109
+ /**
46110
+ * No description
46111
+ *
46112
+ * @tags agent
46113
+ * @name BrowserAgentRun
46114
+ * @request POST:/api/v1/agent/browser-runs/{run_id}
46115
+ * @secure
46116
+ */
46117
+ browserAgentRun = (runId, data, params = {}) => this.http.request({
46118
+ path: `/api/v1/agent/browser-runs/${runId}`,
46119
+ method: "POST",
46120
+ body: data,
46121
+ secure: true,
46122
+ type: "application/json",
46123
+ format: "json",
46124
+ ...params
46125
+ });
46126
+ /**
46127
+ * No description
46128
+ *
46129
+ * @tags agent
46130
+ * @name ListBrowserAgentRuns
46131
+ * @request GET:/api/v1/agent/browser-runs
46132
+ * @secure
46133
+ */
46134
+ listBrowserAgentRuns = (params = {}) => this.http.request({
46135
+ path: `/api/v1/agent/browser-runs`,
46136
+ method: "GET",
46137
+ secure: true,
46138
+ format: "json",
46139
+ ...params
46140
+ });
46141
+ /**
46142
+ * @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.
46143
+ *
46144
+ * @tags agent
46145
+ * @name RunAgentLoop
46146
+ * @summary `POST /api/v1/agent/loop/run` — plan → verify → dispatch → certify against the tenant's declared sort lattice.
46147
+ * @request POST:/api/v1/agent/loop/run
46148
+ */
46149
+ runAgentLoop = (data, params = {}) => this.http.request({
46150
+ path: `/api/v1/agent/loop/run`,
46151
+ method: "POST",
46152
+ body: data,
46153
+ type: "application/json",
46154
+ format: "json",
46155
+ ...params
46156
+ });
46157
+ };
46158
+
45388
46159
  // src/api-spec/generated/Compliance.ts
45389
46160
  var Compliance = class {
45390
46161
  http;
@@ -45965,7 +46736,7 @@ var Snapshots = class {
45965
46736
  ...params
45966
46737
  });
45967
46738
  /**
45968
- * @description Accepts a reasoninglayer-snapshot JSON envelope (or one an earlier release exported as osfkb-snapshot), 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`.
46739
+ * @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`.
45969
46740
  *
45970
46741
  * @tags snapshots
45971
46742
  * @name ImportSnapshot
@@ -46297,7 +47068,7 @@ var Operations = class {
46297
47068
  this.http = http;
46298
47069
  }
46299
47070
  /**
46300
- * @description `POST /api/v1/operations/anti-unify` Accepts two Ψ-term ids and returns the LGG term computed by the engine's [`AntiUnificationEngine`](osfkb_domain::operations::ilp::AntiUnificationEngine). 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).
47071
+ * @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).
46301
47072
  *
46302
47073
  * @tags operations
46303
47074
  * @name AntiUnify
@@ -46849,7 +47620,7 @@ var Demo = class {
46849
47620
  this.http = http;
46850
47621
  }
46851
47622
  /**
46852
- * @description Returns `404` when the SUMO files cannot be read at the configured or supplied directory, `400` when the assembled source fails to import, and `200` with the tenant's sort count + form count on success.
47623
+ * @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.
46853
47624
  *
46854
47625
  * @tags demo
46855
47626
  * @name DemoSeed
@@ -47695,6 +48466,22 @@ var Boundary = class {
47695
48466
  format: "json",
47696
48467
  ...params
47697
48468
  });
48469
+ /**
48470
+ * No description
48471
+ *
48472
+ * @tags boundary
48473
+ * @name PostDecide
48474
+ * @summary `POST /api/v1/boundary/decide` — may this outbound call leave the box.
48475
+ * @request POST:/api/v1/boundary/decide
48476
+ */
48477
+ postDecide = (data, params = {}) => this.http.request({
48478
+ path: `/api/v1/boundary/decide`,
48479
+ method: "POST",
48480
+ body: data,
48481
+ type: "application/json",
48482
+ format: "json",
48483
+ ...params
48484
+ });
47698
48485
  /**
47699
48486
  * No description
47700
48487
  *
@@ -49283,6 +50070,24 @@ var Documents = class {
49283
50070
  type: "application/json",
49284
50071
  ...params
49285
50072
  });
50073
+ /**
50074
+ * @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.
50075
+ *
50076
+ * @tags documents
50077
+ * @name Find
50078
+ * @summary Find what the caller may open, grouped by kind
50079
+ * @request POST:/api/v1/find
50080
+ * @secure
50081
+ */
50082
+ find = (data, params = {}) => this.http.request({
50083
+ path: `/api/v1/find`,
50084
+ method: "POST",
50085
+ body: data,
50086
+ secure: true,
50087
+ type: "application/json",
50088
+ format: "json",
50089
+ ...params
50090
+ });
49286
50091
  /**
49287
50092
  * No description
49288
50093
  *
@@ -49388,7 +50193,7 @@ var Proof = class {
49388
50193
  this.http = http;
49389
50194
  }
49390
50195
  /**
49391
- * @description Runs the native CDCL solver with DRAT logging; on UNSAT the DRAT trace is turned into a resolution [`ProofCertificate`](osfkb_domain::operations::certified_proofs::store::ProofCertificate) and rendered in the requested format. No tenant context is required — the solver is stateless and in-process.
50196
+ * @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.
49392
50197
  *
49393
50198
  * @tags proof
49394
50199
  * @name ExportProof
@@ -49909,6 +50714,24 @@ var DocumentCheck = class {
49909
50714
  format: "json",
49910
50715
  ...params
49911
50716
  });
50717
+ /**
50718
+ * No description
50719
+ *
50720
+ * @tags document-check
50721
+ * @name DraftClausePolicy
50722
+ * @summary Compile an interpretation of an existing document clause without writing any facts or rules. The reviewer can use normal RLQL authorization to publish.
50723
+ * @request POST:/api/v1/documents/{document_id}/clauses/{clause_id}/policy-draft
50724
+ * @secure
50725
+ */
50726
+ draftClausePolicy = (documentId, clauseId, data, params = {}) => this.http.request({
50727
+ path: `/api/v1/documents/${documentId}/clauses/${clauseId}/policy-draft`,
50728
+ method: "POST",
50729
+ body: data,
50730
+ secure: true,
50731
+ type: "application/json",
50732
+ format: "json",
50733
+ ...params
50734
+ });
49912
50735
  };
49913
50736
 
49914
50737
  // src/api-spec/generated/Corpus.ts
@@ -50954,7 +51777,7 @@ var Research = class {
50954
51777
  this.http = http;
50955
51778
  }
50956
51779
  /**
50957
- * No description
51780
+ * @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.
50958
51781
  *
50959
51782
  * @tags research
50960
51783
  * @name ResearchCreateSession
@@ -50972,7 +51795,7 @@ var Research = class {
50972
51795
  ...params
50973
51796
  });
50974
51797
  /**
50975
- * No description
51798
+ * @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).
50976
51799
  *
50977
51800
  * @tags research
50978
51801
  * @name ResearchDeleteSession
@@ -51067,7 +51890,7 @@ var Research = class {
51067
51890
  ...params
51068
51891
  });
51069
51892
  /**
51070
- * @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 under the configured owner 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` there is no session tenant to adopt and the configured one stands: the paper is ingested for the deployment, not for any session, and nothing is recorded either. 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.
51893
+ * @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.
51071
51894
  *
51072
51895
  * @tags research
51073
51896
  * @name ResearchIngestPaper
@@ -51167,7 +51990,7 @@ var Research = class {
51167
51990
  ...params
51168
51991
  });
51169
51992
  /**
51170
- * No description
51993
+ * @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).
51171
51994
  *
51172
51995
  * @tags research
51173
51996
  * @name ResearchVerifyClaim
@@ -55454,6 +56277,167 @@ function toTermInputDto(input) {
55454
56277
  return byName;
55455
56278
  }
55456
56279
 
56280
+ // src/normalizers/live-docs.ts
56281
+ function LiveDocStateResponseFromApiToFront(dto) {
56282
+ return {
56283
+ state: dto.state,
56284
+ stateVector: dto.state_vector,
56285
+ throughSeq: dto.through_seq
56286
+ };
56287
+ }
56288
+ function LiveDocAnchorsResponseFromApiToFront(dto) {
56289
+ return {
56290
+ passages: dto.passages.map((item0) => LiveDocPassageDtoFromApiToFront(item0)),
56291
+ throughSeq: dto.through_seq
56292
+ };
56293
+ }
56294
+ function LiveDocAnchorDtoFromFrontToApi(model) {
56295
+ return {
56296
+ end: model.end,
56297
+ start: model.start
56298
+ };
56299
+ }
56300
+ function LiveDocPassageDtoFromApiToFront(dto) {
56301
+ switch (dto.state) {
56302
+ case "attached":
56303
+ return { state: dto.state, text: dto.text, truncated: dto.truncated };
56304
+ case "removed":
56305
+ return { state: dto.state };
56306
+ case "unknown":
56307
+ return { state: dto.state };
56308
+ }
56309
+ }
56310
+ function FrameCommentCapabilitiesFromApiToFront(dto) {
56311
+ return {
56312
+ canPost: dto.can_post,
56313
+ page: dto.page
56314
+ };
56315
+ }
56316
+ function FrameCommentReceiptFromApiToFront(dto) {
56317
+ return {
56318
+ id: dto.id
56319
+ };
56320
+ }
56321
+ function LiveDocDiffResponseFromApiToFront(dto) {
56322
+ return {
56323
+ stateVector: dto.state_vector,
56324
+ throughSeq: dto.through_seq,
56325
+ update: dto.update
56326
+ };
56327
+ }
56328
+ function LiveDocUpdatesResponseFromApiToFront(dto) {
56329
+ return {
56330
+ updates: dto.updates.map((item0) => LiveDocUpdateDtoFromApiToFront(item0))
56331
+ };
56332
+ }
56333
+ function LiveDocUpdateDtoFromApiToFront(dto) {
56334
+ return {
56335
+ author: LiveDocAuthorDtoFromApiToFront(dto.author),
56336
+ seq: dto.seq,
56337
+ update: dto.update
56338
+ };
56339
+ }
56340
+ function LiveDocAuthorDtoFromApiToFront(dto) {
56341
+ return {
56342
+ agent: dto.agent,
56343
+ onBehalfOf: dto.on_behalf_of,
56344
+ person: dto.person
56345
+ };
56346
+ }
56347
+ function LiveDocSeqResponseFromApiToFront(dto) {
56348
+ return {
56349
+ seq: dto.seq
56350
+ };
56351
+ }
56352
+ function LiveDocVersionsResponseFromApiToFront(dto) {
56353
+ return {
56354
+ versions: dto.versions.map((item0) => LiveDocVersionDtoFromApiToFront(item0))
56355
+ };
56356
+ }
56357
+ function LiveDocVersionDtoFromApiToFront(dto) {
56358
+ return {
56359
+ author: LiveDocAuthorDtoFromApiToFront(dto.author),
56360
+ generation: dto.generation,
56361
+ reason: LiveDocVersionReasonDtoFromApiToFront(dto.reason),
56362
+ takenAt: dto.taken_at,
56363
+ throughSeq: dto.through_seq
56364
+ };
56365
+ }
56366
+ function LiveDocVersionReasonDtoFromApiToFront(dto) {
56367
+ switch (dto.kind) {
56368
+ case "named":
56369
+ return { kind: dto.kind, name: dto.name };
56370
+ case "before_restore":
56371
+ return { kind: dto.kind, restored: dto.restored };
56372
+ case "before_agent_edit":
56373
+ return { kind: dto.kind };
56374
+ }
56375
+ }
56376
+ function TermSnapshotsResponseFromApiToFront(dto) {
56377
+ return {
56378
+ snapshots: dto.snapshots.map((item0) => TermSnapshotSummaryFromApiToFront(item0)),
56379
+ termId: dto.term_id
56380
+ };
56381
+ }
56382
+ function TermSnapshotSummaryFromApiToFront(dto) {
56383
+ return {
56384
+ description: dto.description,
56385
+ id: dto.id,
56386
+ savedAt: dto.saved_at
56387
+ };
56388
+ }
56389
+ function TermSnapshotPreviewFromApiToFront(dto) {
56390
+ return {
56391
+ diff: VersionDiffDtoFromApiToFront(dto.diff),
56392
+ recordEtag: dto.record_etag,
56393
+ snapshotEtag: dto.snapshot_etag,
56394
+ snapshotId: dto.snapshot_id,
56395
+ termId: dto.term_id
56396
+ };
56397
+ }
56398
+ function RestoreTermSnapshotResponseFromApiToFront(dto) {
56399
+ return {
56400
+ snapshotId: dto.snapshot_id,
56401
+ termId: dto.term_id,
56402
+ version: dto.version
56403
+ };
56404
+ }
56405
+ function LiveDocAnchorsRequestFromFrontToApi(model) {
56406
+ return {
56407
+ anchors: model.anchors.map((item0) => LiveDocAnchorDtoFromFrontToApi(item0))
56408
+ };
56409
+ }
56410
+ function LiveDocApplyRequestFromFrontToApi(model) {
56411
+ return {
56412
+ update: model.update
56413
+ };
56414
+ }
56415
+ function LiveDocDiffRequestFromFrontToApi(model) {
56416
+ return {
56417
+ state_vector: model.stateVector
56418
+ };
56419
+ }
56420
+ function LiveDocNameVersionRequestFromFrontToApi(model) {
56421
+ return {
56422
+ name: model.name
56423
+ };
56424
+ }
56425
+ function NewFrameCommentFromFrontToApi(model) {
56426
+ return {
56427
+ anchor: model.anchor == null ? model.anchor : LiveDocAnchorDtoFromFrontToApi(model.anchor),
56428
+ body: model.body,
56429
+ id: model.id,
56430
+ page: model.page,
56431
+ parent: model.parent
56432
+ };
56433
+ }
56434
+ function RestoreTermSnapshotRequestFromFrontToApi(model) {
56435
+ return {
56436
+ snapshot_etag: model.snapshotEtag,
56437
+ snapshot_id: model.snapshotId
56438
+ };
56439
+ }
56440
+
55457
56441
  // src/resources/terms.ts
55458
56442
  var TermsClient = class {
55459
56443
  /** @internal */
@@ -55557,6 +56541,11 @@ var TermsClient = class {
55557
56541
  * take as `ifMatch` from the rule routes ({@link AddRuleResponse.etag},
55558
56542
  * {@link RuleEntryDto.etag}).
55559
56543
  *
56544
+ * The term is the caller's view of it (reasoninglayer#1221): a feature
56545
+ * that holds a term the caller's Read grant does not show is left out, and
56546
+ * `etag` is the tag of that view. Send it back as `ifMatch`; a `412` names
56547
+ * the current tag of the caller's view.
56548
+ *
55560
56549
  * @example
55561
56550
  * ```typescript
55562
56551
  * const asIssued = await client.terms.getTerm(orderId, { asOf: invoicedAt });
@@ -55718,7 +56707,7 @@ var TermsClient = class {
55718
56707
  * @throws {@link PreconditionFailedError} 412 when `ifMatch` is stale;
55719
56708
  * `currentEtag` carries the tag the engine holds now.
55720
56709
  * @throws {@link PreconditionRequiredError} 428 when `ifMatch` is omitted
55721
- * and the engine runs with `OSFKB_REQUIRE_IF_MATCH=1`.
56710
+ * and the deployment requires conditional writes.
55722
56711
  * @throws {@link ApiError} 404 when the term does not exist; 422 when the
55723
56712
  * patched term violates its sort's declarations (a scalar literal in a
55724
56713
  * feature whose declared range is an entity sort included); 409 when a bound
@@ -55745,7 +56734,7 @@ var TermsClient = class {
55745
56734
  * last-writer-wins, and two editors of one term silently overwrite each
55746
56735
  * other. Read the term with {@link TermsClient.getTerm}, keep its `etag`,
55747
56736
  * and send it back as `ifMatch`: a write that lost the race answers 412
55748
- * instead of overwriting. An engine started with `OSFKB_REQUIRE_IF_MATCH=1`
56737
+ * instead of overwriting. A deployment that requires conditional writes
55749
56738
  * refuses every term and rule mutation that carries no `ifMatch` (428).
55750
56739
  *
55751
56740
  * @example
@@ -55799,7 +56788,7 @@ var TermsClient = class {
55799
56788
  * rule instead; `ruleIds` names it).
55800
56789
  * @throws {@link PreconditionFailedError} 412 when `ifMatch` is stale.
55801
56790
  * @throws {@link PreconditionRequiredError} 428 when `ifMatch` is omitted
55802
- * and the engine runs with `OSFKB_REQUIRE_IF_MATCH=1`.
56791
+ * and the deployment requires conditional writes.
55803
56792
  * @throws {@link ConstraintViolationError} 409 `term_named_by_rules` under
55804
56793
  * every disposition when a rule names the term, or when a cascade's closure
55805
56794
  * reaches a rule term (withdraw the rule first); 409 `term_has_referrers`
@@ -55936,7 +56925,11 @@ var TermsClient = class {
55936
56925
  * "feature":"price","message":"Constraint violation: …"}]}`. With
55937
56926
  * `partial: true` and BOTH rows bad, the same `422`:
55938
56927
  * `"2 of 2 entries were refused; the whole batch was refused and nothing
55939
- * was written"`.
56928
+ * was written"`. A row the write guard refused carries its closed
56929
+ * `code` (`BulkRowRefusal.code`): `reference_term_unknown` for a
56930
+ * reference to a term that does not exist or that the caller's Read
56931
+ * grant does not show (reasoninglayer#1212), or the write denial a
56932
+ * single-term write answers.
55940
56933
  *
55941
56934
  * **`dryRun` runs every check and writes nothing**, and it answers in the
55942
56935
  * same two shapes. A clean dry run is `200` and reports NO `termIds` —
@@ -55979,7 +56972,7 @@ var TermsClient = class {
55979
56972
  features: convertFeatures(t.features)
55980
56973
  }))
55981
56974
  });
55982
- const response = await this.api.bulkAddTerms(wireRequest, toRequestParams(requestOptions));
56975
+ const response = await this.api.bulkAddTerms(wireRequest, toRequestParams(requestOptions)).catch(rethrowBulkRowCodes);
55983
56976
  return decodeResponse(response, BulkAddTermsResponseFromApiToFront);
55984
56977
  }
55985
56978
  /**
@@ -56145,6 +57138,347 @@ var TermsClient = class {
56145
57138
  requestOptions
56146
57139
  );
56147
57140
  }
57141
+ /**
57142
+ * Open a term's live document
57143
+ *
57144
+ * @param termId - The term (UUID) whose live document it is.
57145
+ * @param requestOptions - Per-call cancellation, timeout and request options.
57146
+ * @returns The engine's answer as `LiveDocStateResponse`, camelCase.
57147
+ * @throws {ApiError} 404: No such term, or the caller may not read it
57148
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
57149
+ *
57150
+ * @remarks Uses GET `/api/v1/terms/{id}/live`.
57151
+ * The whole state and its state vector. A term never edited live answers an empty document at
57152
+ * `through_seq` 0.
57153
+ *
57154
+ * @example
57155
+ * ```typescript
57156
+ * const { state, throughSeq } = await client.terms.openLiveDoc(termId);
57157
+ * ```
57158
+ */
57159
+ async openLiveDoc(termId, requestOptions) {
57160
+ const response = await this.api.openLiveDoc(termId, toRequestParams(requestOptions));
57161
+ return decodeResponse(response, LiveDocStateResponseFromApiToFront);
57162
+ }
57163
+ /**
57164
+ * Read the passages comment anchors point at
57165
+ *
57166
+ * @param termId - The term (UUID) whose live document it is.
57167
+ * @param request - The request (`LiveDocAnchorsRequest`), camelCase; sent snake_case.
57168
+ * @param requestOptions - Per-call cancellation, timeout and request options.
57169
+ * @returns The engine's answer as `LiveDocAnchorsResponse`, camelCase.
57170
+ * @throws {ApiError} 404: No such term, or the caller may not read it
57171
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
57172
+ * @throws {ApiError} 413: A position over 1 KiB
57173
+ * @throws {ApiError} 422: Over 500 anchors, or a position that does not decode
57174
+ *
57175
+ * @remarks Uses POST `/api/v1/terms/{id}/live/anchors`.
57176
+ * Each anchor is resolved against the document as it stands. A reader of the term may call it: it
57177
+ * writes nothing.
57178
+ *
57179
+ * @example
57180
+ * ```typescript
57181
+ * const { passages } = await client.terms.resolveLiveDocAnchors(termId, { anchors: [{ start, end }] });
57182
+ * ```
57183
+ */
57184
+ async resolveLiveDocAnchors(termId, request, requestOptions) {
57185
+ const response = await this.api.resolveLiveDocAnchors(
57186
+ termId,
57187
+ LiveDocAnchorsRequestFromFrontToApi(request),
57188
+ toRequestParams(requestOptions)
57189
+ );
57190
+ return decodeResponse(response, LiveDocAnchorsResponseFromApiToFront);
57191
+ }
57192
+ /**
57193
+ * Check comment support and whether the caller can open a new thread.
57194
+ *
57195
+ * @param termId - The term (UUID) whose live document it is.
57196
+ * @param options - `page`: The saved Frame page the comment would be made on.
57197
+ * @param requestOptions - Per-call cancellation, timeout and request options.
57198
+ * @returns The engine's answer as `FrameCommentCapabilities`, camelCase.
57199
+ * @throws {ApiError} 404: Frame or comments unavailable
57200
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
57201
+ *
57202
+ * @remarks Uses GET `/api/v1/terms/{id}/live/comments`.
57203
+ *
57204
+ * @example
57205
+ * ```typescript
57206
+ * const capabilities = await client.terms.getFrameCommentCapabilities(termId, { page: "home" });
57207
+ * ```
57208
+ */
57209
+ async getFrameCommentCapabilities(termId, options = {}, requestOptions) {
57210
+ const response = await this.api.getFrameCommentCapabilities(
57211
+ termId,
57212
+ { page: options.page },
57213
+ toRequestParams(requestOptions)
57214
+ );
57215
+ return decodeResponse(response, FrameCommentCapabilitiesFromApiToFront);
57216
+ }
57217
+ /**
57218
+ * Store a comment after checking access to its Frame, its sort and its parent.
57219
+ *
57220
+ * @param termId - The term (UUID) whose live document it is.
57221
+ * @param request - The request (`NewFrameComment`), camelCase; sent snake_case.
57222
+ * @param requestOptions - Per-call cancellation, timeout and request options.
57223
+ * @returns The engine's answer as `FrameCommentReceipt`, camelCase.
57224
+ * @throws {ApiError} 404: Frame or parent unavailable
57225
+ * @throws {ApiError} 409: Comment ID is occupied or the scope changed
57226
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
57227
+ * @throws {ApiError} 422: Invalid comment or selection
57228
+ *
57229
+ * @remarks Uses POST `/api/v1/terms/{id}/live/comments`.
57230
+ *
57231
+ * @example
57232
+ * ```typescript
57233
+ * const receipt = await client.terms.createFrameComment(termId, comment);
57234
+ * ```
57235
+ */
57236
+ async createFrameComment(termId, request, requestOptions) {
57237
+ const response = await this.api.createFrameComment(
57238
+ termId,
57239
+ NewFrameCommentFromFrontToApi(request),
57240
+ toRequestParams(requestOptions)
57241
+ );
57242
+ return decodeResponse(response, FrameCommentReceiptFromApiToFront);
57243
+ }
57244
+ /**
57245
+ * What a client lacks
57246
+ *
57247
+ * @param termId - The term (UUID) whose live document it is.
57248
+ * @param request - The request (`LiveDocDiffRequest`), camelCase; sent snake_case.
57249
+ * @param requestOptions - Per-call cancellation, timeout and request options.
57250
+ * @returns The engine's answer as `LiveDocDiffResponse`, camelCase.
57251
+ * @throws {ApiError} 404: No such term, or the caller may not read it
57252
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
57253
+ * @throws {ApiError} 422: Not a Yjs state vector
57254
+ *
57255
+ * @remarks Uses POST `/api/v1/terms/{id}/live/diff`.
57256
+ * One Yjs v1 update bringing the given state vector up to date, and the server's own state vector.
57257
+ *
57258
+ * @example
57259
+ * ```typescript
57260
+ * const diff = await client.terms.diffLiveDoc(termId, { stateVector });
57261
+ * ```
57262
+ */
57263
+ async diffLiveDoc(termId, request, requestOptions) {
57264
+ const response = await this.api.diffLiveDoc(
57265
+ termId,
57266
+ LiveDocDiffRequestFromFrontToApi(request),
57267
+ toRequestParams(requestOptions)
57268
+ );
57269
+ return decodeResponse(response, LiveDocDiffResponseFromApiToFront);
57270
+ }
57271
+ /**
57272
+ * Read a live document's update log
57273
+ *
57274
+ * @param termId - The term (UUID) whose live document it is.
57275
+ * @param options - `after`: Only the updates after this sequence number.
57276
+ * @param requestOptions - Per-call cancellation, timeout and request options.
57277
+ * @returns The engine's answer as `LiveDocUpdatesResponse`, camelCase.
57278
+ * @throws {ApiError} 404: No such term, or the caller may not read it
57279
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
57280
+ *
57281
+ * @remarks Uses GET `/api/v1/terms/{id}/live/updates`.
57282
+ * The updates numbered above `after`, oldest first.
57283
+ *
57284
+ * @example
57285
+ * ```typescript
57286
+ * const { updates } = await client.terms.listLiveDocUpdates(termId, { after: 41 });
57287
+ * ```
57288
+ */
57289
+ async listLiveDocUpdates(termId, options = {}, requestOptions) {
57290
+ const response = await this.api.listLiveDocUpdates(
57291
+ termId,
57292
+ { after: options.after },
57293
+ toRequestParams(requestOptions)
57294
+ );
57295
+ return decodeResponse(response, LiveDocUpdatesResponseFromApiToFront);
57296
+ }
57297
+ /**
57298
+ * Apply edits to a term's live document
57299
+ *
57300
+ * @param termId - The term (UUID) whose live document it is.
57301
+ * @param request - The request (`LiveDocApplyRequest`), camelCase; sent snake_case.
57302
+ * @param requestOptions - Per-call cancellation, timeout and request options.
57303
+ * @returns The engine's answer as `LiveDocSeqResponse`, camelCase.
57304
+ * @throws {ApiError} 403: The caller may read the term but not write it
57305
+ * @throws {ApiError} 404: No such term, or the caller may not read it
57306
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
57307
+ * @throws {ApiError} 413: Over 4 MiB
57308
+ * @throws {ApiError} 422: Not a Yjs v1 update
57309
+ * @throws {ApiError} 503: Busy with other writers; retry after the Retry-After delay
57310
+ *
57311
+ * @remarks Uses POST `/api/v1/terms/{id}/live/updates`.
57312
+ * Appends one Yjs v1 update, attributed to the caller, and answers its number. Live editors
57313
+ * connected to the document receive it.
57314
+ *
57315
+ * @example
57316
+ * ```typescript
57317
+ * const { seq } = await client.terms.applyLiveDocUpdate(termId, { update });
57318
+ * ```
57319
+ */
57320
+ async applyLiveDocUpdate(termId, request, requestOptions) {
57321
+ const response = await this.api.applyLiveDocUpdate(
57322
+ termId,
57323
+ LiveDocApplyRequestFromFrontToApi(request),
57324
+ toRequestParams(requestOptions)
57325
+ );
57326
+ return decodeResponse(response, LiveDocSeqResponseFromApiToFront);
57327
+ }
57328
+ /**
57329
+ * List a live document's versions
57330
+ *
57331
+ * @param termId - The term (UUID) whose live document it is.
57332
+ * @param requestOptions - Per-call cancellation, timeout and request options.
57333
+ * @returns The engine's answer as `LiveDocVersionsResponse`, camelCase.
57334
+ * @throws {ApiError} 404: No such term, or the caller may not read it
57335
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
57336
+ *
57337
+ * @remarks Uses GET `/api/v1/terms/{id}/live/versions`.
57338
+ *
57339
+ * @example
57340
+ * ```typescript
57341
+ * const { versions } = await client.terms.listLiveDocVersions(termId);
57342
+ * ```
57343
+ */
57344
+ async listLiveDocVersions(termId, requestOptions) {
57345
+ const response = await this.api.listLiveDocVersions(termId, toRequestParams(requestOptions));
57346
+ return decodeResponse(response, LiveDocVersionsResponseFromApiToFront);
57347
+ }
57348
+ /**
57349
+ * Name a version of a live document
57350
+ *
57351
+ * @param termId - The term (UUID) whose live document it is.
57352
+ * @param request - The request (`LiveDocNameVersionRequest`), camelCase; sent snake_case.
57353
+ * @param requestOptions - Per-call cancellation, timeout and request options.
57354
+ * @returns The engine's answer as `LiveDocVersionDto`, camelCase.
57355
+ * @throws {ApiError} 403: The caller may read the term but not write it
57356
+ * @throws {ApiError} 404: No such term, or the caller may not read it
57357
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
57358
+ * @throws {ApiError} 503: Busy with other writers; retry after the Retry-After delay
57359
+ *
57360
+ * @remarks Uses POST `/api/v1/terms/{id}/live/versions`.
57361
+ * Keeps the current state as a named version.
57362
+ *
57363
+ * @example
57364
+ * ```typescript
57365
+ * const version = await client.terms.nameLiveDocVersion(termId, { name: "Sent to legal" });
57366
+ * ```
57367
+ */
57368
+ async nameLiveDocVersion(termId, request, requestOptions) {
57369
+ const response = await this.api.nameLiveDocVersion(
57370
+ termId,
57371
+ LiveDocNameVersionRequestFromFrontToApi(request),
57372
+ toRequestParams(requestOptions)
57373
+ );
57374
+ return decodeResponse(response, LiveDocVersionDtoFromApiToFront);
57375
+ }
57376
+ /**
57377
+ * Restore a version of a live document (ENG-365)
57378
+ *
57379
+ * @param termId - The term (UUID) whose live document it is.
57380
+ * @param generation - The version (generation) to restore.
57381
+ * @param requestOptions - Per-call cancellation, timeout and request options.
57382
+ * @returns The engine's answer as `LiveDocSeqResponse`, camelCase.
57383
+ * @throws {ApiError} 403: The caller may read the term but not write it
57384
+ * @throws {ApiError} 404: No such term or version, or the caller may not read the term
57385
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
57386
+ * @throws {ApiError} 503: Busy with other writers; retry after the Retry-After delay
57387
+ *
57388
+ * @remarks Uses POST `/api/v1/terms/{id}/live/versions/{generation}/restore`.
57389
+ * Keeps the current state as a "before restore" version, then brings the old content back as one
57390
+ * new update, so live editors converge and the history stays whole. Answers the update's number.
57391
+ *
57392
+ * @example
57393
+ * ```typescript
57394
+ * await client.terms.restoreLiveDocVersion(termId, 3);
57395
+ * ```
57396
+ */
57397
+ async restoreLiveDocVersion(termId, generation, requestOptions) {
57398
+ const response = await this.api.restoreLiveDocVersion(
57399
+ termId,
57400
+ generation,
57401
+ toRequestParams(requestOptions)
57402
+ );
57403
+ return decodeResponse(response, LiveDocSeqResponseFromApiToFront);
57404
+ }
57405
+ /**
57406
+ * Reapply a saved record snapshot under the normal record write guards.
57407
+ *
57408
+ * @param termId - The term (UUID).
57409
+ * @param request - The request (`RestoreTermSnapshotRequest`), camelCase; sent snake_case.
57410
+ * @param requestOptions - Per-call cancellation, timeout and request options.
57411
+ * @returns The engine's answer as `RestoreTermSnapshotResponse`, camelCase.
57412
+ * @throws {ApiError} 403: The caller cannot edit the record
57413
+ * @throws {ApiError} 404: The record or matching snapshot is unavailable
57414
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
57415
+ * @throws {ApiError} 412: The record changed since review
57416
+ * @throws {ApiError} 422: The snapshot has invalid or unavailable values
57417
+ * @throws {ApiError} 428: A strong record content tag is required
57418
+ * @throws {ApiError} 503: Record history is unavailable
57419
+ *
57420
+ * @remarks Uses POST `/api/v1/terms/{id}/restore-snapshot`.
57421
+ *
57422
+ * @example
57423
+ * ```typescript
57424
+ * await client.terms.restoreTermSnapshot(termId, request);
57425
+ * ```
57426
+ */
57427
+ async restoreTermSnapshot(termId, request, requestOptions) {
57428
+ const response = await this.api.restoreTermSnapshot(
57429
+ termId,
57430
+ RestoreTermSnapshotRequestFromFrontToApi(request),
57431
+ toRequestParams(requestOptions)
57432
+ );
57433
+ return decodeResponse(response, RestoreTermSnapshotResponseFromApiToFront);
57434
+ }
57435
+ /**
57436
+ * List the saved snapshots this caller can review for an editable record.
57437
+ *
57438
+ * @param termId - The term (UUID).
57439
+ * @param requestOptions - Per-call cancellation, timeout and request options.
57440
+ * @returns The engine's answer as `TermSnapshotsResponse`, camelCase.
57441
+ * @throws {ApiError} 403: The caller cannot edit the record
57442
+ * @throws {ApiError} 404: The record is unavailable
57443
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
57444
+ *
57445
+ * @remarks Uses GET `/api/v1/terms/{id}/snapshots`.
57446
+ *
57447
+ * @example
57448
+ * ```typescript
57449
+ * const { snapshots } = await client.terms.listTermSnapshots(termId);
57450
+ * ```
57451
+ */
57452
+ async listTermSnapshots(termId, requestOptions) {
57453
+ const response = await this.api.listTermSnapshots(termId, toRequestParams(requestOptions));
57454
+ return decodeResponse(response, TermSnapshotsResponseFromApiToFront);
57455
+ }
57456
+ /**
57457
+ * Compare a saved snapshot with the record before it is restored.
57458
+ *
57459
+ * @param termId - The term (UUID).
57460
+ * @param snapshot - The snapshot, as `listTermSnapshots` names it.
57461
+ * @param requestOptions - Per-call cancellation, timeout and request options.
57462
+ * @returns The engine's answer as `TermSnapshotPreview`, camelCase.
57463
+ * @throws {ApiError} 403: The caller cannot edit the record
57464
+ * @throws {ApiError} 404: The record or snapshot is unavailable
57465
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
57466
+ *
57467
+ * @remarks Uses GET `/api/v1/terms/{id}/snapshots/{snapshot}`.
57468
+ *
57469
+ * @example
57470
+ * ```typescript
57471
+ * const preview = await client.terms.previewTermSnapshot(termId, snapshot);
57472
+ * ```
57473
+ */
57474
+ async previewTermSnapshot(termId, snapshot, requestOptions) {
57475
+ const response = await this.api.previewTermSnapshot(
57476
+ termId,
57477
+ snapshot,
57478
+ toRequestParams(requestOptions)
57479
+ );
57480
+ return decodeResponse(response, TermSnapshotPreviewFromApiToFront);
57481
+ }
56148
57482
  };
56149
57483
  function withEtag(body, headers) {
56150
57484
  const etag = headers.get("etag");
@@ -56573,7 +57907,7 @@ var InferenceClient = class {
56573
57907
  * `derivations` with `ruleRefusalOf(error)`.
56574
57908
  * @throws {@link PreconditionFailedError} 412 when `ifMatch` is stale.
56575
57909
  * @throws {@link PreconditionRequiredError} 428 when `ifMatch` is omitted
56576
- * and the engine runs with `OSFKB_REQUIRE_IF_MATCH=1`.
57910
+ * and the deployment requires conditional writes.
56577
57911
  *
56578
57912
  * @remarks
56579
57913
  * A rule is not a row. Withdrawing one deletes its conclusion AND the
@@ -56635,7 +57969,7 @@ var InferenceClient = class {
56635
57969
  * `ruleRefusalOf(error)`.
56636
57970
  * @throws {@link PreconditionFailedError} 412 when `ifMatch` is stale.
56637
57971
  * @throws {@link PreconditionRequiredError} 428 when `ifMatch` is omitted
56638
- * and the engine runs with `OSFKB_REQUIRE_IF_MATCH=1`.
57972
+ * and the deployment requires conditional writes.
56639
57973
  * @throws {@link ValidationError} before the request is sent, when a term
56640
57974
  * cannot be encoded, or `antecedents` is not an array — `field` names it
56641
57975
  * (`term`, `antecedents`, `antecedents[i]`).
@@ -56772,7 +58106,7 @@ var InferenceClient = class {
56772
58106
  *
56773
58107
  * `timeoutMs` is a server-side deadline in milliseconds, checked at every
56774
58108
  * fixpoint boundary and every rule application. Omitted means the engine's own
56775
- * backstop (`OSFKB_FC_TIMEOUT_SECS`, 300 s by default); `0` opts out entirely.
58109
+ * time limit (300 s by default); `0` opts out entirely.
56776
58110
  * The route answers `504` when the deadline passes, and the body says whether
56777
58111
  * a `keepDerived` run kept the partial derivation it had reached. A
56778
58112
  * deadline-cut `keepDerived: false` run (`200` or `504`) leaves nothing
@@ -57449,7 +58783,9 @@ function UIGenerateRequestFromFrontToApi(model) {
57449
58783
  pipeline: model.pipeline ?? void 0,
57450
58784
  prompt: model.prompt,
57451
58785
  save_as_page: model.saveAsPage ?? void 0,
57452
- trace: model.trace ?? void 0
58786
+ trace: model.trace ?? void 0,
58787
+ authoring: model.authoring == null ? model.authoring : FrameAuthoringOriginFromFrontToApi(model.authoring),
58788
+ table: model.table == null ? model.table : { sort: model.table.sort, columns: [...model.table.columns] }
57453
58789
  };
57454
58790
  }
57455
58791
  function UIDataRowFromApiToFront(row) {
@@ -57563,6 +58899,9 @@ function osfqlRowFromApiToFront(row) {
57563
58899
  function ConversationMessageRequestFromFrontToApi(model) {
57564
58900
  return {
57565
58901
  source_scope: model.sourceScope,
58902
+ search_web: model.searchWeb,
58903
+ confirm_external: model.confirmExternal,
58904
+ project_id: model.projectId,
57566
58905
  follow_up_to: model.followUpTo,
57567
58906
  resume_answer: model.resumeAnswer,
57568
58907
  clarify_after_repeats: model.clarifyAfterRepeats,
@@ -57772,6 +59111,15 @@ function MatchedEntityDtoFromApiToFront(dto) {
57772
59111
  }
57773
59112
  function ReasoningStageDtoFromApiToFront(dto) {
57774
59113
  return {
59114
+ ...dto.blocked_sites === void 0 ? {} : { blockedSites: dto.blocked_sites },
59115
+ ...dto.elapsed_ms === void 0 ? {} : { elapsedMs: dto.elapsed_ms },
59116
+ ...dto.extracted === void 0 ? {} : { extracted: dto.extracted },
59117
+ ...dto.follow_up_of === void 0 ? {} : { followUpOf: dto.follow_up_of },
59118
+ ...dto.outcome === void 0 ? {} : { outcome: dto.outcome },
59119
+ ...dto.read === void 0 ? {} : { read: dto.read },
59120
+ ...dto.reading_deadline === void 0 ? {} : { readingDeadline: dto.reading_deadline },
59121
+ ...dto.reason === void 0 ? {} : { reason: dto.reason },
59122
+ ...dto.searched === void 0 ? {} : { searched: dto.searched },
57775
59123
  name: dto.name,
57776
59124
  order: dto.order,
57777
59125
  kind: dto.kind,
@@ -57792,6 +59140,7 @@ function ReasoningTraceDtoFromApiToFront(dto) {
57792
59140
  }
57793
59141
  function AbstentionFromApiToFront(dto) {
57794
59142
  const out = { reason: dto.reason };
59143
+ if (dto.cause != null) out.cause = dto.cause;
57795
59144
  if (dto.gate_code != null) out.gateCode = dto.gate_code;
57796
59145
  if (dto.osfql_tried != null) out.osfqlTried = dto.osfql_tried;
57797
59146
  if (dto.answerability != null) out.answerability = dto.answerability;
@@ -57808,6 +59157,8 @@ function ClaimProvenanceFromApiToFront(dto) {
57808
59157
  if (dto.passage_id != null) out.passageId = dto.passage_id;
57809
59158
  if (dto.section != null) out.section = dto.section;
57810
59159
  if (dto.page != null) out.page = dto.page;
59160
+ if (dto.media_start_ms != null) out.mediaStartMs = dto.media_start_ms;
59161
+ if (dto.media_end_ms != null) out.mediaEndMs = dto.media_end_ms;
57811
59162
  return out;
57812
59163
  }
57813
59164
  function ClaimStatedValueFromApiToFront(dto) {
@@ -57854,6 +59205,10 @@ function answerContractFromApiToFront(dto) {
57854
59205
  return {
57855
59206
  ...dto.answer_state != null ? { answerState: dto.answer_state } : {},
57856
59207
  ...dto.abstention != null ? { abstention: AbstentionFromApiToFront(dto.abstention) } : {},
59208
+ ...dto.to_verify === void 0 ? {} : { toVerify: dto.to_verify.map(ToVerifyPointFromApiToFront) },
59209
+ ...dto.web_sources === void 0 ? {} : { webSources: dto.web_sources.map(WebSourceFromApiToFront) },
59210
+ ...dto.unconfirmed === void 0 ? {} : { unconfirmed: dto.unconfirmed.map(UnconfirmedRecordFromApiToFront) },
59211
+ ...dto.unread_pages === void 0 ? {} : { unreadPages: dto.unread_pages.map(UnreadPagesFromApiToFront) },
57857
59212
  claims: (dto.claims ?? []).map(VerifiedClaimFromApiToFront),
57858
59213
  strippedClaims: (dto.stripped_claims ?? []).map(StrippedClaimFromApiToFront),
57859
59214
  nextQuestions: (dto.next_questions ?? []).map((q) => ({
@@ -57948,6 +59303,20 @@ function FrameAmbiguityFromApiToFront(dto) {
57948
59303
  function isJsonObject(value) {
57949
59304
  return typeof value === "object" && value !== null && !Array.isArray(value);
57950
59305
  }
59306
+ function isVerifiedClaimDto(value) {
59307
+ const nullableString2 = (item) => item == null || typeof item === "string";
59308
+ if (!isJsonObject(value)) return false;
59309
+ const { span, provenance, source_term_ids, stated, absence } = value;
59310
+ 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(
59311
+ (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(
59312
+ nullableString2
59313
+ )
59314
+ ) && (stated === void 0 || Array.isArray(stated) && stated.every(
59315
+ (item) => isJsonObject(item) && typeof item.value === "string" && [item.feature_name, item.sort_name, item.term_id].every(nullableString2)
59316
+ )) && (absence == null || isJsonObject(absence) && [absence.declared_by, absence.osfql, absence.sort_id, absence.sort_name].every(
59317
+ (item) => typeof item === "string"
59318
+ ) && nullableString2(absence.package_id));
59319
+ }
57951
59320
  function isConversationMessageResponseDto(value) {
57952
59321
  if (!isJsonObject(value)) return false;
57953
59322
  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"));
@@ -57961,6 +59330,19 @@ function ConversationStreamEventFromApiToFront(event, payload) {
57961
59330
  return response === null ? null : { type: "done", response };
57962
59331
  }
57963
59332
  if (!isJsonObject(payload)) return null;
59333
+ if (event === "claim") {
59334
+ return isVerifiedClaimDto(payload) ? { type: "claim", claim: VerifiedClaimFromApiToFront(payload) } : null;
59335
+ }
59336
+ if (event === "step_start" || event === "step_end") {
59337
+ const { stage_id: stageId, kind, order, outcome } = payload;
59338
+ if (typeof stageId !== "string" || kind !== "symbolic" && kind !== "sensor" || typeof order !== "number" || !Number.isSafeInteger(order))
59339
+ return null;
59340
+ if (event === "step_start" && outcome === null)
59341
+ return { type: event, stageId, kind, order, outcome };
59342
+ if (event === "step_end" && typeof outcome === "string")
59343
+ return { type: event, stageId, kind, order, outcome };
59344
+ return null;
59345
+ }
57964
59346
  if (event === "token") {
57965
59347
  const delta = Reflect.get(payload, "delta");
57966
59348
  return typeof delta === "string" ? { type: "token", delta } : null;
@@ -57994,6 +59376,7 @@ function TurnDtoFromApiToFront(dto) {
57994
59376
  validityCertificateRuleProgramHash: dto.validity_certificate_rule_program_hash ?? void 0,
57995
59377
  validityCertificateRuleRevision: dto.validity_certificate_rule_revision ?? void 0,
57996
59378
  ...answerContractFromApiToFront(dto),
59379
+ ...dto.follow_up_of === void 0 ? {} : { followUpOf: dto.follow_up_of },
57997
59380
  framePages: (dto.frame_pages ?? []).map((page) => ({
57998
59381
  frameId: page.frame_id,
57999
59382
  page: page.page,
@@ -58111,6 +59494,68 @@ function SessionGraphDtoFromApiToFront(dto) {
58111
59494
  resolvedCoreferences: dto.resolved_coreferences.map(ResolvedCoreferenceDtoFromApiToFront)
58112
59495
  };
58113
59496
  }
59497
+ function ClaimAttestationRequestFromFrontToApi(model) {
59498
+ return { turn_id: model.turnId, point_ref: model.pointRef, kind: model.kind };
59499
+ }
59500
+ function ClaimAttestationResponseFromApiToFront(dto) {
59501
+ if (dto.kind !== "confirmed" && dto.kind !== "reported_error") {
59502
+ throw new TypeError(`Unknown claim attestation kind: ${dto.kind}`);
59503
+ }
59504
+ return {
59505
+ attestationId: dto.attestation_id,
59506
+ conversationId: dto.conversation_id,
59507
+ turnId: dto.turn_id,
59508
+ pointRef: dto.point_ref,
59509
+ kind: dto.kind,
59510
+ attestedBy: dto.attested_by,
59511
+ attestedAt: dto.attested_at
59512
+ };
59513
+ }
59514
+ function UnconfirmedRecordFromApiToFront(dto) {
59515
+ const out = { recordId: dto.record_id, sort: dto.sort };
59516
+ if (dto.document_id != null) out.documentId = dto.document_id;
59517
+ if (dto.passage_id != null) out.passageId = dto.passage_id;
59518
+ if (dto.provenance != null) out.provenance = dto.provenance;
59519
+ if (dto.status != null) out.status = dto.status;
59520
+ if (dto.text != null) out.text = dto.text;
59521
+ if (dto.start_seconds != null) out.startSeconds = dto.start_seconds;
59522
+ if (dto.end_seconds != null) out.endSeconds = dto.end_seconds;
59523
+ if (dto.page_start != null) out.pageStart = dto.page_start;
59524
+ if (dto.page_end != null) out.pageEnd = dto.page_end;
59525
+ return out;
59526
+ }
59527
+ function UnreadPagesFromApiToFront(dto) {
59528
+ return { documentId: dto.document_id, pages: [...dto.pages], reason: dto.reason };
59529
+ }
59530
+ function ToVerifyPointFromApiToFront(dto) {
59531
+ return {
59532
+ ...dto.attestations === void 0 ? {} : { attestations: dto.attestations },
59533
+ ...dto.fact_term_ids === void 0 ? {} : { factTermIds: dto.fact_term_ids },
59534
+ kind: dto.kind,
59535
+ pointRef: dto.point_ref,
59536
+ reason: dto.reason,
59537
+ ...dto.record_term_id === void 0 ? {} : { recordTermId: dto.record_term_id },
59538
+ text: dto.text
59539
+ };
59540
+ }
59541
+ function WebSourceQualificationFromApiToFront(dto) {
59542
+ return {
59543
+ ...dto.explanation === void 0 ? {} : { explanation: dto.explanation },
59544
+ level: dto.level,
59545
+ ...dto.rule_id === void 0 ? {} : { ruleId: dto.rule_id }
59546
+ };
59547
+ }
59548
+ function WebSourceFromApiToFront(dto) {
59549
+ return {
59550
+ ...dto.fetched_at === void 0 ? {} : { fetchedAt: dto.fetched_at },
59551
+ qualification: WebSourceQualificationFromApiToFront(dto.qualification),
59552
+ recordTermId: dto.record_term_id,
59553
+ ...dto.source_verdict === void 0 ? {} : { sourceVerdict: dto.source_verdict },
59554
+ ...dto.title === void 0 ? {} : { title: dto.title },
59555
+ url: dto.url,
59556
+ used: dto.used
59557
+ };
59558
+ }
58114
59559
 
58115
59560
  // src/normalizers/query.ts
58116
59561
  function TrizRecordOutcomeRequestFromFrontToApi(model) {
@@ -59467,6 +60912,135 @@ function AgentRecallAsOfResponseFromApiToFront(dto) {
59467
60912
  };
59468
60913
  }
59469
60914
 
60915
+ // src/normalizers/agent-instructions.ts
60916
+ function AgentInstructionsViewFromApiToFront(dto) {
60917
+ return {
60918
+ draft: dto.draft == null ? dto.draft : InstructionsDraftViewFromApiToFront(dto.draft),
60919
+ publishedBody: dto.published_body,
60920
+ publishedRevision: dto.published_revision
60921
+ };
60922
+ }
60923
+ function InstructionsDraftViewFromApiToFront(dto) {
60924
+ return {
60925
+ body: dto.body,
60926
+ rehearsed: dto.rehearsed,
60927
+ revision: dto.revision
60928
+ };
60929
+ }
60930
+ function AgentRehearsalViewFromApiToFront(dto) {
60931
+ return {
60932
+ answer: ConversationMessageResponseFromApiToFront(dto.answer),
60933
+ instructions: AgentInstructionsViewFromApiToFront(dto.instructions)
60934
+ };
60935
+ }
60936
+ function AgentSkillsResponseFromApiToFront(dto) {
60937
+ return {
60938
+ agentId: dto.agent_id,
60939
+ definitionVersion: dto.definition_version,
60940
+ skills: dto.skills.map((item0) => item0)
60941
+ };
60942
+ }
60943
+ function AgentSkillsRequestFromFrontToApi(model) {
60944
+ return {
60945
+ skills: model.skills.map((item0) => item0)
60946
+ };
60947
+ }
60948
+ function PublishAgentInstructionsFromFrontToApi(model) {
60949
+ return {
60950
+ revision: model.revision
60951
+ };
60952
+ }
60953
+ function RehearseAgentInstructionsFromFrontToApi(model) {
60954
+ return {
60955
+ context_term_ids: model.contextTermIds,
60956
+ conversation_id: model.conversationId,
60957
+ message: model.message,
60958
+ project_id: model.projectId,
60959
+ revision: model.revision
60960
+ };
60961
+ }
60962
+ function SaveAgentInstructionsFromFrontToApi(model) {
60963
+ return {
60964
+ body: model.body,
60965
+ expected_revision: model.expectedRevision
60966
+ };
60967
+ }
60968
+ function isAgentRehearsalView(value) {
60969
+ return componentFault(value, "AgentRehearsalView", "done") === void 0;
60970
+ }
60971
+ function AgentRehearsalEventFromApiToFront(event, payload) {
60972
+ if (event === "done") {
60973
+ return isAgentRehearsalView(payload) ? { type: "done", rehearsal: AgentRehearsalViewFromApiToFront(payload) } : null;
60974
+ }
60975
+ if (typeof payload !== "object" || payload === null) return null;
60976
+ if (event === "token") {
60977
+ const delta = Reflect.get(payload, "delta");
60978
+ return typeof delta === "string" ? { type: "token", delta } : null;
60979
+ }
60980
+ if (event === "error") {
60981
+ const error = Reflect.get(payload, "error");
60982
+ const status = Reflect.get(payload, "status");
60983
+ if (typeof error !== "string") return null;
60984
+ return typeof status === "number" ? { type: "error", error, status } : { type: "error", error };
60985
+ }
60986
+ return null;
60987
+ }
60988
+
60989
+ // src/utils/sse.ts
60990
+ var FRAME_SEPARATORS = ["\r\n\r\n", "\n\n", "\r\r"];
60991
+ var LINE_TERMINATOR = /\r\n|\n|\r/;
60992
+ async function* readSseFrames(body) {
60993
+ const reader = body.getReader();
60994
+ const decoder = new TextDecoder();
60995
+ let buffer = "";
60996
+ try {
60997
+ for (; ; ) {
60998
+ const chunk = await reader.read();
60999
+ if (chunk.done) break;
61000
+ buffer += decoder.decode(chunk.value, { stream: true });
61001
+ let boundary = findFrameBoundary(buffer);
61002
+ while (boundary !== null) {
61003
+ const frame = decodeFrame(buffer.slice(0, boundary.index));
61004
+ buffer = buffer.slice(boundary.index + boundary.length);
61005
+ if (frame !== null) yield frame;
61006
+ boundary = findFrameBoundary(buffer);
61007
+ }
61008
+ }
61009
+ buffer += decoder.decode();
61010
+ const trailing = decodeFrame(buffer);
61011
+ if (trailing !== null) yield trailing;
61012
+ } finally {
61013
+ await reader.cancel().catch(() => void 0);
61014
+ }
61015
+ }
61016
+ function findFrameBoundary(buffer) {
61017
+ let found = null;
61018
+ for (const separator of FRAME_SEPARATORS) {
61019
+ const index = buffer.indexOf(separator);
61020
+ if (index === -1) continue;
61021
+ if (found === null || index < found.index || index === found.index && separator.length > found.length) {
61022
+ found = { index, length: separator.length };
61023
+ }
61024
+ }
61025
+ return found;
61026
+ }
61027
+ function decodeFrame(text2) {
61028
+ const dataLines = [];
61029
+ let event;
61030
+ for (const line of text2.split(LINE_TERMINATOR)) {
61031
+ if (line === "" || line.startsWith(":")) continue;
61032
+ const colon = line.indexOf(":");
61033
+ const field = colon === -1 ? line : line.slice(0, colon);
61034
+ const rawValue = colon === -1 ? "" : line.slice(colon + 1);
61035
+ const value = rawValue.startsWith(" ") ? rawValue.slice(1) : rawValue;
61036
+ if (field === "data") dataLines.push(value);
61037
+ else if (field === "event") event = value;
61038
+ }
61039
+ const data = dataLines.join("\n");
61040
+ if (data === "") return null;
61041
+ return { event: event === "" ? void 0 : event, data };
61042
+ }
61043
+
59470
61044
  // src/resources/cognitive.ts
59471
61045
  var CognitiveClient = class {
59472
61046
  /** @internal */
@@ -60404,6 +61978,160 @@ var CognitiveClient = class {
60404
61978
  }
60405
61979
  };
60406
61980
  }
61981
+ /**
61982
+ * getAgentInstructions
61983
+ *
61984
+ * @param agentId - The agent (UUID).
61985
+ * @param requestOptions - Per-call cancellation, timeout and request options.
61986
+ * @returns The engine's answer as `AgentInstructionsView`, camelCase.
61987
+ * @throws {ApiError} 403: Named edit access required
61988
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
61989
+ *
61990
+ * @remarks Uses GET `/api/v1/cognitive/agents/{agent_id}/instructions`.
61991
+ *
61992
+ * @example
61993
+ * ```typescript
61994
+ * const view = await client.cognitive.getAgentInstructions(agentId);
61995
+ * ```
61996
+ */
61997
+ async getAgentInstructions(agentId, requestOptions) {
61998
+ const response = await this.api.get(agentId, toRequestParams(requestOptions));
61999
+ return decodeResponse(response, AgentInstructionsViewFromApiToFront);
62000
+ }
62001
+ /**
62002
+ * saveAgentInstructions
62003
+ *
62004
+ * @param agentId - The agent (UUID).
62005
+ * @param request - The request (`SaveAgentInstructions`), camelCase; sent snake_case.
62006
+ * @param requestOptions - Per-call cancellation, timeout and request options.
62007
+ * @returns The engine's answer as `AgentInstructionsView`, camelCase.
62008
+ * @throws {ApiError} 403: Named edit access required
62009
+ * @throws {ApiError} 409: Draft changed while it was being edited
62010
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
62011
+ *
62012
+ * @remarks Uses PUT `/api/v1/cognitive/agents/{agent_id}/instructions`.
62013
+ *
62014
+ * @example
62015
+ * ```typescript
62016
+ * await client.cognitive.saveAgentInstructions(agentId, draft);
62017
+ * ```
62018
+ */
62019
+ async saveAgentInstructions(agentId, request, requestOptions) {
62020
+ const response = await this.api.save(
62021
+ agentId,
62022
+ SaveAgentInstructionsFromFrontToApi(request),
62023
+ toRequestParams(requestOptions)
62024
+ );
62025
+ return decodeResponse(response, AgentInstructionsViewFromApiToFront);
62026
+ }
62027
+ /**
62028
+ * publishAgentInstructions
62029
+ *
62030
+ * @param agentId - The agent (UUID).
62031
+ * @param request - The request (`PublishAgentInstructions`), camelCase; sent snake_case.
62032
+ * @param requestOptions - Per-call cancellation, timeout and request options.
62033
+ * @returns The engine's answer as `AgentInstructionsView`, camelCase.
62034
+ * @throws {ApiError} 403: Named edit access required
62035
+ * @throws {ApiError} 409: The requested draft has changed
62036
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
62037
+ * @throws {ApiError} 422: Rehearse this draft before publishing
62038
+ *
62039
+ * @remarks Uses POST `/api/v1/cognitive/agents/{agent_id}/instructions/publish`.
62040
+ *
62041
+ * @example
62042
+ * ```typescript
62043
+ * await client.cognitive.publishAgentInstructions(agentId, request);
62044
+ * ```
62045
+ */
62046
+ async publishAgentInstructions(agentId, request, requestOptions) {
62047
+ const response = await this.api.publish(
62048
+ agentId,
62049
+ PublishAgentInstructionsFromFrontToApi(request),
62050
+ toRequestParams(requestOptions)
62051
+ );
62052
+ return decodeResponse(response, AgentInstructionsViewFromApiToFront);
62053
+ }
62054
+ /**
62055
+ * Rehearse a draft of an agent's instructions: the agent answers one message
62056
+ * under the draft, streamed, and the rehearsal is recorded on the draft.
62057
+ *
62058
+ * @param agentId - The agent (UUID).
62059
+ * @param request - The rehearsal (`RehearseAgentInstructions`): the draft revision and the message.
62060
+ * @param requestOptions - Per-call cancellation, timeout and request options.
62061
+ * @returns The stream's events: `token` (an answer delta), then `done` with the
62062
+ * saved instructions receipt and the answer, or `error`.
62063
+ * @throws {ApiError} 403 without named edit access and agent scope; 409 when the
62064
+ * requested draft changed; 503 when agent authoring is unavailable.
62065
+ * @throws {NetworkError} When the stream carries no event stream, a malformed
62066
+ * event, or ends without a `done` or `error` event.
62067
+ *
62068
+ * @remarks Uses POST `/api/v1/cognitive/agents/{agent_id}/instructions/rehearse`
62069
+ * (`text/event-stream`). Errors after the stream opened arrive as `error` events.
62070
+ *
62071
+ * @example
62072
+ * ```typescript
62073
+ * for await (const event of client.cognitive.rehearseAgentInstructions(agentId, request)) {
62074
+ * if (event.type === 'done') console.log(event.rehearsal.answer.assistantMessage);
62075
+ * }
62076
+ * ```
62077
+ */
62078
+ async *rehearseAgentInstructions(agentId, request, requestOptions) {
62079
+ const response = await this.api.rehearse(
62080
+ agentId,
62081
+ RehearseAgentInstructionsFromFrontToApi(request),
62082
+ mergeRequestParams({ headers: { Accept: "text/event-stream" } }, requestOptions)
62083
+ );
62084
+ const body = response.body;
62085
+ if (body === null) throw new NetworkError("Rehearsal response carried no event stream");
62086
+ for await (const frame of readSseFrames(body)) {
62087
+ if (frame.event !== "token" && frame.event !== "done" && frame.event !== "error") continue;
62088
+ let payload;
62089
+ try {
62090
+ payload = JSON.parse(frame.data);
62091
+ } catch (error) {
62092
+ throw new NetworkError(
62093
+ `Rehearsal stream carried a malformed JSON '${frame.event}' event: ${frame.data}`,
62094
+ error instanceof Error ? error : void 0
62095
+ );
62096
+ }
62097
+ const event = AgentRehearsalEventFromApiToFront(frame.event, payload);
62098
+ if (event === null) {
62099
+ throw new NetworkError(
62100
+ `Rehearsal stream carried a '${frame.event}' event that does not fit its contract: ${frame.data}`
62101
+ );
62102
+ }
62103
+ yield event;
62104
+ if (event.type !== "token") return;
62105
+ }
62106
+ throw new NetworkError("Rehearsal stream ended without a done or error event");
62107
+ }
62108
+ /**
62109
+ * State an agent's skills.
62110
+ *
62111
+ * @param agentId - The agent (UUID).
62112
+ * @param request - The request (`AgentSkillsRequest`), camelCase; sent snake_case.
62113
+ * @param requestOptions - Per-call cancellation, timeout and request options.
62114
+ * @returns The engine's answer as `AgentSkillsResponse`, camelCase.
62115
+ * @throws {ApiError} 403: The caller is not the agent's Owner or a Space admin — `code: agent_skills_not_yours`
62116
+ * @throws {ApiError} 404: No such agent in this Space
62117
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
62118
+ * @throws {ApiError} 422: A skill is no task template of this Space — `code: agent_skill_unknown`
62119
+ *
62120
+ * @remarks Uses PUT `/api/v1/cognitive/agents/{agent_id}/skills`.
62121
+ *
62122
+ * @example
62123
+ * ```typescript
62124
+ * await client.cognitive.putAgentSkills(agentId, request);
62125
+ * ```
62126
+ */
62127
+ async putAgentSkills(agentId, request, requestOptions) {
62128
+ const response = await this.api.putAgentSkills(
62129
+ agentId,
62130
+ AgentSkillsRequestFromFrontToApi(request),
62131
+ toRequestParams(requestOptions)
62132
+ );
62133
+ return decodeResponse(response, AgentSkillsResponseFromApiToFront);
62134
+ }
60407
62135
  };
60408
62136
 
60409
62137
  // src/normalizers/native-goal.ts
@@ -64279,7 +66007,9 @@ function IngestionConfigDtoFromFrontToApi(model) {
64279
66007
  reject_anonymized_references: model.rejectAnonymizedReferences,
64280
66008
  skip_fingerprint: model.skipFingerprint,
64281
66009
  fresh_work: model.freshWork,
64282
- skip_relation_completion: model.skipRelationCompletion
66010
+ skip_relation_completion: model.skipRelationCompletion,
66011
+ text_provenance: model.textProvenance,
66012
+ derived_from: model.derivedFrom
64283
66013
  };
64284
66014
  }
64285
66015
  function ChunkFailureDtoFromApiToFront(dto) {
@@ -64373,6 +66103,13 @@ function IngestionWorkCacheDtoFromApiToFront(dto) {
64373
66103
  reusedRecordedTokenUsage: TokenUsageDtoFromApiToFront(dto.reused_recorded_token_usage)
64374
66104
  };
64375
66105
  }
66106
+ function IngestionValuePassDtoFromApiToFront(dto) {
66107
+ return {
66108
+ valuesRead: dto.values_read,
66109
+ valuesHeld: dto.values_held,
66110
+ passagesNotRead: dto.passages_not_read
66111
+ };
66112
+ }
64376
66113
  function AlignmentStatsDtoFromApiToFront(dto) {
64377
66114
  return {
64378
66115
  avgFuzzyRatio: dto.avg_fuzzy_ratio,
@@ -64895,7 +66632,8 @@ function DocumentStatsDtoFromApiToFront(dto) {
64895
66632
  termIds: dto.term_ids,
64896
66633
  totalTokens: dto.total_tokens,
64897
66634
  fcaDiscovery: dto.fca_discovery ? FcaIngestionReportFromApiToFront(dto.fca_discovery) : void 0,
64898
- workCache: dto.work_cache ? IngestionWorkCacheDtoFromApiToFront(dto.work_cache) : void 0
66635
+ workCache: dto.work_cache ? IngestionWorkCacheDtoFromApiToFront(dto.work_cache) : void 0,
66636
+ ...dto.value_pass ? { valuePass: IngestionValuePassDtoFromApiToFront(dto.value_pass) } : {}
64899
66637
  };
64900
66638
  }
64901
66639
  function SessionStatsResponseFromApiToFront(dto) {
@@ -65152,6 +66890,8 @@ function isIngestUrlStoreFailedBody(body) {
65152
66890
  }
65153
66891
  function WebSearchRequestFromFrontToApi(model) {
65154
66892
  const dto = { query: model.query };
66893
+ if (model.confirmExternal !== void 0) dto.confirm_external = model.confirmExternal;
66894
+ if (model.project !== void 0) dto.project = model.project;
65155
66895
  if (model.limit !== void 0) dto.limit = model.limit;
65156
66896
  return dto;
65157
66897
  }
@@ -65255,6 +66995,19 @@ function IngestAudioResponseFromApiToFront(dto) {
65255
66995
  translatedLang: dto.translated_lang ?? void 0
65256
66996
  };
65257
66997
  }
66998
+ function LiveRecordingViewFromApiToFront(dto) {
66999
+ const out = {
67000
+ id: dto.id,
67001
+ state: dto.state,
67002
+ bytes: dto.bytes,
67003
+ durationSecs: dto.duration_secs,
67004
+ finals: dto.finals.map((final) => ({ ...final }))
67005
+ };
67006
+ if (dto.audio_file_id != null) out.audioFileId = dto.audio_file_id;
67007
+ if (dto.error != null) out.error = dto.error;
67008
+ if (dto.result != null) out.result = IngestAudioResponseFromApiToFront(dto.result);
67009
+ return out;
67010
+ }
65258
67011
  function CreateRdfUploadRequestFromFrontToApi(request) {
65259
67012
  return {
65260
67013
  name: request.name,
@@ -65301,6 +67054,57 @@ function RdfUploadPauseReceiptFromApiToFront(dto) {
65301
67054
  status: dto.status
65302
67055
  };
65303
67056
  }
67057
+ function VideoIngestRequestFromFrontToApi(model) {
67058
+ const options = model.options;
67059
+ const asr = options?.asr;
67060
+ return {
67061
+ video_base64: model.videoBase64,
67062
+ ...model.filename !== void 0 ? { filename: model.filename } : {},
67063
+ ...options !== void 0 ? {
67064
+ options: {
67065
+ ...asr !== void 0 ? {
67066
+ asr: {
67067
+ ...asr.diarize !== void 0 ? { diarize: asr.diarize } : {},
67068
+ ...asr.language !== void 0 ? { language: asr.language } : {},
67069
+ ...asr.numSpeakers !== void 0 ? { num_speakers: asr.numSpeakers } : {}
67070
+ }
67071
+ } : {},
67072
+ ...options.lanes !== void 0 ? { lanes: options.lanes } : {},
67073
+ ...options.maxFrames !== void 0 ? { max_frames: options.maxFrames } : {},
67074
+ ...options.sceneThreshold !== void 0 ? { scene_threshold: options.sceneThreshold } : {},
67075
+ ...options.visionTemplate !== void 0 ? { vision_template: options.visionTemplate } : {}
67076
+ }
67077
+ } : {}
67078
+ };
67079
+ }
67080
+ function VideoIngestResponseFromApiToFront(dto) {
67081
+ return {
67082
+ stats: IngestionStatsDtoFromApiToFront(dto.stats),
67083
+ evidence: {
67084
+ documentTermId: dto.evidence.document_term_id,
67085
+ locatedTerms: dto.evidence.located_terms,
67086
+ unlocatedTermIds: dto.evidence.unlocated_term_ids
67087
+ }
67088
+ };
67089
+ }
67090
+ function RetainedOriginalFromApiToFront(dto) {
67091
+ return {
67092
+ id: dto.id,
67093
+ name: dto.name,
67094
+ size: dto.size,
67095
+ contentUrl: dto.content_url
67096
+ };
67097
+ }
67098
+ function QueuedVideoIngestResponseFromApiToFront(dto) {
67099
+ return {
67100
+ documentId: dto.document_id,
67101
+ sessionId: dto.session_id,
67102
+ status: dto.status,
67103
+ statusUrl: dto.status_url,
67104
+ originalFiles: dto.original_files.map(RetainedOriginalFromApiToFront),
67105
+ sourceText: dto.source_text
67106
+ };
67107
+ }
65304
67108
 
65305
67109
  // src/resources/ingestion-session.ts
65306
67110
  var IngestionFailedError = class extends ReasoningLayerError {
@@ -65946,15 +67750,38 @@ var IngestionClient = class {
65946
67750
  * @param request - The SUO-KIF source, an optional `goal`/`query` to
65947
67751
  * prove, and a `persist` flag (import into the tenant substrate vs an
65948
67752
  * ephemeral request-scoped world).
67753
+ * @param requestOptions - Per-call request options.
65949
67754
  * @returns Import counts (forms, facts, rules, sorts, …) plus, when a
65950
67755
  * goal/query was supplied, a `provable` verdict and the non-firing
65951
67756
  * residue breakdown.
67757
+ * @throws {GovernanceRefusedError} With `persist: true`, when the write
67758
+ * guard refuses a fact, individual or rule the import writes; nothing of
67759
+ * the import is stored. `403` `reserved_sort_write_refused`,
67760
+ * `sort_write_not_granted`, `operational_authority_denied` or
67761
+ * `operational_authority_undetermined`; `409` `authz_relation_derived`;
67762
+ * `422`
67763
+ * `operational_rule_conclusion`, `authz_rule_shape`,
67764
+ * `authz_parent_of_sort_refused` or `filing_term_unread`.
67765
+ * @throws {VocabularyRefusedError} `409` `governed_sort_write_refused`: that
67766
+ * code is in the vocabulary set too, which the SDK reads first.
67767
+ *
67768
+ * @remarks
67769
+ * Sent to `POST /api/v1/ingest/kif`; the body is snake_case on the wire.
67770
+ * The refusals are the engine's `GovernanceRefusalBody`
67771
+ * (`{ error, code, message }`), read into a typed
67772
+ * `GovernanceRefusedError`; any other failure stays the plain `ApiError`.
67773
+ *
67774
+ * @example
67775
+ * ```typescript
67776
+ * const result = await client.ingestion.ingestKif({
67777
+ * content: '(instance Socrates Human)',
67778
+ * persist: true,
67779
+ * });
67780
+ * console.log(result.facts);
67781
+ * ```
65952
67782
  */
65953
67783
  async ingestKif(request, requestOptions) {
65954
- const response = await this.api.ingestKif(
65955
- IngestKifRequestFromFrontToApi(request),
65956
- toRequestParams(requestOptions)
65957
- );
67784
+ const response = await this.api.ingestKif(IngestKifRequestFromFrontToApi(request), toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
65958
67785
  return decodeResponse(response, IngestKifResponseFromApiToFront);
65959
67786
  }
65960
67787
  /**
@@ -66385,6 +68212,10 @@ var IngestionClient = class {
66385
68212
  * @returns The pages read (created, updated or unchanged) and the pages
66386
68213
  * skipped, each with a reason.
66387
68214
  * @throws {BadRequestError} If the body is malformed.
68215
+ * @throws {ForbiddenError} `403` when the Space's boundary refuses the start host.
68216
+ * `errorBodyCode` gives the reason, such as `egress_denied`.
68217
+ * @throws {PreconditionRequiredError} `428` with `boundary_needs_confirmation`
68218
+ * when the Web connector requires confirmation before fetching the page.
66388
68219
  * @throws {ApiError} `422` if the URL is not absolute `http`/`https`, a
66389
68220
  * limit is out of range (depth above `maxDepthLimit`, pages above
66390
68221
  * `maxPagesLimit`), the body has an unknown field, or the crawl ingested
@@ -66454,13 +68285,16 @@ var IngestionClient = class {
66454
68285
  * Search the web through the deployment's search providers —
66455
68286
  * `POST /api/v1/web/search`.
66456
68287
  *
66457
- * @param request - The query and, optionally, the number of results.
68288
+ * @param request - The query, result limit, project and confirmation for this search.
66458
68289
  * @param requestOptions - Per-call request options.
66459
68290
  * @returns The trimmed query and the pages found, best first.
66460
68291
  * @throws {BadRequestError} `400` if the body is malformed.
66461
68292
  * @throws {ApiError} `422` if the query is blank or longer than
66462
68293
  * `webSearch.maxQueryChars`, the `limit` is out of range (1 to
66463
- * `webSearch.maxResultsLimit`), or the body has an unknown field.
68294
+ * `webSearch.maxResultsLimit`), the project is malformed, or the body has an unknown field.
68295
+ * @throws {ForbiddenError} `403` when the setting, boundary or connector refuses the search.
68296
+ * @throws {PreconditionRequiredError} `428` with `boundary_needs_confirmation`
68297
+ * when the boundary requires the person to confirm this call.
66464
68298
  * @throws {InternalServerError} `502` with `errorBodyCode`
66465
68299
  * `'web_search_providers_failed'` if every registered provider failed
66466
68300
  * this search. The next call can succeed.
@@ -66534,6 +68368,72 @@ var IngestionClient = class {
66534
68368
  );
66535
68369
  return decodeResponse(response, IngestAudioResponseFromApiToFront);
66536
68370
  }
68371
+ /**
68372
+ * Ingest a short video: read its timeline (speech, screen text, scenes) and
68373
+ * ingest the text with the full ontology extraction —
68374
+ * `POST /api/v1/ingest/video`.
68375
+ *
68376
+ * @param request - The clip in base64, its file name, and the timeline
68377
+ * options.
68378
+ * @param requestOptions - `sync` flag plus per-call request options. `sync`
68379
+ * defaults to `true`.
68380
+ * @returns `inline` with the statistics and the evidence receipt (HTTP 201),
68381
+ * or, with `sync: false`, `queued` with an {@link IngestionSession} and the
68382
+ * 202 body (HTTP 202).
68383
+ * @throws {BadRequestError} `400` if `videoBase64` is not standard base64,
68384
+ * or the clip is empty or over 16 MiB.
68385
+ * @throws {ForbiddenError} `403` if the caller may not write, or a
68386
+ * `sync: false` call carries no acting user
68387
+ * (`errorBodyCode(e) === 'ingestion_execution_actor_required'`).
68388
+ * @throws {InternalServerError} `500` if the timeline service failed or
68389
+ * answered invalid evidence, or the ingestion failed; nothing was
68390
+ * committed.
68391
+ * @throws {ServiceUnavailableError} `503` if no video timeline service is
68392
+ * configured.
68393
+ * @throws {IngestionQueueUnavailableError} With `sync: false`, a `503`
68394
+ * becomes this error: the deployment runs no background queue, session
68395
+ * tracking or task retention (or no timeline service).
68396
+ *
68397
+ * @remarks
68398
+ * Request body is snake_case on the wire (`video_base64`,
68399
+ * `options.max_frames`, `options.asr.num_speakers`); `sync` travels as a
68400
+ * query parameter. The run commits the document, its terms, the video
68401
+ * evidence and one passage per utterance or frame together, or none of
68402
+ * them. The SDK reads the HTTP status to tell the two answers apart.
68403
+ *
68404
+ * @example
68405
+ * ```ts
68406
+ * const outcome = await client.ingestion.ingestVideo({ videoBase64: clip, filename: 'demo.mp4' });
68407
+ * if (outcome.kind === 'inline') console.log(outcome.result.evidence.locatedTerms);
68408
+ * ```
68409
+ */
68410
+ async ingestVideo(request, requestOptions) {
68411
+ const sync = requestOptions?.sync ?? true;
68412
+ let response;
68413
+ try {
68414
+ response = await this.api.http.request({
68415
+ ...toRequestParams(requestOptions),
68416
+ path: `/api/v1/ingest/video`,
68417
+ method: "POST",
68418
+ query: { sync },
68419
+ body: VideoIngestRequestFromFrontToApi(request),
68420
+ secure: true,
68421
+ type: "application/json",
68422
+ format: "json"
68423
+ });
68424
+ } catch (error) {
68425
+ throw sync ? error : asQueueRefusal(error);
68426
+ }
68427
+ return decodeResponse(response, (data) => {
68428
+ if (response.status === 202) {
68429
+ if (!("status_url" in data)) throw contractViolation("/ingest/video", 202);
68430
+ const queued = QueuedVideoIngestResponseFromApiToFront(data);
68431
+ return { kind: "queued", session: new IngestionSession(this.api, queued), queued };
68432
+ }
68433
+ if ("status_url" in data) throw contractViolation("/ingest/video", response.status);
68434
+ return { kind: "inline", result: VideoIngestResponseFromApiToFront(data) };
68435
+ });
68436
+ }
66537
68437
  /**
66538
68438
  * Poll an audio ingestion job — `GET /api/v1/ingest/audio/jobs/{job_id}`.
66539
68439
  *
@@ -66586,6 +68486,92 @@ var IngestionClient = class {
66586
68486
  const response = await this.api.resumeAudioJob(jobId, toRequestParams(requestOptions));
66587
68487
  return decodeResponse(response, IngestAudioResponseFromApiToFront);
66588
68488
  }
68489
+ /**
68490
+ * Read a live recording — `GET /api/v1/audio/recordings/{id}`.
68491
+ *
68492
+ * @param id - The live recording id the client chose when it opened the
68493
+ * caption socket (`/ws/audio/stream?protocol_version=2&recording=<id>`).
68494
+ * @param requestOptions - Per-call request options.
68495
+ * @returns Its state, the audio held and the finals so far; once `ready`,
68496
+ * the retained original and the parse-only audio result.
68497
+ * @throws {ForbiddenError} 403 when the recording is another user's.
68498
+ * @throws {NotFoundError} 404 when there is no such recording, or it expired.
68499
+ * @throws {TenantDeletedError} 410 when the tenant was deleted.
68500
+ *
68501
+ * @remarks
68502
+ * Only the user who started a recording may read it. A ready or failed
68503
+ * recording expires after the engine's parse-only retention (a day by
68504
+ * default). `liveRecording` on `client.health.check()` says whether the
68505
+ * engine keeps live recordings at all.
68506
+ *
68507
+ * @example
68508
+ * ```ts
68509
+ * const recording = await client.ingestion.getLiveRecording(recordingId);
68510
+ * if (recording.state === 'ready') console.log(recording.result?.transcriptMarkdown);
68511
+ * ```
68512
+ */
68513
+ async getLiveRecording(id, requestOptions) {
68514
+ const response = await this.api.getLiveRecording(id, toRequestParams(requestOptions));
68515
+ return decodeResponse(response, LiveRecordingViewFromApiToFront);
68516
+ }
68517
+ /**
68518
+ * Stop a live recording whose socket is gone, and finalize it —
68519
+ * `POST /api/v1/audio/recordings/{id}/stop`.
68520
+ *
68521
+ * @param id - The live recording id.
68522
+ * @param requestOptions - Per-call request options.
68523
+ * @returns The recording: `finalizing` (HTTP 202), or as it stands when it
68524
+ * is already `ready` or `failed` (HTTP 200).
68525
+ * @throws {ForbiddenError} 403 when the recording is another user's.
68526
+ * @throws {NotFoundError} 404 when there is no such recording.
68527
+ * @throws {TenantDeletedError} 410 when the tenant was deleted.
68528
+ *
68529
+ * @remarks
68530
+ * The audio is sealed and retained as the meeting's original, then the
68531
+ * parse-only audio pipeline writes the transcript, summary and actions.
68532
+ * Idempotent: a recording already finalizing answers 202 (and finalizing
68533
+ * starts again if its worker stopped). Audio a live socket had not yet
68534
+ * written (at most about five seconds) is not kept.
68535
+ *
68536
+ * @example
68537
+ * ```ts
68538
+ * const recording = await client.ingestion.stopLiveRecording(recordingId);
68539
+ * console.log(recording.state); // 'finalizing'
68540
+ * ```
68541
+ */
68542
+ async stopLiveRecording(id, requestOptions) {
68543
+ const response = await this.api.stopLiveRecording(id, toRequestParams(requestOptions));
68544
+ return decodeResponse(response, LiveRecordingViewFromApiToFront);
68545
+ }
68546
+ /**
68547
+ * Finalize again a recording whose finalizing failed —
68548
+ * `POST /api/v1/audio/recordings/{id}/retry`.
68549
+ *
68550
+ * @param id - The live recording id of a `failed` recording.
68551
+ * @param requestOptions - Per-call request options.
68552
+ * @returns The recording: `finalizing` again (HTTP 202), or as it stands
68553
+ * when it is already `ready` (HTTP 200).
68554
+ * @throws {ForbiddenError} 403 when the recording is another user's.
68555
+ * @throws {NotFoundError} 404 when there is no such recording.
68556
+ * @throws {ConstraintViolationError} 409 when the recording is still
68557
+ * recording or finalizing.
68558
+ * @throws {TenantDeletedError} 410 when the tenant was deleted.
68559
+ *
68560
+ * @remarks
68561
+ * The engine finalizes again from the audio it kept, so no audio is resent.
68562
+ *
68563
+ * @example
68564
+ * ```ts
68565
+ * const recording = await client.ingestion.getLiveRecording(recordingId);
68566
+ * if (recording.state === 'failed') {
68567
+ * await client.ingestion.retryLiveRecording(recordingId);
68568
+ * }
68569
+ * ```
68570
+ */
68571
+ async retryLiveRecording(id, requestOptions) {
68572
+ const response = await this.api.retryLiveRecording(id, toRequestParams(requestOptions));
68573
+ return decodeResponse(response, LiveRecordingViewFromApiToFront);
68574
+ }
66589
68575
  /**
66590
68576
  * Open a resumable upload of one original RDF file —
66591
68577
  * `POST /api/v1/ingest/rdf/uploads`.
@@ -67137,6 +69123,7 @@ function ReviewSummaryFromApiToFront(dto) {
67137
69123
  totalRejected: dto.total_rejected,
67138
69124
  totalCorrected: dto.total_corrected,
67139
69125
  totalMerged: dto.total_merged,
69126
+ totalSuperseded: dto.total_superseded ?? 0,
67140
69127
  avgPendingConfidence: dto.avg_pending_confidence,
67141
69128
  ...typeof dto.oldest_pending === "string" ? { oldestPending: dto.oldest_pending } : {},
67142
69129
  byReason: byReasonFromApiToFront(dto.by_reason),
@@ -69749,7 +71736,7 @@ var SourcesClient = class {
69749
71736
  * Parquet) or `config.database_path` (SQLite) to {@link SourcesClient.register}.
69750
71737
  * @throws {BadRequestError} **400** when the engine cannot read the multipart body.
69751
71738
  * @throws {ApiError} **413** when the file is larger than the engine's
69752
- * `OSFKB_SOURCE_FILE_MAX_SIZE_MB` (256 MiB by default).
71739
+ * configured upload limit (256 MiB by default).
69753
71740
  *
69754
71741
  * @remarks
69755
71742
  * Sent to `POST /api/v1/sources/files` as `multipart/form-data` with exactly
@@ -69910,7 +71897,7 @@ var SourcesClient = class {
69910
71897
  * Sent to `GET /api/v1/sources/{source_id}/tables`. The cheap counterpart to
69911
71898
  * {@link SourcesClient.discoverSchema}: one catalog query, no per-type
69912
71899
  * introspection, and — unlike discovery — **never subject to the discovery
69913
- * cap**. A source with more tables than `OSFKB_MAX_DISCOVERED_SORTS` allows
71900
+ * cap**. A source with more tables than the configured discovery limit allows
69914
71901
  * has its discovery refused, so this listing is the un-capped payload to
69915
71902
  * narrow *from*: list the names, let the user pick, then hand the picked
69916
71903
  * subset back as the `typeFilter` of a `discoverSchema` call. The response
@@ -71043,6 +73030,11 @@ var ScenariosClient = class {
71043
73030
  * @returns Created scenario (may include interactive questions). A complete
71044
73031
  * answer's `materialization.warnings` names every rule the engine refused.
71045
73032
  * @throws {BadRequestError} If a binding in `prefixes` is malformed.
73033
+ * @throws {ForbiddenError} `403` with `errorBodyCode(e)`
73034
+ * `sort_write_not_granted` (the caller's Write grants do not cover a
73035
+ * belief, the goal or a constraint as it is stored),
73036
+ * `operational_authority_denied` or `operational_authority_undetermined`;
73037
+ * nothing is written (reasoninglayer#1227).
71046
73038
  * @throws {ConstraintViolationError} `409` if `prefixes` binds a prefix the
71047
73039
  * tenant already binds to a different namespace.
71048
73040
  * @throws {ApiError} **422** if the generated scenario is invalid — among
@@ -71094,6 +73086,12 @@ var ScenariosClient = class {
71094
73086
  * `property` name the creation gate of `sorts.createSort` refuses: a name
71095
73087
  * OSFQL cannot read (`patient-id`), or a CURIE whose prefix the tenant does
71096
73088
  * not bind canonically. Nothing is written.
73089
+ * @throws {ForbiddenError} `403` if the authorization context grants no
73090
+ * Manage on a sort the scenario writes, or with `errorBodyCode(e)`
73091
+ * `reserved_sort_write_refused` (a belief, goal or constraint names a
73092
+ * reserved sort), `sort_write_not_granted`, `operational_authority_denied`
73093
+ * or `operational_authority_undetermined`. Nothing is written
73094
+ * (reasoninglayer#1227).
71097
73095
  * @throws {ConstraintViolationError} `409` if `prefixes` binds a prefix the
71098
73096
  * tenant already binds to a different namespace. Nothing is written.
71099
73097
  * @throws {ApiError} **422** `Invalid scenario payload: …` if an item has the
@@ -71197,6 +73195,11 @@ var ScenariosClient = class {
71197
73195
  * `addSorts` mints a sort or feature name the creation gate of
71198
73196
  * `sorts.createSort` refuses. Nothing is written.
71199
73197
  * @throws {NotFoundError} If no scenario has this id.
73198
+ * @throws {ForbiddenError} `403` with `errorBodyCode(e)`
73199
+ * `sort_write_not_granted`, `reserved_sort_write_refused`,
73200
+ * `operational_authority_denied` or `operational_authority_undetermined`
73201
+ * for an added belief or constraint; nothing is written
73202
+ * (reasoninglayer#1227).
71200
73203
  * @throws {ConstraintViolationError} `409` if `prefixes` binds a prefix the
71201
73204
  * tenant already binds to a different namespace. Nothing is written.
71202
73205
  * @throws {ApiError} **422** if an added item is malformed.
@@ -76309,7 +78312,7 @@ var AnalysisClient = class {
76309
78312
  * @param requestOptions - Per-call request options.
76310
78313
  * @returns The subgroups, best first, each a concept with its positions,
76311
78314
  * extent, quality and rates; the search that ran and how far it went;
76312
- * and the derived OSF terms the concepts resolve in.
78315
+ * and the derived terms the concepts resolve in.
76313
78316
  * @throws {BadRequestError} 400 for an empty or duplicated population,
76314
78317
  * nothing in the store, a graded target or one without a measured
76315
78318
  * positive and negative, an exact strategy outside the categorical
@@ -76356,7 +78359,7 @@ var AnalysisClient = class {
76356
78359
  * @param requestOptions - Per-call request options.
76357
78360
  * @returns The distinct patterns in order of first draw, each with its
76358
78361
  * equalities, extent, exact `weight`, draw count, quality and rates; the
76359
- * `normalizer`; the order of the draws; and the derived OSF terms the
78362
+ * `normalizer`; the order of the draws; and the derived terms the
76360
78363
  * descriptions resolve in.
76361
78364
  * @throws {BadRequestError} 400 for an empty or duplicated population,
76362
78365
  * nothing in the store, a graded target or one without a measured positive
@@ -78950,7 +80953,9 @@ function EnrichedHealthResponseFromApiToFront(dto) {
78950
80953
  startedAt: dto.started_at,
78951
80954
  status: dto.status ?? "unknown",
78952
80955
  uptimeSeconds: dto.uptime_seconds,
78953
- sovereign: dto.sovereign
80956
+ sovereign: dto.sovereign,
80957
+ holdsUnprovenText: dto.holds_unproven_text,
80958
+ liveRecording: dto.live_recording
78954
80959
  };
78955
80960
  }
78956
80961
 
@@ -78963,7 +80968,7 @@ var HealthClient = class {
78963
80968
  this.api = api;
78964
80969
  }
78965
80970
  /**
78966
- * Check the health of the Reasoning Layer backend.
80971
+ * Check the health of the ReasoningLayer backend.
78967
80972
  *
78968
80973
  * @returns Enriched health response with overall status, component statuses,
78969
80974
  * build info, and the identity of the engine process (`bootId`, `startedAt`,
@@ -79196,6 +81201,26 @@ function RetirementStatusFromApiToFront(dto) {
79196
81201
  return out;
79197
81202
  }
79198
81203
 
81204
+ // src/normalizers/admin-maintenance.ts
81205
+ function RebuildSemanticIndexResponseFromApiToFront(dto) {
81206
+ return {
81207
+ failed: dto.failed,
81208
+ indexed: dto.indexed,
81209
+ tenantId: dto.tenant_id,
81210
+ termsSeen: dto.terms_seen
81211
+ };
81212
+ }
81213
+ function ConversationEraseResponseFromApiToFront(dto) {
81214
+ return {
81215
+ dryRun: dto.dry_run,
81216
+ goals: dto.goals,
81217
+ records: dto.records,
81218
+ remaining: dto.remaining,
81219
+ removed: dto.removed,
81220
+ tenantId: dto.tenant_id
81221
+ };
81222
+ }
81223
+
79199
81224
  // src/resources/admin.ts
79200
81225
  var AdminClient = class {
79201
81226
  /**
@@ -79607,6 +81632,65 @@ var AdminClient = class {
79607
81632
  ).catch(rethrowVocabularyRefusal);
79608
81633
  return decodeResponse(response, VocabularyBasePackRegistrationFromApiToFront);
79609
81634
  }
81635
+ /**
81636
+ * Rebuild a tenant's semantic search index
81637
+ *
81638
+ * @param tenantId - The tenant.
81639
+ * @param requestOptions - Per-call cancellation, timeout and request options.
81640
+ * @returns The engine's answer as `RebuildSemanticIndexResponse`, camelCase.
81641
+ * @throws {ApiError} 403: Another tenant, without the provisioning identity
81642
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
81643
+ * @throws {ApiError} 500: The terms could not be read
81644
+ *
81645
+ * @remarks Uses POST `/api/v1/admin/semantic-index/rebuild/{tenant_id}`.
81646
+ * Embeds again, with the configured embedding model, every persisted term of the tenant whose
81647
+ * semantic search point is missing or holds other content; points already identical are skipped.
81648
+ * Use after the embedding model changed (the collection is created again at the new dimension),
81649
+ * after a vector store restore, or after failed indexing. Idempotent: a second call after a
81650
+ * complete one embeds nothing. `failed` counts terms of pages that could not be indexed; call
81651
+ * again to retry them.
81652
+ *
81653
+ * @example
81654
+ * ```typescript
81655
+ * await client.admin.rebuildSemanticIndex(tenantId);
81656
+ * ```
81657
+ */
81658
+ async rebuildSemanticIndex(tenantId, requestOptions) {
81659
+ const response = await this.api.rebuildSemanticIndex(tenantId, toRequestParams(requestOptions));
81660
+ return decodeResponse(response, RebuildSemanticIndexResponseFromApiToFront);
81661
+ }
81662
+ /**
81663
+ * Erase a tenant's conversation records (temporary)
81664
+ *
81665
+ * @param tenantId - The tenant.
81666
+ * @param options - `dryRun`: Count what would be erased, and erase nothing.; `limit`: At most this many conversations.
81667
+ * @param requestOptions - Per-call cancellation, timeout and request options.
81668
+ * @returns The engine's answer as `ConversationEraseResponse`, camelCase.
81669
+ * @throws {ApiError} 403: Forbidden (not the provisioning identity)
81670
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
81671
+ * @throws {ApiError} 503: The records could not be read or removed, or exceed the erase ceiling
81672
+ *
81673
+ * @remarks Uses POST `/api/v1/admin/tenants/{tenant_id}/conversations/erase`.
81674
+ * Requires the gateway provisioning identity. Counts (dry_run, the default) or removes one batch
81675
+ * of a tenant's conversation records: sessions, conversations, turns, ratings, preferences,
81676
+ * layouts, templates, intents, quoted frames, learned definitions and their preflights,
81677
+ * certifications, the promotion policy, reports, evidence, working state, the session graph's
81678
+ * conversation memory, and definition eligibility goals. The tenant, its vocabulary, knowledge and
81679
+ * authorization rules stay. Answers counts only. Removed once every deployment has run it.
81680
+ *
81681
+ * @example
81682
+ * ```typescript
81683
+ * const report = await client.admin.eraseConversations(tenantId, { dryRun: true });
81684
+ * ```
81685
+ */
81686
+ async eraseConversations(tenantId, options = {}, requestOptions) {
81687
+ const response = await this.api.eraseConversations(
81688
+ tenantId,
81689
+ { dry_run: options.dryRun, limit: options.limit },
81690
+ toRequestParams(requestOptions)
81691
+ );
81692
+ return decodeResponse(response, ConversationEraseResponseFromApiToFront);
81693
+ }
79610
81694
  };
79611
81695
 
79612
81696
  // src/normalizers/image-extraction.ts
@@ -80156,7 +82240,8 @@ function ProvenanceDtoFromApiToFront(dto) {
80156
82240
  return {
80157
82241
  description: dto.description,
80158
82242
  location: dto.location,
80159
- sourceFactId: dto.source_fact_id
82243
+ sourceFactId: dto.source_fact_id,
82244
+ ...dto.unconfirmed !== void 0 ? { unconfirmed: dto.unconfirmed } : {}
80160
82245
  };
80161
82246
  }
80162
82247
  function DiagnosticDtoFromApiToFront(dto) {
@@ -80201,7 +82286,8 @@ function GenerateDocumentRequestFromFrontToApi(model) {
80201
82286
  metadata: model.metadata,
80202
82287
  modality: model.modality,
80203
82288
  root_term_id: model.rootTermId,
80204
- tenant_id: model.tenantId
82289
+ tenant_id: model.tenantId,
82290
+ ...model.unconfirmedSupport === void 0 ? {} : { unconfirmed_support: model.unconfirmedSupport }
80205
82291
  };
80206
82292
  }
80207
82293
  function GenerateDocumentResponseFromApiToFront(dto) {
@@ -80569,6 +82655,9 @@ function extractQueryTimeMs(dto) {
80569
82655
  function extractDerivationComplete(dto) {
80570
82656
  return dto.derivation_complete === true;
80571
82657
  }
82658
+ function extractValidBefore(dto) {
82659
+ return dto.valid_before ?? void 0;
82660
+ }
80572
82661
  function extractRuleTermId(dto) {
80573
82662
  return dto.term.term_id;
80574
82663
  }
@@ -80659,14 +82748,19 @@ var OptimizeClient = class {
80659
82748
  },
80660
82749
  toRequestParams(requestOptions)
80661
82750
  );
80662
- const { queryTimeMs, solutions, derivationComplete } = decodeResponse(bcResponse, (dto) => ({
80663
- queryTimeMs: extractQueryTimeMs(dto),
80664
- solutions: dto.solutions.slice(),
80665
- derivationComplete: extractDerivationComplete(dto)
80666
- }));
82751
+ const { queryTimeMs, solutions, derivationComplete, validBefore } = decodeResponse(
82752
+ bcResponse,
82753
+ (dto) => ({
82754
+ queryTimeMs: extractQueryTimeMs(dto),
82755
+ solutions: dto.solutions.slice(),
82756
+ derivationComplete: extractDerivationComplete(dto),
82757
+ validBefore: extractValidBefore(dto)
82758
+ })
82759
+ );
82760
+ const validity = validBefore === void 0 ? {} : { validBefore };
80667
82761
  const solution = solutions[0];
80668
82762
  if (solution === void 0) {
80669
- return derivationComplete ? { status: "infeasible", solveTimeMs: queryTimeMs } : { status: "undetermined", solveTimeMs: queryTimeMs };
82763
+ return derivationComplete ? { status: "infeasible", solveTimeMs: queryTimeMs, ...validity } : { status: "undetermined", solveTimeMs: queryTimeMs, ...validity };
80670
82764
  }
80671
82765
  const variables = {};
80672
82766
  for (const binding of solution.substitution.bindings) {
@@ -80686,7 +82780,8 @@ var OptimizeClient = class {
80686
82780
  status: "optimal",
80687
82781
  variables,
80688
82782
  objectiveValue,
80689
- solveTimeMs: queryTimeMs
82783
+ solveTimeMs: queryTimeMs,
82784
+ ...validity
80690
82785
  };
80691
82786
  } finally {
80692
82787
  if (cleanup) {
@@ -81220,6 +83315,21 @@ var FlowNetworksClient = class {
81220
83315
  }
81221
83316
  };
81222
83317
 
83318
+ // src/normalizers/osfql-dependencies.ts
83319
+ function OsfqlDependenciesResponseFromApiToFront(dto) {
83320
+ return {
83321
+ exact: dto.exact,
83322
+ reason: dto.reason,
83323
+ sorts: dto.sorts.map((item0) => item0),
83324
+ watch: dto.watch
83325
+ };
83326
+ }
83327
+ function OsfqlDependenciesRequestFromFrontToApi(model) {
83328
+ return {
83329
+ query: model.query
83330
+ };
83331
+ }
83332
+
81223
83333
  // src/resources/osfql.ts
81224
83334
  var OsfqlClient = class {
81225
83335
  /** @internal */
@@ -81235,7 +83345,8 @@ var OsfqlClient = class {
81235
83345
  * @param options - Optional execution options. Set `reactive` to fire suspended
81236
83346
  * `AWAIT` demons whose triggers the program has just satisfied, and
81237
83347
  * `semantics: 'rdf'` to run a statement {@link SparqlClient.translateQuery}
81238
- * returned.
83348
+ * returned. Set `confirmExternal` when the person has confirmed this program's
83349
+ * open-web calls.
81239
83350
  * @param requestOptions - Per-call transport options (timeout, signal, headers).
81240
83351
  * @returns The execution result including variable bindings, created and
81241
83352
  * updated term IDs, defined sort IDs, diagnostics, and statement count.
@@ -81257,6 +83368,9 @@ var OsfqlClient = class {
81257
83368
  * `PREFIX p: <iri>;` that binds a bound prefix to another namespace, and a
81258
83369
  * `DEFINE` / `AGENT CREATE SORT` of a CURIE whose prefix the tenant does
81259
83370
  * not bind, are `execution` failures (HTTP 422); the program is rolled back.
83371
+ * @throws {OsfqlError} HTTP 428 with `errorType` equal to `boundary_needs_confirmation`
83372
+ * when a `SEARCH WEB` or `READ PAGE` requires a person's confirmation. Earlier
83373
+ * statements have already run. Execution stops at the statement requiring confirmation.
81260
83374
  * @throws {OsfqlError} With `errorType: 'lock_timeout'` (HTTP 503) when other
81261
83375
  * writers kept the tenant's knowledge base locked until the request
81262
83376
  * deadline. Nothing ran, so the program is safe to retry as is; a larger
@@ -81662,6 +83776,29 @@ var OsfqlClient = class {
81662
83776
  );
81663
83777
  return decodeResponse(response, OsfqlRepairResponseFromApiToFront);
81664
83778
  }
83779
+ /**
83780
+ * Name what a statement's answer depends on, without executing it.
83781
+ *
83782
+ * @param request - The request (`OsfqlDependenciesRequest`), camelCase; sent snake_case.
83783
+ * @param requestOptions - Per-call cancellation, timeout and request options.
83784
+ * @returns The engine's answer as `OsfqlDependenciesResponse`, camelCase.
83785
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
83786
+ * @throws {ApiError} 422: The statement does not parse or compile
83787
+ *
83788
+ * @remarks Uses POST `/api/v1/osfql/dependencies`.
83789
+ *
83790
+ * @example
83791
+ * ```typescript
83792
+ * const deps = await client.osfql.dependencies({ query: 'MATCH person(?X);' });
83793
+ * ```
83794
+ */
83795
+ async dependencies(request, requestOptions) {
83796
+ const response = await this.api.osfqlDependencies(
83797
+ OsfqlDependenciesRequestFromFrontToApi(request),
83798
+ toRequestParams(requestOptions)
83799
+ );
83800
+ return decodeResponse(response, OsfqlDependenciesResponseFromApiToFront);
83801
+ }
81665
83802
  };
81666
83803
  function rethrowOsfqlFailure(error) {
81667
83804
  if (error instanceof ApiError) {
@@ -81697,6 +83834,24 @@ var Conversation = class {
81697
83834
  format: "json",
81698
83835
  ...params
81699
83836
  });
83837
+ /**
83838
+ * No description
83839
+ *
83840
+ * @tags conversation
83841
+ * @name AttestConversationPoint
83842
+ * @summary `POST /api/v1/conversation/{id}/attestations`
83843
+ * @request POST:/api/v1/conversation/{id}/attestations
83844
+ * @secure
83845
+ */
83846
+ attestConversationPoint = (id, data, params = {}) => this.http.request({
83847
+ path: `/api/v1/conversation/${id}/attestations`,
83848
+ method: "POST",
83849
+ body: data,
83850
+ secure: true,
83851
+ type: "application/json",
83852
+ format: "json",
83853
+ ...params
83854
+ });
81700
83855
  /**
81701
83856
  * @description Delete a conversation and all its turns.
81702
83857
  *
@@ -81982,64 +84137,16 @@ var Conversation = class {
81982
84137
  });
81983
84138
  };
81984
84139
 
81985
- // src/utils/sse.ts
81986
- var FRAME_SEPARATORS = ["\r\n\r\n", "\n\n", "\r\r"];
81987
- var LINE_TERMINATOR = /\r\n|\n|\r/;
81988
- async function* readSseFrames(body) {
81989
- const reader = body.getReader();
81990
- const decoder = new TextDecoder();
81991
- let buffer = "";
81992
- try {
81993
- for (; ; ) {
81994
- const chunk = await reader.read();
81995
- if (chunk.done) break;
81996
- buffer += decoder.decode(chunk.value, { stream: true });
81997
- let boundary = findFrameBoundary(buffer);
81998
- while (boundary !== null) {
81999
- const frame = decodeFrame(buffer.slice(0, boundary.index));
82000
- buffer = buffer.slice(boundary.index + boundary.length);
82001
- if (frame !== null) yield frame;
82002
- boundary = findFrameBoundary(buffer);
82003
- }
82004
- }
82005
- buffer += decoder.decode();
82006
- const trailing = decodeFrame(buffer);
82007
- if (trailing !== null) yield trailing;
82008
- } finally {
82009
- await reader.cancel().catch(() => void 0);
82010
- }
82011
- }
82012
- function findFrameBoundary(buffer) {
82013
- let found = null;
82014
- for (const separator of FRAME_SEPARATORS) {
82015
- const index = buffer.indexOf(separator);
82016
- if (index === -1) continue;
82017
- if (found === null || index < found.index || index === found.index && separator.length > found.length) {
82018
- found = { index, length: separator.length };
82019
- }
82020
- }
82021
- return found;
82022
- }
82023
- function decodeFrame(text2) {
82024
- const dataLines = [];
82025
- let event;
82026
- for (const line of text2.split(LINE_TERMINATOR)) {
82027
- if (line === "" || line.startsWith(":")) continue;
82028
- const colon = line.indexOf(":");
82029
- const field = colon === -1 ? line : line.slice(0, colon);
82030
- const rawValue = colon === -1 ? "" : line.slice(colon + 1);
82031
- const value = rawValue.startsWith(" ") ? rawValue.slice(1) : rawValue;
82032
- if (field === "data") dataLines.push(value);
82033
- else if (field === "event") event = value;
82034
- }
82035
- const data = dataLines.join("\n");
82036
- if (data === "") return null;
82037
- return { event: event === "" ? void 0 : event, data };
82038
- }
82039
-
82040
84140
  // src/resources/conversation.ts
82041
84141
  var SSE_MEDIA_TYPE = "text/event-stream";
82042
- var STREAM_EVENTS = /* @__PURE__ */ new Set(["token", "done", "error"]);
84142
+ var STREAM_EVENTS = /* @__PURE__ */ new Set([
84143
+ "token",
84144
+ "step_start",
84145
+ "step_end",
84146
+ "claim",
84147
+ "done",
84148
+ "error"
84149
+ ]);
82043
84150
  var ConversationClient = class {
82044
84151
  /** @internal */
82045
84152
  http;
@@ -82110,6 +84217,8 @@ var ConversationClient = class {
82110
84217
  * {@link ConversationClient.sendMessage} takes.
82111
84218
  * @returns An async iterable of stream events, discriminated on `type`:
82112
84219
  * - `token` — a preview chunk (`delta`) of the answer text;
84220
+ * - `step_start`, `step_end` — a pipeline stage and its outcome;
84221
+ * - `claim` — one verified claim before the full answer;
82113
84222
  * - `done` — the complete response, identical to what `sendMessage`
82114
84223
  * returns for the turn. It is authoritative: replace the previewed text
82115
84224
  * with `response.assistantMessage`;
@@ -82161,14 +84270,14 @@ var ConversationClient = class {
82161
84270
  * })) {
82162
84271
  * if (event.type === 'token') preview += event.delta;
82163
84272
  * else if (event.type === 'done') preview = event.response.assistantMessage;
82164
- * else if (event.status !== undefined) {
84273
+ * else if (event.type === 'error' && event.status !== undefined) {
82165
84274
  * // The same class sendMessage throws: InternalServerError for 500, ...
82166
84275
  * throw createApiError(
82167
84276
  * event.status,
82168
84277
  * { error: event.error, message: event.error },
82169
84278
  * new Headers(),
82170
84279
  * );
82171
- * } else throw new Error(event.error);
84280
+ * } else if (event.type === 'error') throw new Error(event.error);
82172
84281
  * }
82173
84282
  * ```
82174
84283
  */
@@ -82181,31 +84290,7 @@ var ConversationClient = class {
82181
84290
  secure: true,
82182
84291
  type: "application/json"
82183
84292
  });
82184
- const body = response.body;
82185
- if (body === null) {
82186
- throw new NetworkError("Conversation stream response carried no event stream");
82187
- }
82188
- for await (const frame of readSseFrames(body)) {
82189
- if (frame.event === void 0 || !STREAM_EVENTS.has(frame.event)) continue;
82190
- let payload;
82191
- try {
82192
- payload = JSON.parse(frame.data);
82193
- } catch (error) {
82194
- throw new NetworkError(
82195
- `Conversation stream carried a malformed JSON '${frame.event}' event: ${frame.data}`,
82196
- error instanceof Error ? error : void 0
82197
- );
82198
- }
82199
- const event = ConversationStreamEventFromApiToFront(frame.event, payload);
82200
- if (event === null) {
82201
- throw new NetworkError(
82202
- `Conversation stream carried a '${frame.event}' event that does not fit its contract: ${frame.data}`
82203
- );
82204
- }
82205
- yield event;
82206
- if (event.type !== "token") return;
82207
- }
82208
- throw new NetworkError("Conversation stream ended without a done or error event");
84293
+ yield* readConversationStream(response.body);
82209
84294
  }
82210
84295
  /**
82211
84296
  * List recent conversations for the authenticated user.
@@ -82301,6 +84386,115 @@ var ConversationClient = class {
82301
84386
  });
82302
84387
  return decodeResponse(response, (dto) => (dto ?? []).map(CompareModelDtoFromApiToFront));
82303
84388
  }
84389
+ /**
84390
+ * Read the caller's private transcript with a published agent on one Frame page.
84391
+ *
84392
+ * @param agentId - The published agent (UUID).
84393
+ * @param binding - The Frame page: `frameId`, `page`, the current published
84394
+ * `pageVersion`, and optionally the `conversationId` and an `offset`.
84395
+ * @param requestOptions - Per-call cancellation, timeout and request options.
84396
+ * @returns The transcript, or `null` when no consultation has started there.
84397
+ * @throws {ApiError} 400 for an invalid Frame page binding; 403 when the named
84398
+ * agent grant is absent or revoked; 404 when the current Frame, binding or
84399
+ * pinned consultation is unavailable.
84400
+ *
84401
+ * @remarks Uses GET `/api/v1/conversation/agents/{agent_id}/frame/turns`.
84402
+ *
84403
+ * @example
84404
+ * ```typescript
84405
+ * const transcript = await client.conversation.getFrameAgentTurns(agentId, {
84406
+ * frameId, page: 'home', pageVersion: 3,
84407
+ * });
84408
+ * ```
84409
+ */
84410
+ async getFrameAgentTurns(agentId, binding, requestOptions) {
84411
+ const response = await this.api.getFrameAgentTurns(
84412
+ agentId,
84413
+ {
84414
+ frame_id: binding.frameId,
84415
+ page: binding.page,
84416
+ page_version: binding.pageVersion,
84417
+ conversation_id: binding.conversationId,
84418
+ offset: binding.offset
84419
+ },
84420
+ toRequestParams(requestOptions)
84421
+ );
84422
+ return decodeResponse(
84423
+ response,
84424
+ (dto) => dto === null ? null : ConversationTurnsResponseFromApiToFront(dto)
84425
+ );
84426
+ }
84427
+ /**
84428
+ * Read the caller's accessible consultations with a published agent on one Work task.
84429
+ *
84430
+ * @param agentId - The published agent (UUID).
84431
+ * @param scope - The task (`taskId`), and optionally one `conversationId` and an `offset`.
84432
+ * @param requestOptions - Per-call cancellation, timeout and request options.
84433
+ * @returns One transcript per consultation the caller can read.
84434
+ * @throws {ApiError} If the engine refuses the read.
84435
+ *
84436
+ * @remarks Uses GET `/api/v1/conversation/agents/{agent_id}/task/turns`.
84437
+ *
84438
+ * @example
84439
+ * ```typescript
84440
+ * const consultations = await client.conversation.getTaskAgentTurns(agentId, { taskId });
84441
+ * ```
84442
+ */
84443
+ async getTaskAgentTurns(agentId, scope, requestOptions) {
84444
+ const response = await this.api.getTaskAgentTurns(
84445
+ agentId,
84446
+ { task_id: scope.taskId, conversation_id: scope.conversationId, offset: scope.offset },
84447
+ toRequestParams(requestOptions)
84448
+ );
84449
+ return decodeResponse(response, (dto) => dto.map(ConversationTurnsResponseFromApiToFront));
84450
+ }
84451
+ /**
84452
+ * Send one message to a published agent and stream its answer, as
84453
+ * {@link ConversationClient.sendMessageStream} streams the assistant's.
84454
+ *
84455
+ * @param agentId - The published agent (UUID).
84456
+ * @param request - The message, as for `sendMessageStream`.
84457
+ * @param context - Where the consultation happens: a Frame page (`frameId`,
84458
+ * `page`, `pageVersion`) or a Work task (`taskId`, with `asLead` to require
84459
+ * the current task lead).
84460
+ * @param requestOptions - Per-call cancellation, timeout and request options.
84461
+ * @returns The same `token`, `done` and `error` events as `sendMessageStream`.
84462
+ * @throws {ApiError} 403 when the named agent grant is absent or revoked; 404
84463
+ * when no published agent of that id is in this Space.
84464
+ * @throws {NetworkError} When the stream carries no event stream, a malformed
84465
+ * event, or ends without a `done` or `error` event.
84466
+ *
84467
+ * @remarks
84468
+ * Uses POST `/api/v1/conversation/agents/{agent_id}/message/stream`
84469
+ * (`text/event-stream`). The conversation's kind is `agent_consultation`.
84470
+ *
84471
+ * @example
84472
+ * ```typescript
84473
+ * for await (const event of client.conversation.sendAgentMessageStream(agentId, {
84474
+ * message: 'Summarise the open risks.',
84475
+ * }, { taskId })) {
84476
+ * if (event.type === 'done') console.log(event.response.assistantMessage);
84477
+ * }
84478
+ * ```
84479
+ */
84480
+ async *sendAgentMessageStream(agentId, request, context = {}, requestOptions) {
84481
+ const response = await this.http.request({
84482
+ ...mergeRequestParams({ headers: { Accept: SSE_MEDIA_TYPE } }, requestOptions),
84483
+ path: `/api/v1/conversation/agents/${encodeURIComponent(agentId)}/message/stream`,
84484
+ method: "POST",
84485
+ query: {
84486
+ frame_id: context.frameId,
84487
+ page: context.page,
84488
+ page_version: context.pageVersion,
84489
+ task_id: context.taskId,
84490
+ as_lead: context.asLead
84491
+ },
84492
+ body: ConversationMessageRequestFromFrontToApi(request),
84493
+ secure: true,
84494
+ type: "application/json"
84495
+ });
84496
+ yield* readConversationStream(response.body);
84497
+ }
82304
84498
  /**
82305
84499
  * Get all turns for a conversation.
82306
84500
  *
@@ -82455,6 +84649,29 @@ var ConversationClient = class {
82455
84649
  });
82456
84650
  return decodeResponse(response, ConversationAnswerFeedbackResponseFromApiToFront);
82457
84651
  }
84652
+ /**
84653
+ * Confirm a point on an answer or report an error as the conversation's owner.
84654
+ * @param conversationId - The conversation containing the answer.
84655
+ * @param request - Answer turn, point reference and judgment.
84656
+ * @param requestOptions - Per-call transport overrides.
84657
+ * @returns The stored judgment with the signer and timestamp recorded by the engine.
84658
+ * @throws {ForbiddenError} If an agent or service account tries to attest.
84659
+ * @throws {NotFoundError} If the caller cannot see that answer or point.
84660
+ * @throws {ApiError} If the request fails.
84661
+ * @remarks The request contains `turn_id`, `point_ref` and `kind`. Authentication supplies the signer.
84662
+ * @example
84663
+ * ```typescript
84664
+ * await client.conversation.attestPoint(conversationId, { turnId, pointRef, kind: 'confirmed' });
84665
+ * ```
84666
+ */
84667
+ async attestPoint(conversationId, request, requestOptions) {
84668
+ const response = await this.api.attestConversationPoint(
84669
+ conversationId,
84670
+ ClaimAttestationRequestFromFrontToApi(request),
84671
+ toRequestParams(requestOptions)
84672
+ );
84673
+ return decodeResponse(response, ClaimAttestationResponseFromApiToFront);
84674
+ }
82458
84675
  /**
82459
84676
  * Get the session memory graph for a conversation.
82460
84677
  *
@@ -82537,6 +84754,32 @@ var ConversationClient = class {
82537
84754
  return decodeResponse(response, ConversationSummaryDtoFromApiToFront);
82538
84755
  }
82539
84756
  };
84757
+ async function* readConversationStream(body) {
84758
+ if (body === null) {
84759
+ throw new NetworkError("Conversation stream response carried no event stream");
84760
+ }
84761
+ for await (const frame of readSseFrames(body)) {
84762
+ if (frame.event === void 0 || !STREAM_EVENTS.has(frame.event)) continue;
84763
+ let payload;
84764
+ try {
84765
+ payload = JSON.parse(frame.data);
84766
+ } catch (error) {
84767
+ throw new NetworkError(
84768
+ `Conversation stream carried a malformed JSON '${frame.event}' event: ${frame.data}`,
84769
+ error instanceof Error ? error : void 0
84770
+ );
84771
+ }
84772
+ const event = ConversationStreamEventFromApiToFront(frame.event, payload);
84773
+ if (event === null) {
84774
+ throw new NetworkError(
84775
+ `Conversation stream carried a '${frame.event}' event that does not fit its contract: ${frame.data}`
84776
+ );
84777
+ }
84778
+ yield event;
84779
+ if (event.type === "done" || event.type === "error") return;
84780
+ }
84781
+ throw new NetworkError("Conversation stream ended without a done or error event");
84782
+ }
82540
84783
 
82541
84784
  // src/normalizers/verification.ts
82542
84785
  var CLAIM_KINDS = [
@@ -82860,6 +85103,7 @@ function SearchPapersResponseFromApiToFront(dto) {
82860
85103
  function CreateResearchSessionResponseFromApiToFront(dto) {
82861
85104
  return {
82862
85105
  sessionId: dto.session_id,
85106
+ knowledgeBaseTenantId: dto.knowledge_base_tenant_id ?? null,
82863
85107
  status: dto.status,
82864
85108
  question: dto.question,
82865
85109
  createdAt: dto.created_at
@@ -82884,6 +85128,7 @@ function ResearchCycleResultFromApiToFront(dto) {
82884
85128
  function ResearchSessionResponseFromApiToFront(dto) {
82885
85129
  return {
82886
85130
  sessionId: dto.session_id,
85131
+ knowledgeBaseTenantId: dto.knowledge_base_tenant_id ?? null,
82887
85132
  question: dto.question,
82888
85133
  status: dto.status,
82889
85134
  error: dto.error ?? null,
@@ -85059,6 +87304,88 @@ var UiClient = class {
85059
87304
  const response = await this.api.uiCatalog(toRequestParams(requestOptions));
85060
87305
  return decodeResponse(response, UICatalogResponseFromApiToFront);
85061
87306
  }
87307
+ /**
87308
+ * addFrameConsultant
87309
+ *
87310
+ * @param name - The saved page.
87311
+ * @param agentId - The agent (UUID).
87312
+ * @param request - The request (`AddFrameConsultant`), camelCase; sent snake_case.
87313
+ * @param requestOptions - Per-call cancellation, timeout and request options.
87314
+ * @returns The engine's answer as `FrameConsultantRevision`, camelCase.
87315
+ * @throws {ApiError} 403: Agent or page edit denied
87316
+ * @throws {ApiError} 404: Published agent or page unavailable
87317
+ * @throws {ApiError} 409: The page already changed
87318
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
87319
+ * @throws {ApiError} 422: The section is missing, ambiguous, or cannot contain a consultation
87320
+ *
87321
+ * @remarks Uses POST `/api/v1/ui/pages/{name}/consultant/{agent_id}`.
87322
+ *
87323
+ * @example
87324
+ * ```typescript
87325
+ * await client.ui.addFrameConsultant("home", agentId, request);
87326
+ * ```
87327
+ */
87328
+ async addFrameConsultant(name, agentId, request, requestOptions) {
87329
+ const response = await this.api.addFrameConsultant(
87330
+ name,
87331
+ agentId,
87332
+ AddFrameConsultantFromFrontToApi(request),
87333
+ toRequestParams(requestOptions)
87334
+ );
87335
+ return decodeResponse(response, FrameConsultantRevisionFromApiToFront);
87336
+ }
87337
+ /**
87338
+ * Restore a saved layout as the next version of the same Frame page.
87339
+ *
87340
+ * @param name - The saved page.
87341
+ * @param request - The request (`RestoreFramePageRequest`), camelCase; sent snake_case.
87342
+ * @param requestOptions - Per-call cancellation, timeout and request options.
87343
+ * @returns The engine's answer as `RestoreFramePageResponse`, camelCase.
87344
+ * @throws {ApiError} 400: The requested version is not earlier than the expected current version
87345
+ * @throws {ApiError} 403: This caller cannot write to the Frame or its current page
87346
+ * @throws {ApiError} 404: The Frame or selected page version is unavailable
87347
+ * @throws {ApiError} 409: The current page version changed
87348
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
87349
+ *
87350
+ * @remarks Uses POST `/api/v1/ui/pages/{name}/restore`.
87351
+ *
87352
+ * @example
87353
+ * ```typescript
87354
+ * await client.ui.restoreFramePage("home", request);
87355
+ * ```
87356
+ */
87357
+ async restoreFramePage(name, request, requestOptions) {
87358
+ const response = await this.api.restoreFramePage(
87359
+ name,
87360
+ RestoreFramePageRequestFromFrontToApi(request),
87361
+ toRequestParams(requestOptions)
87362
+ );
87363
+ return decodeResponse(response, RestoreFramePageResponseFromApiToFront);
87364
+ }
87365
+ /**
87366
+ * listFrameTableSources
87367
+ *
87368
+ * @param frameId - The Frame.
87369
+ * @param options - `offset`: Sources to skip.; `search`: Filter by name.
87370
+ * @param requestOptions - Per-call cancellation, timeout and request options.
87371
+ * @returns The engine's answer as `UIFrameTableSources`, camelCase.
87372
+ * @throws {ApiError} 404: Frame unavailable
87373
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
87374
+ *
87375
+ * @remarks Uses GET `/api/v1/ui/table-sources`.
87376
+ *
87377
+ * @example
87378
+ * ```typescript
87379
+ * const { sources } = await client.ui.listFrameTableSources(frameId);
87380
+ * ```
87381
+ */
87382
+ async listFrameTableSources(frameId, options = {}, requestOptions) {
87383
+ const response = await this.api.frameTableSources(
87384
+ { frame_id: frameId, offset: options.offset, search: options.search },
87385
+ toRequestParams(requestOptions)
87386
+ );
87387
+ return decodeResponse(response, UIFrameTableSourcesFromApiToFront);
87388
+ }
85062
87389
  };
85063
87390
 
85064
87391
  // src/normalizers/compliance.ts
@@ -86158,10 +88485,8 @@ var SnapshotsClient = class {
86158
88485
  * @throws {@link ApiError} 404 when it does not exist; 501 when the engine runs in memory.
86159
88486
  *
86160
88487
  * @remarks
86161
- * The envelope (`format: "reasoninglayer-snapshot"`, with
86162
- * `metadata.reasoninglayer_version`) is opaque: the engine declares no schema for it, and its
86163
- * shape is the engine's to change. Treat it as a blob to hand back to
86164
- * {@link SnapshotsClient.import}, not as something to read fields out of.
88488
+ * Metadata uses the engine’s wire keys. The data payload preserves record keys
88489
+ * verbatim for offline storage and {@link SnapshotsClient.import}.
86165
88490
  *
86166
88491
  * @example
86167
88492
  * ```typescript
@@ -88156,7 +90481,8 @@ function ExecuteTranspiledResponseFromApiToFront(dto) {
88156
90481
  rowCount: dto.row_count,
88157
90482
  query: dto.query,
88158
90483
  dialect: dto.dialect,
88159
- sourceId: dto.source_id
90484
+ sourceId: dto.source_id,
90485
+ completeness: dto.completeness
88160
90486
  };
88161
90487
  }
88162
90488
  function TranspileRequestFromFrontToApi(model) {
@@ -88189,6 +90515,10 @@ var OntologyBridgeClient = class {
88189
90515
  * columns, and per-feature column mappings.
88190
90516
  * @returns Whether the binding succeeded plus the bound sort and table names.
88191
90517
  * @throws {ApiError} If the request fails.
90518
+ * @throws {InternalServerError} `502` with `errorBodyCode(e)` `source_query_failed` or
90519
+ * `source_stream_failed`, or `504` `source_timeout`, when the discovery or
90520
+ * key-count read the bind runs did not reach the end of the source's
90521
+ * answer (`LiveSourceErrorCode`, reasoninglayer#1218).
88192
90522
  *
88193
90523
  * @remarks
88194
90524
  * Sent to `POST /api/v1/ontology/bindings`. Request/response use the
@@ -88431,11 +90761,18 @@ var OntologyBridgeClient = class {
88431
90761
  * source, and the source's type decides the dialect.
88432
90762
  * @param requestOptions - Per-call request options.
88433
90763
  * @returns The rows the source returned, the native query that fetched them,
88434
- * its dialect, and the source id.
90764
+ * its dialect, the source id, and `completeness: 'complete'`: the rows are
90765
+ * the source's whole answer, so an empty list is a source with no rows.
88435
90766
  * @throws {NotFoundError} If a scanned sort does not exist, or has no binding
88436
90767
  * (404; the message says which).
88437
90768
  * @throws {ApiError} With `status` 422 if the query's sorts are bound to two
88438
90769
  * different sources, or 500 if the binding store cannot be read.
90770
+ * @throws {InternalServerError} `502` with `errorBodyCode(e)` `source_query_failed`
90771
+ * (the source refused or failed the query, or could not be reached) or
90772
+ * `source_stream_failed` (its row stream failed before its end), or `504`
90773
+ * `source_timeout` (the read passed the source's `query_timeout_secs`):
90774
+ * no partial rows are returned (`LiveSourceErrorCode`,
90775
+ * reasoninglayer#1213). `501` if the source has no native query backend.
88439
90776
  *
88440
90777
  * @remarks
88441
90778
  * Sent to `POST /api/v1/ontology/query`. The response uses the snake_case
@@ -89307,6 +91644,16 @@ var PropertyGraphClient = class _PropertyGraphClient {
89307
91644
  * @returns Execution result: bindings, the OSFQL program that ran, produced term IDs,
89308
91645
  * defined sort IDs, diagnostics, compatibility notes, and the statement count.
89309
91646
  * @throws {ApiError} If the query cannot be parsed, cannot be lowered to OSFQL, or fails to execute.
91647
+ * @throws {ForbiddenError} `403` when a write or delete the translated
91648
+ * program makes is denied; `body.error_type` names why:
91649
+ * `reserved_sort_write_refused`, `reserved_sort_delete_refused`,
91650
+ * `sort_write_not_granted`, `sort_delete_not_granted`,
91651
+ * `operational_authority_denied` or `operational_authority_undetermined`.
91652
+ * Nothing is written.
91653
+ * @throws {ConstraintViolationError} `409` when the program mutates governed
91654
+ * schema, or writes or removes a term of a `@governed` sort
91655
+ * (`error_type: governed_sort_write_refused`) or a derived authority
91656
+ * relation (`authz_relation_derived`). Nothing is written.
89310
91657
  * @throws {ReasoningLayerError} If the server returns bindings that do not satisfy the
89311
91658
  * published {@link PropertyGraphValue} contract.
89312
91659
  *
@@ -89338,6 +91685,16 @@ var PropertyGraphClient = class _PropertyGraphClient {
89338
91685
  * @returns Execution result: bindings, the OSFQL program that ran, produced term IDs,
89339
91686
  * defined sort IDs, diagnostics, compatibility notes, and the statement count.
89340
91687
  * @throws {ApiError} If the query cannot be parsed, cannot be lowered to OSFQL, or fails to execute.
91688
+ * @throws {ForbiddenError} `403` when a write or delete the translated
91689
+ * program makes is denied; `body.error_type` names why:
91690
+ * `reserved_sort_write_refused`, `reserved_sort_delete_refused`,
91691
+ * `sort_write_not_granted`, `sort_delete_not_granted`,
91692
+ * `operational_authority_denied` or `operational_authority_undetermined`.
91693
+ * Nothing is written.
91694
+ * @throws {ConstraintViolationError} `409` when the program mutates governed
91695
+ * schema, or writes or removes a term of a `@governed` sort
91696
+ * (`error_type: governed_sort_write_refused`) or a derived authority
91697
+ * relation (`authz_relation_derived`). Nothing is written.
89341
91698
  * @throws {ReasoningLayerError} If the server returns bindings that do not satisfy the
89342
91699
  * published {@link PropertyGraphValue} contract.
89343
91700
  *
@@ -89369,6 +91726,16 @@ var PropertyGraphClient = class _PropertyGraphClient {
89369
91726
  * @returns Execution result: bindings, the OSFQL program that ran, produced term IDs,
89370
91727
  * defined sort IDs, diagnostics, compatibility notes, and the statement count.
89371
91728
  * @throws {ApiError} If the traversal cannot be parsed, cannot be lowered to OSFQL, or fails to execute.
91729
+ * @throws {ForbiddenError} `403` when a write or delete the translated
91730
+ * program makes is denied; `body.error_type` names why:
91731
+ * `reserved_sort_write_refused`, `reserved_sort_delete_refused`,
91732
+ * `sort_write_not_granted`, `sort_delete_not_granted`,
91733
+ * `operational_authority_denied` or `operational_authority_undetermined`.
91734
+ * Nothing is written.
91735
+ * @throws {ConstraintViolationError} `409` when the program mutates governed
91736
+ * schema, or writes or removes a term of a `@governed` sort
91737
+ * (`error_type: governed_sort_write_refused`) or a derived authority
91738
+ * relation (`authz_relation_derived`). Nothing is written.
89372
91739
  * @throws {ReasoningLayerError} If the server returns bindings that do not satisfy the
89373
91740
  * published {@link PropertyGraphValue} contract.
89374
91741
  *
@@ -89781,8 +92148,22 @@ var SparqlClient = class {
89781
92148
  * @throws {InternalServerError} `502` when a `LOAD` names a source the SSRF guard
89782
92149
  * blocks (a private or loopback address, a loopback host name such as
89783
92150
  * `localhost`, or a refused scheme): `LOAD could not retrieve <…>`.
92151
+ * @throws {ForbiddenError} `403` when a term the update writes or removes is
92152
+ * in the reserved namespace or outside the caller's grants (`error_type`
92153
+ * `reserved_sort_write_refused`, `sort_write_not_granted`,
92154
+ * `reserved_sort_delete_refused`, `sort_delete_not_granted`).
92155
+ * @throws {ConstraintViolationError} `409` when a term it writes or removes
92156
+ * is of a `@governed` sort (`governed_sort_write_refused`) or is a derived
92157
+ * authority relation (`authz_relation_derived`); when its prefixes conflict
92158
+ * with a binding another request made meanwhile (`prefix_conflict`); or
92159
+ * when an IRI-valued `INSERT DATA` names a resource the caller's Read grant
92160
+ * hides (`term_id_unavailable`, reasoninglayer#1215).
92161
+ * @throws {ApiError} `422` when a term it writes wraps a constraint the
92162
+ * update cannot read (`error_type: filing_term_unread`).
92163
+ *
92164
+ * @remarks
92165
+ * A refused update applies nothing of the update (reasoninglayer#1214).
89784
92166
  *
89785
- * @remarks
89786
92167
  * Supports `INSERT DATA` / `DELETE DATA` and `DELETE/INSERT … WHERE`; the update maps
89787
92168
  * onto tenant-scoped OSFQL `INSERT` / `RETRACT` statements. The update text is sent as
89788
92169
  * an `application/x-www-form-urlencoded` body (`update=…`).
@@ -90251,6 +92632,36 @@ function CheckDocumentResponseFromApiToFront(dto) {
90251
92632
  function CheckPassFromApiToFront(dto) {
90252
92633
  return { pass: dto.pass, status: dto.status, reason: dto.reason };
90253
92634
  }
92635
+ function ClausePolicyProposalFromFrontToApi(model) {
92636
+ return {
92637
+ evidence_sort: model.evidenceSort,
92638
+ result_sort: model.resultSort,
92639
+ branches: model.branches.map((branch) => ({
92640
+ name: branch.name,
92641
+ effect: branch.effect,
92642
+ quote: branch.quote,
92643
+ conditions: branch.conditions.map((condition) => ({
92644
+ feature: condition.feature,
92645
+ comparison: condition.comparison,
92646
+ value: condition.value,
92647
+ quote: condition.quote
92648
+ }))
92649
+ }))
92650
+ };
92651
+ }
92652
+ function ClausePolicyDraftRequestFromFrontToApi(model) {
92653
+ return {
92654
+ policy: ClausePolicyProposalFromFrontToApi(model.policy),
92655
+ ...model.supportingClauseIds !== void 0 ? { supporting_clause_ids: model.supportingClauseIds } : {}
92656
+ };
92657
+ }
92658
+ function ClausePolicyDraftFromApiToFront(dto) {
92659
+ return {
92660
+ sourceDocumentId: dto.source_document_id,
92661
+ sourceClauseId: dto.source_clause_id,
92662
+ rlql: dto.rlql
92663
+ };
92664
+ }
90254
92665
 
90255
92666
  // src/resources/document-check.ts
90256
92667
  var DocumentCheckClient = class {
@@ -90304,6 +92715,60 @@ var DocumentCheckClient = class {
90304
92715
  );
90305
92716
  return decodeResponse(response, CheckDocumentResponseFromApiToFront);
90306
92717
  }
92718
+ /**
92719
+ * Compile a reading of one extracted clause into unpublished RLQL, without
92720
+ * writing any fact or rule.
92721
+ *
92722
+ * @param documentId - The source document (UUID).
92723
+ * @param clauseId - The extracted clause the reading interprets (UUID).
92724
+ * @param request - The reading (`policy`) and other clauses of the same
92725
+ * document revision that support it.
92726
+ * @param requestOptions - Per-call request options.
92727
+ * @returns The source-anchored draft: the document, the clause and the RLQL.
92728
+ * @throws {BadRequestError} `400` if the clause selection exceeds the
92729
+ * resolution budget.
92730
+ * @throws {NotFoundError} `404` if the document or the clause is unavailable.
92731
+ * @throws {ApiError} `422` if the reading is invalid for its sorts.
92732
+ * @throws {ServiceUnavailableError} `503` if the tenant hierarchy is
92733
+ * unavailable.
92734
+ *
92735
+ * @remarks
92736
+ * Sent to `POST /api/v1/documents/{document_id}/clauses/{clause_id}/policy-draft`.
92737
+ * Plain JSON, snake_case on the wire (`evidence_sort`, `result_sort`,
92738
+ * `supporting_clause_ids`); condition values are a JSON boolean or integer.
92739
+ * A reviewer publishes the draft through the ordinary OSFQL route, under its
92740
+ * own authorization; this call writes nothing.
92741
+ *
92742
+ * @example
92743
+ * ```typescript
92744
+ * const draft = await client.documentCheck.draftClausePolicy(documentId, clauseId, {
92745
+ * policy: {
92746
+ * evidenceSort: 'invoice_case',
92747
+ * resultSort: 'invoice_policy_result',
92748
+ * branches: [
92749
+ * {
92750
+ * name: 'late',
92751
+ * effect: 'penalty_due',
92752
+ * quote: 'a penalty is due',
92753
+ * conditions: [
92754
+ * { feature: 'days_late', comparison: 'gt', value: 30, quote: 'more than thirty days' },
92755
+ * ],
92756
+ * },
92757
+ * ],
92758
+ * },
92759
+ * });
92760
+ * console.log(draft.rlql);
92761
+ * ```
92762
+ */
92763
+ async draftClausePolicy(documentId, clauseId, request, requestOptions) {
92764
+ const response = await this.api.draftClausePolicy(
92765
+ documentId,
92766
+ clauseId,
92767
+ ClausePolicyDraftRequestFromFrontToApi(request),
92768
+ toRequestParams(requestOptions)
92769
+ );
92770
+ return decodeResponse(response, ClausePolicyDraftFromApiToFront);
92771
+ }
90307
92772
  };
90308
92773
 
90309
92774
  // src/normalizers/corpus.ts
@@ -92816,7 +95281,7 @@ var AguiClient = class {
92816
95281
  * writes the store is refused without an exception or a `RUN_ERROR`: the
92817
95282
  * run emits a `CUSTOM` event named `reasoninglayer.data_load_error` whose `value` is
92818
95283
  * `{ code, message, query }`, and the `STATE_SNAPSHOT` carries the same
92819
- * object at `reasoninglayer.dataLoadError`; branch on `code`. No rows are loaded.
95284
+ * object at `snapshot.reasoninglayer.dataLoadError`; branch on `code`. No rows are loaded.
92820
95285
  *
92821
95286
  * @example
92822
95287
  * ```typescript
@@ -93112,9 +95577,7 @@ var ArgumentationClient = class {
93112
95577
 
93113
95578
  // src/normalizers/demo.ts
93114
95579
  function DemoSeedRequestFromFrontToApi(model) {
93115
- const dto = {};
93116
- if (model.sumoDir !== void 0) dto.sumo_dir = model.sumoDir;
93117
- return dto;
95580
+ return { ...model };
93118
95581
  }
93119
95582
  function DemoSeedResponseFromApiToFront(dto) {
93120
95583
  return {
@@ -93135,17 +95598,36 @@ var DemoClient = class {
93135
95598
  * Seed the request tenant's persistent substrate with full SUMO + the
93136
95599
  * demo scenario situations.
93137
95600
  *
93138
- * @param request - Optional SUMO source-directory override.
95601
+ * @param request - The empty request body (`{}`). The request names no
95602
+ * SUMO directory: the engine reads its own (reasoninglayer#1229).
95603
+ * @param requestOptions - Per-call request options.
93139
95604
  * @returns The imported form count and the tenant's total sort count.
93140
95605
  *
93141
- * @throws {ApiError} `404` if the SUMO files cannot be read, `400` if
93142
- * the assembled source fails to import.
95606
+ * @throws {NotFoundError} `404` with `errorBodyCode(e) ===
95607
+ * 'demo_corpus_unavailable'` if the deployment's SUMO files cannot be
95608
+ * read; the answer names no server path.
95609
+ * @throws {ApiError} `400` if the assembled source fails to import.
95610
+ * @throws {GovernanceRefusedError} When the write guard refuses a fact,
95611
+ * individual or rule the seed writes; nothing of the seed is stored.
95612
+ * `403` `reserved_sort_write_refused`, `sort_write_not_granted`,
95613
+ * `operational_authority_denied` or `operational_authority_undetermined`;
95614
+ * `409` `authz_relation_derived`; `422`
95615
+ * `operational_rule_conclusion`, `authz_rule_shape`,
95616
+ * `authz_parent_of_sort_refused` or `filing_term_unread` (#1227).
95617
+ * @throws {VocabularyRefusedError} `409` `governed_sort_write_refused`: that
95618
+ * code is in the vocabulary set too, which the SDK reads first.
95619
+ *
95620
+ * @remarks
95621
+ * Sent to `POST /api/v1/demo/seed` with the body `{}`; the engine refuses
95622
+ * an unknown field with `422`.
95623
+ *
95624
+ * @example
95625
+ * ```typescript
95626
+ * const { forms, sorts } = await client.demo.seed();
95627
+ * ```
93143
95628
  */
93144
95629
  async seed(request = {}, requestOptions) {
93145
- const response = await this.api.demoSeed(
93146
- DemoSeedRequestFromFrontToApi(request),
93147
- toRequestParams(requestOptions)
93148
- );
95630
+ const response = await this.api.demoSeed(DemoSeedRequestFromFrontToApi(request), toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
93149
95631
  return decodeResponse(response, DemoSeedResponseFromApiToFront);
93150
95632
  }
93151
95633
  };
@@ -95453,6 +97935,19 @@ var ConnectorsClient = class {
95453
97935
  };
95454
97936
 
95455
97937
  // src/normalizers/boundary.ts
97938
+ var decisionCodes = [
97939
+ "boundary_space_invalid",
97940
+ "boundary_registry_unreadable",
97941
+ "boundary_no_caller_credential",
97942
+ "boundary_space_forbidden",
97943
+ "boundary_policy_unreadable",
97944
+ "boundary_entry_not_allowed",
97945
+ "boundary_data_class_not_allowed",
97946
+ "egress_denied",
97947
+ "boundary_needs_confirmation",
97948
+ "boundary_quota_exhausted",
97949
+ "boundary_quota_unreadable"
97950
+ ];
95456
97951
  var privacyModes = ["off", "user", "required"];
95457
97952
  function mapEntries(record3, map) {
95458
97953
  return Object.fromEntries(
@@ -95463,7 +97958,9 @@ function mapEntries(record3, map) {
95463
97958
  );
95464
97959
  }
95465
97960
  function grantFromApi(dto) {
95466
- const grant = {};
97961
+ const grant = {
97962
+ ...dto.sites === void 0 ? {} : { sites: dto.sites }
97963
+ };
95467
97964
  if (dto.data_classes !== void 0)
95468
97965
  grant.dataClasses = dto.data_classes === null ? null : wireStringArray(dto.data_classes, "data_classes");
95469
97966
  if (dto.confirm_each_use !== void 0)
@@ -95487,6 +97984,7 @@ function BoundaryPolicyFromFrontToApi(policy) {
95487
97984
  if (policy.allowed !== void 0)
95488
97985
  out.allowed = mapEntries(policy.allowed, (grant) => {
95489
97986
  const wire = {};
97987
+ if (grant.sites !== void 0) wire.sites = grant.sites;
95490
97988
  if (grant.dataClasses !== void 0) wire.data_classes = grant.dataClasses;
95491
97989
  if (grant.confirmEachUse !== void 0) wire.confirm_each_use = grant.confirmEachUse;
95492
97990
  if (grant.outboundPrivacy !== void 0) wire.outbound_privacy = grant.outboundPrivacy;
@@ -95507,6 +98005,10 @@ function EffectiveBoundaryFromApiToFront(dto) {
95507
98005
  spaceId: wireString(dto.space_id, "space_id"),
95508
98006
  registryApplied: wireBoolean(dto.registry_applied, "registry_applied"),
95509
98007
  entries: mapEntries(dto.entries, (entry2) => ({
98008
+ badge: entry2.badge,
98009
+ ...entry2.kind === void 0 ? {} : { kind: entry2.kind },
98010
+ ...entry2.name === void 0 ? {} : { name: entry2.name },
98011
+ sites: entry2.sites,
95510
98012
  dataClasses: wireStringArray(entry2.data_classes, "data_classes"),
95511
98013
  confirmEachUse: wireBoolean(entry2.confirm_each_use, "confirm_each_use"),
95512
98014
  outboundPrivacy: mapEntries(
@@ -95557,6 +98059,43 @@ function SiteRequestFiledFromApiToFront(dto) {
95557
98059
  function SiteRequestListFromApiToFront(dto) {
95558
98060
  return dto.items.map(SiteRequestFromApiToFront);
95559
98061
  }
98062
+ function BoundaryDecideRequestFromFrontToApi(request) {
98063
+ return {
98064
+ entry_id: request.entryId,
98065
+ ...request.spaceId === void 0 ? {} : { space_id: request.spaceId },
98066
+ ...request.dataClass === void 0 ? {} : { data_class: request.dataClass },
98067
+ ...request.targetHost === void 0 ? {} : { target_host: request.targetHost },
98068
+ ...request.confirmed === void 0 ? {} : { confirmed: request.confirmed }
98069
+ };
98070
+ }
98071
+ function BoundaryDecisionFromApiToFront(dto) {
98072
+ const decision = {
98073
+ verdict: wireLiteral(dto.verdict, ["allowed", "confirm", "blocked"], "verdict"),
98074
+ sanitise: wireBoolean(dto.sanitise, "sanitise")
98075
+ };
98076
+ if (dto.code !== void 0)
98077
+ decision.code = dto.code === null ? null : wireLiteral(dto.code, decisionCodes, "code");
98078
+ if (dto.rule !== void 0)
98079
+ decision.rule = dto.rule === null ? null : wireLiteral(dto.rule, ["not_allowed_in_space", "blocked_in_space"], "rule");
98080
+ if (dto.badge !== void 0)
98081
+ decision.badge = dto.badge === null ? null : wireLiteral(dto.badge, ["on_box", "external"], "badge");
98082
+ if (dto.kind !== void 0)
98083
+ decision.kind = dto.kind === null ? null : wireString(dto.kind, "kind");
98084
+ if (dto.name !== void 0)
98085
+ decision.name = dto.name === null ? null : wireString(dto.name, "name");
98086
+ if (dto.quota !== void 0)
98087
+ decision.quota = dto.quota === null ? null : {
98088
+ limit: wireNumber(dto.quota.limit, "quota.limit"),
98089
+ used: wireNumber(dto.quota.used, "quota.used"),
98090
+ resetsAt: wireString(dto.quota.resets_at, "quota.resets_at")
98091
+ };
98092
+ if (dto.sites !== void 0)
98093
+ decision.sites = dto.sites === null ? null : {
98094
+ allow: wireStringArray(dto.sites.allow, "sites.allow"),
98095
+ block: wireStringArray(dto.sites.block, "sites.block")
98096
+ };
98097
+ return decision;
98098
+ }
95560
98099
 
95561
98100
  // src/resources/boundary.ts
95562
98101
  var BoundaryClient = class {
@@ -95565,6 +98104,23 @@ var BoundaryClient = class {
95565
98104
  this.api = api;
95566
98105
  }
95567
98106
  api;
98107
+ /** Ask the engine to decide one outbound call.
98108
+ * @param request - The registry entry and circumstances of this call.
98109
+ * @param requestOptions - Per-call cancellation, timeout and request options.
98110
+ * @returns The engine's verdict and any associated restrictions, reason and quota.
98111
+ * @throws {ApiError} When the HTTP request fails.
98112
+ * @throws {ResponseShapeError} When the decision cannot be decoded.
98113
+ * @remarks Sends snake_case JSON to `POST /api/v1/boundary/decide`.
98114
+ * The engine can count an admitted call against the entry's daily quota.
98115
+ * @example const decision = await client.boundary.decide({ entryId: 'web-search' });
98116
+ */
98117
+ async decide(request, requestOptions) {
98118
+ const response = await this.api.postDecide(
98119
+ BoundaryDecideRequestFromFrontToApi(request),
98120
+ toRequestParams(requestOptions)
98121
+ );
98122
+ return decodeResponse(response, BoundaryDecisionFromApiToFront);
98123
+ }
95568
98124
  /** Read the effective restrictions computed by the engine.
95569
98125
  * @param spaceId - Project/space identifier, or `*` for the admin cap.
95570
98126
  * @param requestOptions - Per-call cancellation, timeout and request options.
@@ -97025,6 +99581,327 @@ var ChannelsClient = class {
97025
99581
  }
97026
99582
  };
97027
99583
 
99584
+ // src/normalizers/text-editing.ts
99585
+ function TextProofreadResponseFromApiToFront(dto) {
99586
+ return {
99587
+ edits: dto.edits.map((item0) => TextProofreadEditFromApiToFront(item0)),
99588
+ promptVersion: dto.prompt_version
99589
+ };
99590
+ }
99591
+ function TextProofreadEditFromApiToFront(dto) {
99592
+ return {
99593
+ after: dto.after,
99594
+ before: dto.before,
99595
+ end: dto.end,
99596
+ start: dto.start
99597
+ };
99598
+ }
99599
+ function TextRewriteResponseFromApiToFront(dto) {
99600
+ return {
99601
+ promptVersion: dto.prompt_version,
99602
+ text: dto.text
99603
+ };
99604
+ }
99605
+ function TextProofreadRequestFromFrontToApi(model) {
99606
+ return {
99607
+ text: model.text
99608
+ };
99609
+ }
99610
+ function TextRewriteRequestFromFrontToApi(model) {
99611
+ return {
99612
+ passage: model.passage,
99613
+ style: model.style,
99614
+ template: model.template,
99615
+ tone: model.tone
99616
+ };
99617
+ }
99618
+
99619
+ // src/resources/text.ts
99620
+ var TextClient = class {
99621
+ /** @internal */
99622
+ api;
99623
+ /** @internal */
99624
+ constructor(api) {
99625
+ this.api = api;
99626
+ }
99627
+ /**
99628
+ * Proofread a text: spelling, agreement and grammar only.
99629
+ *
99630
+ * @param request - The request (`TextProofreadRequest`), camelCase; sent snake_case.
99631
+ * @param requestOptions - Per-call cancellation, timeout and request options.
99632
+ * @returns The engine's answer as `TextProofreadResponse`, camelCase.
99633
+ * @throws {ApiError} 400: Empty or too long
99634
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
99635
+ * @throws {ApiError} 422: The model's edits broke a rule (edit_location, overlap, quantity_changed, invalid_edit)
99636
+ * @throws {ApiError} 502: `llm_provider_failed` (`component`: `text_model`): the text model's provider failed or refused
99637
+ * @throws {ApiError} 503: `llm_unconfigured` (`component`: `text_model`): no text model is configured on this engine
99638
+ *
99639
+ * @remarks Uses POST `/api/v1/text/proofread`.
99640
+ * POST /api/v1/text/proofread
99641
+ *
99642
+ * @example
99643
+ * ```typescript
99644
+ * const { edits } = await client.text.proofread({ text });
99645
+ * ```
99646
+ */
99647
+ async proofread(request, requestOptions) {
99648
+ const response = await this.api.proofreadText(
99649
+ TextProofreadRequestFromFrontToApi(request),
99650
+ toRequestParams(requestOptions)
99651
+ );
99652
+ return decodeResponse(response, TextProofreadResponseFromApiToFront);
99653
+ }
99654
+ /**
99655
+ * Rewrite a passage in a tone, optionally following a template.
99656
+ *
99657
+ * @param request - The request (`TextRewriteRequest`), camelCase; sent snake_case.
99658
+ * @param requestOptions - Per-call cancellation, timeout and request options.
99659
+ * @returns The engine's answer as `TextRewriteResponse`, camelCase.
99660
+ * @throws {ApiError} 400: Empty, too long, or style misused
99661
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
99662
+ * @throws {ApiError} 422: The rewrite changed a number, sign, separator or currency, or was empty
99663
+ * @throws {ApiError} 502: `llm_provider_failed` (`component`: `text_model`): the text model's provider failed or refused
99664
+ * @throws {ApiError} 503: `llm_unconfigured` (`component`: `text_model`): no text model is configured on this engine
99665
+ *
99666
+ * @remarks Uses POST `/api/v1/text/rewrite`.
99667
+ * POST /api/v1/text/rewrite
99668
+ *
99669
+ * @example
99670
+ * ```typescript
99671
+ * const rewritten = await client.text.rewrite({ text, tone: 'formal' });
99672
+ * ```
99673
+ */
99674
+ async rewrite(request, requestOptions) {
99675
+ const response = await this.api.rewriteText(
99676
+ TextRewriteRequestFromFrontToApi(request),
99677
+ toRequestParams(requestOptions)
99678
+ );
99679
+ return decodeResponse(response, TextRewriteResponseFromApiToFront);
99680
+ }
99681
+ };
99682
+
99683
+ // src/normalizers/browser-agent.ts
99684
+ function opaqueAction(action) {
99685
+ return Object.fromEntries(Object.entries(action));
99686
+ }
99687
+ function BrowserLinkFromFrontToApi(model) {
99688
+ return { ref_id: model.refId, label: model.label, url: model.url };
99689
+ }
99690
+ function BrowserTabFromFrontToApi(model) {
99691
+ return {
99692
+ tab_id: model.tabId,
99693
+ ...model.current !== void 0 ? { current: model.current } : {},
99694
+ ...model.openedByAgent !== void 0 ? { opened_by_agent: model.openedByAgent } : {},
99695
+ ...model.title !== void 0 ? { title: model.title } : {},
99696
+ ...model.url !== void 0 ? { url: model.url } : {}
99697
+ };
99698
+ }
99699
+ function BrowserStepRequestFromFrontToApi(model) {
99700
+ return {
99701
+ task: model.task,
99702
+ url: model.url,
99703
+ dom_snapshot: model.domSnapshot,
99704
+ ...model.title !== void 0 ? { title: model.title } : {},
99705
+ ...model.history !== void 0 ? { history: model.history } : {},
99706
+ ...model.marks !== void 0 ? { marks: model.marks } : {},
99707
+ ...model.maxTokens !== void 0 ? { max_tokens: model.maxTokens } : {},
99708
+ ...model.memory !== void 0 ? { memory: model.memory } : {},
99709
+ ...model.navigationLinks !== void 0 ? {
99710
+ navigation_links: model.navigationLinks === null ? null : model.navigationLinks.map(BrowserLinkFromFrontToApi)
99711
+ } : {},
99712
+ ...model.screenshot !== void 0 ? { screenshot: model.screenshot } : {},
99713
+ ...model.tabs !== void 0 ? { tabs: model.tabs.map(BrowserTabFromFrontToApi) } : {}
99714
+ };
99715
+ }
99716
+ function BrowserStepResponseFromApiToFront(dto) {
99717
+ return {
99718
+ evaluationPreviousGoal: dto.evaluation_previous_goal,
99719
+ memory: dto.memory,
99720
+ nextGoal: dto.next_goal,
99721
+ actions: dto.actions.map(opaqueAction)
99722
+ };
99723
+ }
99724
+ function BrowserRunRequestFromFrontToApi(model) {
99725
+ switch (model.operation) {
99726
+ case "start":
99727
+ return { operation: "start", task: model.task, browser_session: model.browserSession };
99728
+ case "inspect":
99729
+ return { operation: "inspect" };
99730
+ case "observe":
99731
+ return {
99732
+ operation: "observe",
99733
+ revision: model.revision,
99734
+ observation: BrowserStepRequestFromFrontToApi(model.observation)
99735
+ };
99736
+ case "authorize":
99737
+ return { operation: "authorize", revision: model.revision, command: model.command };
99738
+ case "discard":
99739
+ return { operation: "discard", revision: model.revision, command: model.command };
99740
+ case "receipt":
99741
+ return {
99742
+ operation: "receipt",
99743
+ command: model.command,
99744
+ outcome: {
99745
+ ok: model.outcome.ok,
99746
+ ...model.outcome.observation !== void 0 ? { observation: model.outcome.observation } : {}
99747
+ }
99748
+ };
99749
+ case "resolve":
99750
+ return { operation: "resolve", command: model.command, outcome: model.outcome };
99751
+ case "cancel":
99752
+ return { operation: "cancel", revision: model.revision };
99753
+ }
99754
+ }
99755
+ function BrowserRunViewFromApiToFront(dto) {
99756
+ return {
99757
+ id: dto.id,
99758
+ browserSession: dto.browser_session,
99759
+ task: dto.task,
99760
+ phase: dto.phase,
99761
+ revision: dto.revision,
99762
+ step: dto.step,
99763
+ pending: dto.pending == null ? null : { command: dto.pending.command, name: dto.pending.name, intent: dto.pending.intent },
99764
+ result: dto.result == null ? null : { success: dto.result.success, text: dto.result.text }
99765
+ };
99766
+ }
99767
+ function BrowserRunResponseFromApiToFront(dto) {
99768
+ return {
99769
+ ...BrowserRunViewFromApiToFront(dto),
99770
+ proposal: dto.proposal == null ? null : { id: dto.proposal.id, action: opaqueAction(dto.proposal.action) },
99771
+ authorized: dto.authorized ?? null
99772
+ };
99773
+ }
99774
+
99775
+ // src/resources/browser-agent.ts
99776
+ var BrowserAgentClient = class {
99777
+ /** @internal */
99778
+ api;
99779
+ /** @internal */
99780
+ constructor(api) {
99781
+ this.api = api;
99782
+ }
99783
+ /**
99784
+ * Decide the next browser actions for the current page state.
99785
+ *
99786
+ * @param request - The task and the page state (`domSnapshot`, `url`, tabs,
99787
+ * optional screenshot and marks).
99788
+ * @param requestOptions - Per-call request options.
99789
+ * @returns The evaluation of the previous goal, the planner's note, the next
99790
+ * goal and the ordered actions (verbatim).
99791
+ * @throws {BadRequestError} `400` for an empty task, or a body that is not JSON.
99792
+ * @throws {ApiError} `422` if the model returned no parseable step.
99793
+ * @throws {InternalServerError} `502` `llm_provider_failed`: the model's provider failed.
99794
+ * @throws {ServiceUnavailableError} `503` `llm_unconfigured`: no text model is configured.
99795
+ *
99796
+ * @remarks
99797
+ * Sent to `POST /api/v1/agent/browser-step`, snake_case on the wire
99798
+ * (`dom_snapshot`, `navigation_links`, `max_tokens`). Visual grounding is
99799
+ * best-effort: without a screenshot or a vision port the step reads the
99800
+ * element tree alone. The engine keeps nothing between steps: carry
99801
+ * `memory` and `history` forward yourself.
99802
+ *
99803
+ * @example
99804
+ * ```typescript
99805
+ * const step = await client.browserAgent.step({
99806
+ * task: 'Find the pricing page',
99807
+ * url: 'https://example.com',
99808
+ * domSnapshot: '[e1]<a href="/pricing">Pricing</a>',
99809
+ * });
99810
+ * console.log(step.nextGoal, step.actions);
99811
+ * ```
99812
+ */
99813
+ async step(request, requestOptions) {
99814
+ const response = await this.api.agentBrowserStep(
99815
+ BrowserStepRequestFromFrontToApi(request),
99816
+ toRequestParams(requestOptions)
99817
+ );
99818
+ return decodeResponse(response, BrowserStepResponseFromApiToFront);
99819
+ }
99820
+ /**
99821
+ * List the signed-in person's resumable browser runs.
99822
+ *
99823
+ * @param requestOptions - Per-call request options.
99824
+ * @returns At most 50 runs, each `ready`, `proposed` or `in_flight`.
99825
+ * @throws {GovernanceRefusedError} `403` `browser_run_person_required` (the
99826
+ * caller is not a signed-in person) or `browser_run_access_denied`; `503`
99827
+ * `workflow_authority_unconfigured`, `browser_authority_unavailable` or
99828
+ * `browser_run_store_unavailable`.
99829
+ *
99830
+ * @remarks
99831
+ * Sent to `GET /api/v1/agent/browser-runs`; snake_case wire fields
99832
+ * (`browser_session`) are mapped to camelCase.
99833
+ *
99834
+ * @example
99835
+ * ```typescript
99836
+ * const runs = await client.browserAgent.listRuns();
99837
+ * for (const run of runs) console.log(run.id, run.phase);
99838
+ * ```
99839
+ */
99840
+ async listRuns(requestOptions) {
99841
+ const response = await this.api.listBrowserAgentRuns(toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
99842
+ return decodeResponse(response, (runs) => runs.map(BrowserRunViewFromApiToFront));
99843
+ }
99844
+ /**
99845
+ * Run one operation on a browser run: `start`, `inspect`, `observe`,
99846
+ * `authorize`, `discard`, `receipt`, `resolve` or `cancel`.
99847
+ *
99848
+ * @param runId - The person's browser run id (UUID). A `start` names a new one.
99849
+ * @param request - The operation, discriminated by `operation`.
99850
+ * @param requestOptions - Per-call request options.
99851
+ * @returns The run, with `proposal` set only in the answer to the `observe`
99852
+ * that proposed an action, and `authorized` set only in the answer to the
99853
+ * `authorize` that won the command.
99854
+ * @throws {GovernanceRefusedError} `400` `browser_run_task_invalid` or
99855
+ * `browser_observation_out_of_bounds`; `403`
99856
+ * `browser_run_person_required` or `browser_run_access_denied`; `404`
99857
+ * `browser_run_not_found`; `409` `browser_run_conflict` (a stale revision,
99858
+ * a `start` that names another task or browser session, or a pending
99859
+ * action that needs reconciliation); `502` `llm_provider_failed`; `503`
99860
+ * `workflow_authority_unconfigured`, `browser_authority_unavailable`,
99861
+ * `browser_run_store_unavailable` or `llm_unconfigured`.
99862
+ * @throws {VocabularyRefusedError} `400` or `422` `invalid_request`: that
99863
+ * code is in the vocabulary set too, which the SDK reads first.
99864
+ * @throws {ApiError} `423` if the tenant's emergency stop is engaged (no
99865
+ * `code`); `503` without a `code` if the emergency stop could not be read.
99866
+ *
99867
+ * @remarks
99868
+ * Sent to `POST /api/v1/agent/browser-runs/{run_id}`, snake_case on the
99869
+ * wire (`browser_session`, the observation's `dom_snapshot`). The grant is
99870
+ * one-time: the run keeps the action's name and intent, never its
99871
+ * arguments, so read `proposal.action` from the `observe` answer.
99872
+ *
99873
+ * @example
99874
+ * ```typescript
99875
+ * let run = await client.browserAgent.operateRun(runId, {
99876
+ * operation: 'start',
99877
+ * task: 'Find the pricing page',
99878
+ * browserSession: sessionId,
99879
+ * });
99880
+ * run = await client.browserAgent.operateRun(runId, {
99881
+ * operation: 'observe',
99882
+ * revision: run.revision,
99883
+ * observation: { task: run.task, url, domSnapshot },
99884
+ * });
99885
+ * if (run.proposal !== null) {
99886
+ * const granted = await client.browserAgent.operateRun(runId, {
99887
+ * operation: 'authorize',
99888
+ * revision: run.revision,
99889
+ * command: run.proposal.id,
99890
+ * });
99891
+ * console.log(granted.authorized);
99892
+ * }
99893
+ * ```
99894
+ */
99895
+ async operateRun(runId, request, requestOptions) {
99896
+ const response = await this.api.browserAgentRun(
99897
+ runId,
99898
+ BrowserRunRequestFromFrontToApi(request),
99899
+ toRequestParams(requestOptions)
99900
+ ).catch(rethrowVocabularyRefusal);
99901
+ return decodeResponse(response, BrowserRunResponseFromApiToFront);
99902
+ }
99903
+ };
99904
+
97028
99905
  // src/normalizers/platform.ts
97029
99906
  function CreateBackupRequestFromFrontToApi(model) {
97030
99907
  const out = {
@@ -97158,6 +100035,95 @@ function SkillListResponseFromApiToFront(dto) {
97158
100035
  return { skills: dto.skills.map(SkillSummaryFromApiToFront) };
97159
100036
  }
97160
100037
 
100038
+ // src/normalizers/skill-scripts.ts
100039
+ function ScriptPolicyFromApiToFront(dto) {
100040
+ return {
100041
+ company: dto.company,
100042
+ enabled: dto.enabled
100043
+ };
100044
+ }
100045
+ function EditionFromApiToFront(dto) {
100046
+ return {
100047
+ entrypoint: dto.entrypoint,
100048
+ packageId: dto.package_id,
100049
+ version: dto.version,
100050
+ workflow: dto.workflow
100051
+ };
100052
+ }
100053
+ function ResultWithEditionFromApiToFront(dto) {
100054
+ return {
100055
+ edition: EditionFromApiToFront(dto.edition),
100056
+ generation: GenerateDocumentResponseFromApiToFront(dto.generation),
100057
+ rootTermId: dto.root_term_id,
100058
+ skillId: dto.skill_id
100059
+ };
100060
+ }
100061
+ function ScriptResultFromApiToFront(dto) {
100062
+ return {
100063
+ exitCode: dto.exit_code,
100064
+ files: dto.files.map((item0) => ScriptOutputFileFromApiToFront(item0)),
100065
+ reviewId: dto.review_id,
100066
+ sandboxId: dto.sandbox_id,
100067
+ stderr: dto.stderr,
100068
+ stdout: dto.stdout
100069
+ };
100070
+ }
100071
+ function ScriptOutputFileFromApiToFront(dto) {
100072
+ return {
100073
+ bytes: dto.bytes,
100074
+ path: dto.path
100075
+ };
100076
+ }
100077
+ function ScriptPreviewFromApiToFront(dto) {
100078
+ return {
100079
+ entrypoint: dto.entrypoint,
100080
+ image: dto.image,
100081
+ reviewId: dto.review_id,
100082
+ rootTermId: dto.root_term_id,
100083
+ script: dto.script,
100084
+ sha256: dto.sha256
100085
+ };
100086
+ }
100087
+ function SkillDraftEditResponseFromApiToFront(dto) {
100088
+ return {
100089
+ description: dto.description,
100090
+ markdown: dto.markdown,
100091
+ name: dto.name,
100092
+ promptVersion: dto.prompt_version
100093
+ };
100094
+ }
100095
+ function ApprovedScriptFromFrontToApi(model) {
100096
+ return {
100097
+ review_id: model.reviewId,
100098
+ selection: ScriptSelectionFromFrontToApi(model.selection)
100099
+ };
100100
+ }
100101
+ function InvocationFromFrontToApi(model) {
100102
+ return {
100103
+ package_id: model.packageId,
100104
+ root_term_id: model.rootTermId,
100105
+ version: model.version
100106
+ };
100107
+ }
100108
+ function ScriptPolicyChangeFromFrontToApi(model) {
100109
+ return {
100110
+ enabled: model.enabled
100111
+ };
100112
+ }
100113
+ function ScriptSelectionFromFrontToApi(model) {
100114
+ return {
100115
+ package_id: model.packageId,
100116
+ root_term_id: model.rootTermId,
100117
+ version: model.version
100118
+ };
100119
+ }
100120
+ function SkillDraftEditRequestFromFrontToApi(model) {
100121
+ return {
100122
+ request: model.request,
100123
+ source: model.source
100124
+ };
100125
+ }
100126
+
97161
100127
  // src/resources/platform.ts
97162
100128
  var PlatformClient = class {
97163
100129
  /** @internal */
@@ -97165,9 +100131,13 @@ var PlatformClient = class {
97165
100131
  /** @internal */
97166
100132
  tenantId;
97167
100133
  /** @internal */
97168
- constructor(api, tenantId) {
100134
+ /** @internal */
100135
+ skills;
100136
+ /** @internal */
100137
+ constructor(api, tenantId, skills) {
97169
100138
  this.api = api;
97170
100139
  this.tenantId = tenantId;
100140
+ this.skills = skills;
97171
100141
  }
97172
100142
  // ── Backups ───────────────────────────────────────────────────────────
97173
100143
  /**
@@ -97467,6 +100437,166 @@ var PlatformClient = class {
97467
100437
  const response = await this.api.listSkills(toRequestParams(requestOptions));
97468
100438
  return decodeResponse(response, SkillListResponseFromApiToFront);
97469
100439
  }
100440
+ /**
100441
+ * listSkillEditions
100442
+ *
100443
+ * @param skillId - The skill (UUID).
100444
+ * @param requestOptions - Per-call cancellation, timeout and request options.
100445
+ * @returns The engine's answer as `Edition[]`, camelCase.
100446
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
100447
+ *
100448
+ * @remarks Uses GET `/api/v1/skills/{id}/editions`.
100449
+ *
100450
+ * @example
100451
+ * ```typescript
100452
+ * const editions = await client.platform.listSkillEditions(skillId);
100453
+ * ```
100454
+ */
100455
+ async listSkillEditions(skillId, requestOptions) {
100456
+ const response = await this.api.editions(skillId, toRequestParams(requestOptions));
100457
+ return decodeResponse(response, (dto) => dto.map(EditionFromApiToFront));
100458
+ }
100459
+ /**
100460
+ * invokeSkill
100461
+ *
100462
+ * @param skillId - The skill (UUID).
100463
+ * @param request - The request (`Invocation`), camelCase; sent snake_case.
100464
+ * @param requestOptions - Per-call cancellation, timeout and request options.
100465
+ * @returns The engine's answer as `ResultWithEdition`, camelCase.
100466
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
100467
+ *
100468
+ * @remarks Uses POST `/api/v1/skills/{id}/invoke`.
100469
+ *
100470
+ * @example
100471
+ * ```typescript
100472
+ * const result = await client.platform.invokeSkill(skillId, invocation);
100473
+ * ```
100474
+ */
100475
+ async invokeSkill(skillId, request, requestOptions) {
100476
+ const response = await this.api.invoke(
100477
+ skillId,
100478
+ InvocationFromFrontToApi(request),
100479
+ toRequestParams(requestOptions)
100480
+ );
100481
+ return decodeResponse(response, ResultWithEditionFromApiToFront);
100482
+ }
100483
+ /**
100484
+ * executeSkillScript
100485
+ *
100486
+ * @param skillId - The skill (UUID).
100487
+ * @param request - The request (`ApprovedScript`), camelCase; sent snake_case.
100488
+ * @param requestOptions - Per-call cancellation, timeout and request options.
100489
+ * @returns The engine's answer as `ScriptResult`, camelCase.
100490
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
100491
+ *
100492
+ * @remarks Uses POST `/api/v1/skills/{id}/script/execute`.
100493
+ *
100494
+ * @example
100495
+ * ```typescript
100496
+ * const result = await client.platform.executeSkillScript(skillId, approved);
100497
+ * ```
100498
+ */
100499
+ async executeSkillScript(skillId, request, requestOptions) {
100500
+ const response = await this.api.execute(
100501
+ skillId,
100502
+ ApprovedScriptFromFrontToApi(request),
100503
+ toRequestParams(requestOptions)
100504
+ );
100505
+ return decodeResponse(response, ScriptResultFromApiToFront);
100506
+ }
100507
+ /**
100508
+ * prepareSkillScript
100509
+ *
100510
+ * @param skillId - The skill (UUID).
100511
+ * @param request - The request (`ScriptSelection`), camelCase; sent snake_case.
100512
+ * @param requestOptions - Per-call cancellation, timeout and request options.
100513
+ * @returns The engine's answer as `ScriptPreview`, camelCase.
100514
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
100515
+ *
100516
+ * @remarks Uses POST `/api/v1/skills/{id}/script/prepare`.
100517
+ *
100518
+ * @example
100519
+ * ```typescript
100520
+ * const preview = await client.platform.prepareSkillScript(skillId, selection);
100521
+ * ```
100522
+ */
100523
+ async prepareSkillScript(skillId, request, requestOptions) {
100524
+ const response = await this.api.prepareSkillScript(
100525
+ skillId,
100526
+ ScriptSelectionFromFrontToApi(request),
100527
+ toRequestParams(requestOptions)
100528
+ );
100529
+ return decodeResponse(response, ScriptPreviewFromApiToFront);
100530
+ }
100531
+ /**
100532
+ * getSkillScriptPolicy
100533
+ *
100534
+ * @param requestOptions - Per-call cancellation, timeout and request options.
100535
+ * @returns The engine's answer as `ScriptPolicy`, camelCase.
100536
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
100537
+ *
100538
+ * @remarks Uses GET `/api/v1/skills/script-policy`.
100539
+ *
100540
+ * @example
100541
+ * ```typescript
100542
+ * const policy = await client.platform.getSkillScriptPolicy();
100543
+ * ```
100544
+ */
100545
+ async getSkillScriptPolicy(requestOptions) {
100546
+ const response = await this.api.policy(toRequestParams(requestOptions));
100547
+ return decodeResponse(response, ScriptPolicyFromApiToFront);
100548
+ }
100549
+ /**
100550
+ * setSkillScriptPolicy
100551
+ *
100552
+ * @param organizationId - The organization.
100553
+ * @param request - The request (`ScriptPolicyChange`), camelCase; sent snake_case.
100554
+ * @param requestOptions - Per-call cancellation, timeout and request options.
100555
+ * @returns The engine's answer as `ScriptPolicy`, camelCase.
100556
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
100557
+ *
100558
+ * @remarks Uses PUT `/api/v1/skills/organizations/{id}/script-policy`.
100559
+ *
100560
+ * @example
100561
+ * ```typescript
100562
+ * await client.platform.setSkillScriptPolicy(organizationId, change);
100563
+ * ```
100564
+ */
100565
+ async setSkillScriptPolicy(organizationId, request, requestOptions) {
100566
+ const response = await this.api.setSkillScriptPolicy(
100567
+ organizationId,
100568
+ ScriptPolicyChangeFromFrontToApi(request),
100569
+ toRequestParams(requestOptions)
100570
+ );
100571
+ return decodeResponse(response, ScriptPolicyFromApiToFront);
100572
+ }
100573
+ /**
100574
+ * Propose an edited SKILL.md for a requested change.
100575
+ *
100576
+ * @param request - The request (`SkillDraftEditRequest`), camelCase; sent snake_case.
100577
+ * @param requestOptions - Per-call cancellation, timeout and request options.
100578
+ * @returns The engine's answer as `SkillDraftEditResponse`, camelCase.
100579
+ * @throws {ApiError} 400: Empty or too long
100580
+ * @throws {ApiError} 410: `tenant_deleted` (body `{"error": "tenant_deleted", "message"}`): the tenant was deleted; its id is refused on every route and cannot be reused
100581
+ * @throws {ApiError} 422: The model's file failed the package check (skill_* codes)
100582
+ * @throws {ApiError} 502: `llm_provider_failed` (`component`: `text_model`): the text model's provider failed or refused
100583
+ * @throws {ApiError} 503: `llm_unconfigured` (`component`: `text_model`): no text model is configured on this engine
100584
+ *
100585
+ * @remarks Uses POST `/api/v1/skills/draft-edit`.
100586
+ * POST /api/v1/skills/draft-edit
100587
+ *
100588
+ * @example
100589
+ * ```typescript
100590
+ * const draft = await client.platform.draftSkillEdit(request);
100591
+ * ```
100592
+ */
100593
+ async draftSkillEdit(request, requestOptions) {
100594
+ const response = await this.skills.draftSkillEdit(
100595
+ SkillDraftEditRequestFromFrontToApi(request),
100596
+ toRequestParams(requestOptions)
100597
+ );
100598
+ return decodeResponse(response, SkillDraftEditResponseFromApiToFront);
100599
+ }
97470
100600
  };
97471
100601
 
97472
100602
  // src/normalizers/source-observations.ts
@@ -101326,6 +104456,10 @@ var ReasoningLayerClient = class {
101326
104456
  channels;
101327
104457
  /** Platform administration — backups, config sections, connector health, diagnostics, identities, onboarding, skills. */
101328
104458
  platform;
104459
+ /** Text editing with the engine's text model: proofread and rewrite. */
104460
+ text;
104461
+ /** The browser agent: planning steps and the browser runs the engine keeps for a person. */
104462
+ browserAgent;
101329
104463
  /**
101330
104464
  * Runtime native (WASM) plugins — register, list, enable, disable, delete.
101331
104465
  * Restricted to the platform provisioning identity.
@@ -101754,8 +104888,11 @@ var ReasoningLayerClient = class {
101754
104888
  );
101755
104889
  this.platform = new PlatformClient(
101756
104890
  encodePathParams(new Platform(generatedHttp)),
101757
- resolved.tenantId
104891
+ resolved.tenantId,
104892
+ encodePathParams(new Skills(generatedHttp))
101758
104893
  );
104894
+ this.text = new TextClient(encodePathParams(new Text(generatedHttp)));
104895
+ this.browserAgent = new BrowserAgentClient(encodePathParams(new Agent(generatedHttp)));
101759
104896
  this.plugins = new PluginsClient(encodePathParams(new Plugins(generatedHttp)));
101760
104897
  this.memory = new MemoryClient(encodePathParams(new Memory(generatedHttp)));
101761
104898
  }
@@ -102095,6 +105232,24 @@ var vocabulary_exports = {};
102095
105232
  // src/types/source-observations.ts
102096
105233
  var source_observations_exports = {};
102097
105234
 
105235
+ // src/types/live-docs.ts
105236
+ var live_docs_exports = {};
105237
+
105238
+ // src/types/agent-instructions.ts
105239
+ var agent_instructions_exports = {};
105240
+
105241
+ // src/types/skill-scripts.ts
105242
+ var skill_scripts_exports = {};
105243
+
105244
+ // src/types/text-editing.ts
105245
+ var text_editing_exports = {};
105246
+
105247
+ // src/types/browser-agent.ts
105248
+ var browser_agent_exports = {};
105249
+
105250
+ // src/types/frame-authoring.ts
105251
+ var frame_authoring_exports = {};
105252
+
102098
105253
  // src/types/boundary.ts
102099
105254
  var boundary_exports = {};
102100
105255
 
@@ -104915,6 +108070,6 @@ var BrowserPhoneRehearsal = class {
104915
108070
  }
104916
108071
  };
104917
108072
 
104918
- export { ANY_ROLE, AUDIT_CAUSAL_REQUEST_HEADERS, AUDIT_RESPONSE_HEADERS, action_reviews_exports as ActionReviews, actions_exports as Actions, admin_exports as Admin, agui_exports as Agui, analysis_exports as Analysis, anonymization_exports as Anonymization, ApiError, app_actions_exports as AppActions, argumentation_exports as Argumentation, audit_exports as Audit, AuthenticationError, authz_exports as Authz, BadRequestError, batch_exports as Batch, boundary_exports as Boundary, BoundaryClient, BrowserPhoneRehearsal, BrowserSpeechAudio, BrowserSpeechOutput, BrowserSpeechSession, BrowserSpeechTranscription, BulkRefusedError, cdl_exports as CDL, causal_exports as Causal, channels_exports as Channels, chase_exports as Chase, cognitive_exports as Cognitive, coherence_exports as Coherence, collections_exports as Collections, communities_exports as Communities, compliance_exports as Compliance, compliance_markings_exports as ComplianceMarkings, conformal_exports as Conformal, conformance_exports as Conformance, connectors_exports as Connectors, Constraint, ConstraintViolationError, constraints_exports as Constraints, control_exports as Control, conversation_exports as Conversation, corpus_exports as Corpus, cron_exports as Cron, dl_exports as DL, DeadlineExceededError, demo_exports as Demo, DerivedFactWriteError, discovery_exports as Discovery, document_check_exports as DocumentCheck, documents_exports as Documents, embeddings_exports as Embeddings, engine_exports as Engine, execution_exports as Execution, extract_exports as Extract, feasibility_exports as Feasibility, Flow, flow_networks_exports as FlowNetworks, ForbiddenError, forecast_exports as Forecast, functions_exports as Functions, fuzzy_exports as Fuzzy, FuzzyShape, gateway_sessions_exports as GatewaySessions, GatewaySessionsClient, generation_exports as Generation, Geometry, GoneError, governance_exports as Governance, GovernanceClient, GovernanceRefusedError, guardrail_exports as Guardrail, health_exports as Health, homoiconic_exports as Homoiconic, hypotheses_exports as Hypotheses, ilp_exports as ILP, IdempotencyKeyRequiredError, IdempotencyKeyReusedError, image_extraction_exports as ImageExtraction, InboundWebhooksClient, inbox_exports as Inbox, inference_exports as Inference, ingestion_exports as Ingestion, IngestionBatchSession, IngestionFailedError, IngestionQueueUnavailableError, IngestionSession, IngestionSessionHandle, InternalServerError, LP, ltn_exports as LTN, marketplace_exports as Marketplace, memory_exports as Memory, metrics_exports as Metrics, MutationOutcomeUnconfirmedError, NamedConstraintViolationError, namespaces_exports as Namespaces, NetworkError, neuro_symbolic_exports as NeuroSymbolic, NotFoundError, ontology_exports as Ontology, ontology_alignment_exports as OntologyAlignment, ontology_bridge_exports as OntologyBridge, ontology_export_exports as OntologyExport, ontology_facade_exports as OntologyFacade, operations_exports as Operations, optimize_exports as Optimize, osf_diff_exports as OsfDiff, osfql_exports as Osfql, OsfqlError, oversight_exports as Oversight, pairing_exports as Pairing, PhoneClient, plain_values_exports as PlainValues, platform_exports as Platform, plugins_exports as Plugins, PreconditionFailedError, PreconditionRequiredError, preferences_exports as Preferences, proof_engine_exports as ProofEngine, property_graph_exports as PropertyGraph, query_exports as Query, RateLimitError, reasoning_exports as Reasoning, ReasoningLayerClient, ReasoningLayerError, research_exports as Research, ResponseShapeError, reviews_exports as Reviews, reward_exports as Reward, row_exports as Row, RuleTermWriteError, SDK_VERSION, SPEECH_AUDIO_WORKLET_SOURCE, sat_exports as Sat, scenarios_exports as Scenarios, scheduling_exports as Scheduling, ServiceUnavailableError, settings_exports as Settings, SettingsClient, smt_exports as Smt, snapshots_exports as Snapshots, solver_exports as Solver, SortBuilder, sorts_exports as Sorts, source_observations_exports as SourceObservations, sources_exports as Sources, spaces_exports as Spaces, sparql_exports as Sparql, speakers_exports as Speakers, speech_exports as Speech, SpeechSessionConnection, SpeechTranscriptionConnection, statistical_exports as Statistical, streaming_exports as Streaming, subscriptions_exports as Subscriptions, synthetic_exports as Synthetic, temporal_exports as Temporal, TenantDeletedError, terms_exports as Terms, thomas_exports as Thomas, TimeoutError, ui_exports as UI, USER_DATA_FIELDS, UrlIngestStoreFailedError, utilities_exports as Utilities, ValidationError, Value, values_exports as Values, verification_exports as Verification, vision_exports as Vision, visualization_exports as Visualization, vocabulary_exports as Vocabulary, VocabularyRefusedError, WebSocketClient, WebSocketConnection, webhook_actions_exports as WebhookActions, workflows_exports as Workflows, WorkflowsClient, aggregate, allen, bind, causalRequestHeaders, collect, constrained, createApiError, decodeConversationMessage, decodeSpeechPcmFrame, discriminateFeatureValue, errorBodyCode, errorBodyComponent, featureValueToInput, functionRefusalOf, governanceRefusalOfBody, guard, isConstrainedPlainVar, isPsiTermInput, isSortRefFeatureValue, isSortRefSelectProps, isTaggedValueDto, isUuid, not, osfqlContainmentRefusalOf, paginateByOffset, paginateByPage, psi, readAuditHeaders, readCausalRefusal, ruleRefusalOf, sealPreimage, sortDeleteRefusalOf, speechTextSegments, termRefusalOf, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue, validateWorkflowOnceRequest, vocabularyRefusalOfBody, workflowEventRunId };
108073
+ export { ANY_ROLE, AUDIT_CAUSAL_REQUEST_HEADERS, AUDIT_RESPONSE_HEADERS, action_reviews_exports as ActionReviews, actions_exports as Actions, admin_exports as Admin, agent_instructions_exports as AgentInstructions, agui_exports as Agui, analysis_exports as Analysis, anonymization_exports as Anonymization, ApiError, app_actions_exports as AppActions, argumentation_exports as Argumentation, audit_exports as Audit, AuthenticationError, authz_exports as Authz, BadRequestError, batch_exports as Batch, boundary_exports as Boundary, BoundaryClient, browser_agent_exports as BrowserAgent, BrowserPhoneRehearsal, BrowserSpeechAudio, BrowserSpeechOutput, BrowserSpeechSession, BrowserSpeechTranscription, BulkRefusedError, cdl_exports as CDL, causal_exports as Causal, channels_exports as Channels, chase_exports as Chase, cognitive_exports as Cognitive, coherence_exports as Coherence, collections_exports as Collections, communities_exports as Communities, compliance_exports as Compliance, compliance_markings_exports as ComplianceMarkings, conformal_exports as Conformal, conformance_exports as Conformance, connectors_exports as Connectors, Constraint, ConstraintViolationError, constraints_exports as Constraints, control_exports as Control, conversation_exports as Conversation, corpus_exports as Corpus, cron_exports as Cron, dl_exports as DL, DeadlineExceededError, demo_exports as Demo, DerivedFactWriteError, discovery_exports as Discovery, document_check_exports as DocumentCheck, documents_exports as Documents, embeddings_exports as Embeddings, engine_exports as Engine, execution_exports as Execution, extract_exports as Extract, feasibility_exports as Feasibility, Flow, flow_networks_exports as FlowNetworks, ForbiddenError, forecast_exports as Forecast, frame_authoring_exports as FrameAuthoring, functions_exports as Functions, fuzzy_exports as Fuzzy, FuzzyShape, gateway_sessions_exports as GatewaySessions, GatewaySessionsClient, generation_exports as Generation, Geometry, GoneError, governance_exports as Governance, GovernanceClient, GovernanceRefusedError, guardrail_exports as Guardrail, health_exports as Health, homoiconic_exports as Homoiconic, hypotheses_exports as Hypotheses, ilp_exports as ILP, IdempotencyKeyRequiredError, IdempotencyKeyReusedError, image_extraction_exports as ImageExtraction, InboundWebhooksClient, inbox_exports as Inbox, inference_exports as Inference, ingestion_exports as Ingestion, IngestionBatchSession, IngestionFailedError, IngestionQueueUnavailableError, IngestionSession, IngestionSessionHandle, InternalServerError, LP, ltn_exports as LTN, live_docs_exports as LiveDocs, marketplace_exports as Marketplace, memory_exports as Memory, metrics_exports as Metrics, MutationOutcomeUnconfirmedError, NamedConstraintViolationError, namespaces_exports as Namespaces, NetworkError, neuro_symbolic_exports as NeuroSymbolic, NotFoundError, ontology_exports as Ontology, ontology_alignment_exports as OntologyAlignment, ontology_bridge_exports as OntologyBridge, ontology_export_exports as OntologyExport, ontology_facade_exports as OntologyFacade, operations_exports as Operations, optimize_exports as Optimize, osf_diff_exports as OsfDiff, osfql_exports as Osfql, OsfqlError, oversight_exports as Oversight, pairing_exports as Pairing, PhoneClient, plain_values_exports as PlainValues, platform_exports as Platform, plugins_exports as Plugins, PreconditionFailedError, PreconditionRequiredError, preferences_exports as Preferences, proof_engine_exports as ProofEngine, property_graph_exports as PropertyGraph, query_exports as Query, RateLimitError, reasoning_exports as Reasoning, ReasoningLayerClient, ReasoningLayerError, research_exports as Research, ResponseShapeError, reviews_exports as Reviews, reward_exports as Reward, row_exports as Row, RuleTermWriteError, SDK_VERSION, SPEECH_AUDIO_WORKLET_SOURCE, sat_exports as Sat, scenarios_exports as Scenarios, scheduling_exports as Scheduling, ServiceUnavailableError, settings_exports as Settings, SettingsClient, skill_scripts_exports as SkillScripts, smt_exports as Smt, snapshots_exports as Snapshots, solver_exports as Solver, SortBuilder, sorts_exports as Sorts, source_observations_exports as SourceObservations, sources_exports as Sources, spaces_exports as Spaces, sparql_exports as Sparql, speakers_exports as Speakers, speech_exports as Speech, SpeechSessionConnection, SpeechTranscriptionConnection, statistical_exports as Statistical, streaming_exports as Streaming, subscriptions_exports as Subscriptions, synthetic_exports as Synthetic, temporal_exports as Temporal, TenantDeletedError, terms_exports as Terms, text_editing_exports as TextEditing, thomas_exports as Thomas, TimeoutError, ui_exports as UI, USER_DATA_FIELDS, UrlIngestStoreFailedError, utilities_exports as Utilities, ValidationError, Value, values_exports as Values, verification_exports as Verification, vision_exports as Vision, visualization_exports as Visualization, vocabulary_exports as Vocabulary, VocabularyRefusedError, WebSocketClient, WebSocketConnection, webhook_actions_exports as WebhookActions, workflows_exports as Workflows, WorkflowsClient, aggregate, allen, bind, causalRequestHeaders, collect, constrained, createApiError, decodeConversationMessage, decodeSpeechPcmFrame, discriminateFeatureValue, errorBodyCode, errorBodyComponent, featureValueToInput, functionRefusalOf, governanceRefusalOfBody, guard, isConstrainedPlainVar, isPsiTermInput, isSortRefFeatureValue, isSortRefSelectProps, isTaggedValueDto, isUuid, not, osfqlContainmentRefusalOf, paginateByOffset, paginateByPage, psi, readAuditHeaders, readCausalRefusal, ruleRefusalOf, sealPreimage, sortDeleteRefusalOf, speechTextSegments, termRefusalOf, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue, validateWorkflowOnceRequest, vocabularyRefusalOfBody, workflowEventRunId };
104919
108074
  //# sourceMappingURL=index.js.map
104920
108075
  //# sourceMappingURL=index.js.map