@naturali/sdk 0.258.1 → 0.259.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +31 -12
- package/dist/index.d.mts +31 -12
- package/dist/index.mjs +4 -4
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -3701,7 +3701,7 @@ var Knowledge = class {
|
|
|
3701
3701
|
/**
|
|
3702
3702
|
* Search knowledge
|
|
3703
3703
|
*
|
|
3704
|
-
* Searches across documents and memories using hybrid retrieval — a vector query and a full-text query per source, fused by reciprocal rank — or by file paths, document IDs, memory store IDs, or tags. At least one of `query`, `tags`, `document_paths`, `document_ids`, or `memory_store_ids` must be provided.
|
|
3704
|
+
* Searches across documents and memories using hybrid retrieval — a vector query and a full-text query per source, fused by reciprocal rank — by the stored vector of an existing document or memory (`similar_to_document_id`, `similar_to_memory_id`), or by file paths, document IDs, memory store IDs, or tags. At least one of `query`, `similar_to_document_id`, `similar_to_memory_id`, `tags`, `document_paths`, `document_ids`, or `memory_store_ids` must be provided.
|
|
3705
3705
|
*/
|
|
3706
3706
|
static searchKnowledge(options) {
|
|
3707
3707
|
return (options.client ?? client).post({
|
|
@@ -5103,7 +5103,7 @@ var Policies = class {
|
|
|
5103
5103
|
/**
|
|
5104
5104
|
* Create a policy
|
|
5105
5105
|
*
|
|
5106
|
-
* Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:<project_id>:<type>:<id>`), else `400
|
|
5106
|
+
* Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:<project_id>:<type>:<id>`), else `400`; an `Allow` without `resource` grants every resource of that project. Without a project, creates a global policy, which only the unrestricted admin may.
|
|
5107
5107
|
*/
|
|
5108
5108
|
static createPolicy(options) {
|
|
5109
5109
|
return (options.client ?? client).post({
|
|
@@ -6190,7 +6190,7 @@ var Triggers = class {
|
|
|
6190
6190
|
/**
|
|
6191
6191
|
* Create a trigger
|
|
6192
6192
|
*
|
|
6193
|
-
* Creates a new trigger for a project. A `{{secret:...}}` reference in `tool_context` also needs `secrets:UseSecret` on that secret, else `403`. An event trigger whose `policy_ids` cannot read a platform namespace its `events` subscribe to is refused with `400` `
|
|
6193
|
+
* Creates a new trigger for a project. A `{{secret:...}}` reference in `tool_context` also needs `secrets:UseSecret` on that secret, else `403`. An event trigger whose `policy_ids` cannot read a platform namespace its `events` subscribe to is refused with `400` `EVENTS_UNREADABLE`.
|
|
6194
6194
|
*/
|
|
6195
6195
|
static createTrigger(options) {
|
|
6196
6196
|
return (options.client ?? client).post({
|
|
@@ -6238,7 +6238,7 @@ var Triggers = class {
|
|
|
6238
6238
|
/**
|
|
6239
6239
|
* Update a trigger
|
|
6240
6240
|
*
|
|
6241
|
-
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing acts under the trigger's `policy_ids` rather than the updater's grant. A caller who could not start the new target is answered `403` and the trigger keeps the target it had. A `{{secret:...}}` reference in a written `tool_context`, or in the stored one when the target changes, also needs `secrets:UseSecret` on that secret, else `403`. An update leaving an event trigger's `policy_ids` unable to read a platform namespace its `events` subscribe to is refused with `400` `
|
|
6241
|
+
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing acts under the trigger's `policy_ids` rather than the updater's grant. A caller who could not start the new target is answered `403` and the trigger keeps the target it had. A `{{secret:...}}` reference in a written `tool_context`, or in the stored one when the target changes, also needs `secrets:UseSecret` on that secret, else `403`. An update leaving an event trigger's `policy_ids` unable to read a platform namespace its `events` subscribe to is refused with `400` `EVENTS_UNREADABLE`.
|
|
6242
6242
|
*
|
|
6243
6243
|
*/
|
|
6244
6244
|
static updateTrigger(options) {
|
package/dist/index.d.cts
CHANGED
|
@@ -4924,7 +4924,7 @@ type PolicyResourceProperties = {
|
|
|
4924
4924
|
*/
|
|
4925
4925
|
action: Array<string>;
|
|
4926
4926
|
/**
|
|
4927
|
-
* Resource SRN patterns.
|
|
4927
|
+
* Resource SRN patterns. Omitted, an `Allow` matches every resource of the formation's project (`srn:<project_id>:*:*`); a `Deny` matches every resource.
|
|
4928
4928
|
*/
|
|
4929
4929
|
resource?: Array<string> | null;
|
|
4930
4930
|
/**
|
|
@@ -8336,9 +8336,12 @@ type ConfirmPlaybookCaseNodeRequest = {
|
|
|
8336
8336
|
type PolicyStatement = {
|
|
8337
8337
|
effect: 'Allow' | 'Deny';
|
|
8338
8338
|
action: Array<string>;
|
|
8339
|
+
/**
|
|
8340
|
+
* Resource SRN patterns. Omitted, an `Allow` in a project policy matches every resource of the policy's project (`srn:<project_id>:*:*`); anywhere else it matches every resource.
|
|
8341
|
+
*/
|
|
8339
8342
|
resource?: Array<string>;
|
|
8340
8343
|
/**
|
|
8341
|
-
* Optional condition block. Keys are condition operators (e.g. StringEquals) mapping to context-key/value maps; evaluated by the policy compiler. A context key must be one the platform supplies — `iam:ResourceType` or `iam:
|
|
8344
|
+
* Optional condition block. Keys are condition operators (e.g. StringEquals) mapping to context-key/value maps; evaluated by the policy compiler. A context key must be one the platform supplies — `iam:ResourceType`, `iam:ResourceTag/<tag>` (the tag on the target resource) or `iam:RequestTag/<key>` (the tag value the request writes) — because an unknown key is absent from the evaluation context, so a `Deny` naming one would never deny. The tag name after the slash is opaque and unconstrained. Operator and context keys are matched by exact string and are never case-converted, so they round-trip exactly as written: `iam:ResourceTag/cost_center` selects the tag `cost_center`, not `costCenter`.
|
|
8342
8345
|
*
|
|
8343
8346
|
*/
|
|
8344
8347
|
condition?: {
|
|
@@ -10212,7 +10215,7 @@ type UserPlanChange = {
|
|
|
10212
10215
|
* A naturali event type. Its values are what this API emits — deliberately only the events it can itself cause, so no declared name is one that never fires. It grows as modules land.
|
|
10213
10216
|
*
|
|
10214
10217
|
*/
|
|
10215
|
-
type EventType = 'conversation.started' | 'message.received' | 'generation.completed' | 'generation.failed' | 'usage.threshold_crossed' | 'project.paused' | 'project.resumed' | 'decision.completed' | 'decision.failed' | 'task.created' | 'task.transitioned' | 'task.closed' | 'task.migrated' | 'task.stalled' | 'task.paused' | 'task.resumed' | 'task.approval_failed' | 'task.automation_retrying' | 'task.automation_rejected' | 'task.automation_unrouted' | 'task.unblocked' | 'approval.created' | 'approval.approved' | 'approval.rejected' | 'approval.expired';
|
|
10218
|
+
type EventType = 'conversation.started' | 'message.received' | 'generation.completed' | 'generation.failed' | 'usage.threshold_crossed' | 'project.paused' | 'project.resumed' | 'decision.completed' | 'decision.failed' | 'task.created' | 'task.transitioned' | 'task.closed' | 'task.migrated' | 'task.stalled' | 'task.paused' | 'task.resumed' | 'task.approval_failed' | 'task.automation_retrying' | 'task.automation_rejected' | 'task.automation_unrouted' | 'task.unblocked' | 'approval.created' | 'approval.approved' | 'approval.rejected' | 'approval.expired' | 'exception.created';
|
|
10216
10219
|
/**
|
|
10217
10220
|
* Which events this endpoint receives. Each entry is an exact type (`generation.completed`), a resource wildcard (`generation.*`), or `*` for everything. A bare resource name (`generation`) matches nothing and is rejected.
|
|
10218
10221
|
*
|
|
@@ -10233,7 +10236,7 @@ type Event = {
|
|
|
10233
10236
|
/**
|
|
10234
10237
|
* What the event is about.
|
|
10235
10238
|
*/
|
|
10236
|
-
resource_type: 'conversation' | 'message' | 'generation' | 'usage_threshold' | 'project' | 'decision' | 'task' | 'approval';
|
|
10239
|
+
resource_type: 'conversation' | 'message' | 'generation' | 'usage_threshold' | 'project' | 'decision' | 'task' | 'approval' | 'exception';
|
|
10237
10240
|
/**
|
|
10238
10241
|
* The id of that resource, in the form its own API uses.
|
|
10239
10242
|
*/
|
|
@@ -23851,11 +23854,19 @@ type SearchKnowledgeData = {
|
|
|
23851
23854
|
*/
|
|
23852
23855
|
query?: string;
|
|
23853
23856
|
/**
|
|
23854
|
-
*
|
|
23857
|
+
* Ranks by this document's stored embedding (the mean of its chunk embeddings) instead of a query: the vector channel alone, no embedding call, and none of the document's own chunks in the results. Not combinable with `query` or `similar_to_memory_id`.
|
|
23858
|
+
*/
|
|
23859
|
+
similar_to_document_id?: string;
|
|
23860
|
+
/**
|
|
23861
|
+
* Ranks by this memory's stored embedding instead of a query: the vector channel alone, no embedding call, and the memory itself left out of the results. Not combinable with `query` or `similar_to_document_id`.
|
|
23862
|
+
*/
|
|
23863
|
+
similar_to_memory_id?: string;
|
|
23864
|
+
/**
|
|
23865
|
+
* Minimum raw cosine `similarity_score` a **vector** candidate must reach to take part in ranking, applied before fusion. Only applies when `query` or a `similar_to_*` source is provided. Lexical candidates are deliberately exempt: a result that literally contains the searched token is the evidence, and dropping it for a low cosine is the failure hybrid search exists to prevent. Not a floor on `score`, whose fused value encodes rank position rather than similarity.
|
|
23855
23866
|
*/
|
|
23856
23867
|
min_similarity?: number;
|
|
23857
23868
|
/**
|
|
23858
|
-
* The `k` in the reciprocal rank fusion term `1 / (k + rank)`, which sets how steeply a result's contribution decays with its position in each ranked list. A smaller value weights the very top of each list more heavily. Defaults to 60. Only applies when `query` is provided.
|
|
23869
|
+
* The `k` in the reciprocal rank fusion term `1 / (k + rank)`, which sets how steeply a result's contribution decays with its position in each ranked list. A smaller value weights the very top of each list more heavily. Defaults to 60. Only applies when `query` is provided; ignored with a `similar_to_*` source, which ranks by one channel.
|
|
23859
23870
|
*/
|
|
23860
23871
|
rrf_k?: number;
|
|
23861
23872
|
/**
|
|
@@ -23910,7 +23921,7 @@ type SearchKnowledgeData = {
|
|
|
23910
23921
|
};
|
|
23911
23922
|
type SearchKnowledgeErrors = {
|
|
23912
23923
|
/**
|
|
23913
|
-
* Bad request — at least one search parameter is required
|
|
23924
|
+
* Bad request — at least one search parameter is required, and a `similar_to_*` source takes neither `query` nor the other source
|
|
23914
23925
|
*/
|
|
23915
23926
|
400: ErrorResponse;
|
|
23916
23927
|
/**
|
|
@@ -23922,9 +23933,13 @@ type SearchKnowledgeErrors = {
|
|
|
23922
23933
|
*/
|
|
23923
23934
|
403: ErrorResponse;
|
|
23924
23935
|
/**
|
|
23925
|
-
* The
|
|
23936
|
+
* The `similar_to_*` source does not exist or the caller cannot search it
|
|
23926
23937
|
*/
|
|
23927
23938
|
404: ErrorResponse;
|
|
23939
|
+
/**
|
|
23940
|
+
* SIMILARITY_SOURCE_NOT_EMBEDDED — the `similar_to_*` source has no embedding yet
|
|
23941
|
+
*/
|
|
23942
|
+
409: ErrorResponse;
|
|
23928
23943
|
/**
|
|
23929
23944
|
* `REQUEST_REJECTED` — the request body is over the size the body parser accepts
|
|
23930
23945
|
*/
|
|
@@ -32998,6 +33013,10 @@ type ListTasksData = {
|
|
|
32998
33013
|
* A `StructuredFilter` over `metadata`, as JSON, url-encoded. It travels as JSON rather than as `key:value` pairs because the match is exact and a query string cannot otherwise say whether `3` is the number or the string.
|
|
32999
33014
|
*/
|
|
33000
33015
|
metadata?: string;
|
|
33016
|
+
/**
|
|
33017
|
+
* Omitted, newest first. `next` lists in pull order: effective priority (the highest `priority` of the task and of every open task it blocks, transitively; `null` below `very_low`), then `readiness.unblocks` descending, then `entered_state_at` oldest first, then `id`. It composes with every filter and answers one page: `limit` applies, a `cursor` is a `400`, and `next_cursor` is `null`.
|
|
33018
|
+
*/
|
|
33019
|
+
order?: 'next';
|
|
33001
33020
|
/**
|
|
33002
33021
|
* Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.
|
|
33003
33022
|
*/
|
|
@@ -38405,7 +38424,7 @@ export declare class Knowledge {
|
|
|
38405
38424
|
/**
|
|
38406
38425
|
* Search knowledge
|
|
38407
38426
|
*
|
|
38408
|
-
* Searches across documents and memories using hybrid retrieval — a vector query and a full-text query per source, fused by reciprocal rank — or by file paths, document IDs, memory store IDs, or tags. At least one of `query`, `tags`, `document_paths`, `document_ids`, or `memory_store_ids` must be provided.
|
|
38427
|
+
* Searches across documents and memories using hybrid retrieval — a vector query and a full-text query per source, fused by reciprocal rank — by the stored vector of an existing document or memory (`similar_to_document_id`, `similar_to_memory_id`), or by file paths, document IDs, memory store IDs, or tags. At least one of `query`, `similar_to_document_id`, `similar_to_memory_id`, `tags`, `document_paths`, `document_ids`, or `memory_store_ids` must be provided.
|
|
38409
38428
|
*/
|
|
38410
38429
|
static searchKnowledge<ThrowOnError extends boolean = false>(options: Options<SearchKnowledgeData, ThrowOnError>): RequestResult<SearchKnowledgeResponses, SearchKnowledgeErrors, ThrowOnError>;
|
|
38411
38430
|
}
|
|
@@ -39109,7 +39128,7 @@ export declare class Policies {
|
|
|
39109
39128
|
/**
|
|
39110
39129
|
* Create a policy
|
|
39111
39130
|
*
|
|
39112
|
-
* Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:<project_id>:<type>:<id>`), else `400
|
|
39131
|
+
* Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:<project_id>:<type>:<id>`), else `400`; an `Allow` without `resource` grants every resource of that project. Without a project, creates a global policy, which only the unrestricted admin may.
|
|
39113
39132
|
*/
|
|
39114
39133
|
static createPolicy<ThrowOnError extends boolean = false>(options: Options<CreatePolicyData, ThrowOnError>): RequestResult<CreatePolicyResponses, CreatePolicyErrors, ThrowOnError>;
|
|
39115
39134
|
/**
|
|
@@ -39682,7 +39701,7 @@ export declare class Triggers {
|
|
|
39682
39701
|
/**
|
|
39683
39702
|
* Create a trigger
|
|
39684
39703
|
*
|
|
39685
|
-
* Creates a new trigger for a project. A `{{secret:...}}` reference in `tool_context` also needs `secrets:UseSecret` on that secret, else `403`. An event trigger whose `policy_ids` cannot read a platform namespace its `events` subscribe to is refused with `400` `
|
|
39704
|
+
* Creates a new trigger for a project. A `{{secret:...}}` reference in `tool_context` also needs `secrets:UseSecret` on that secret, else `403`. An event trigger whose `policy_ids` cannot read a platform namespace its `events` subscribe to is refused with `400` `EVENTS_UNREADABLE`.
|
|
39686
39705
|
*/
|
|
39687
39706
|
static createTrigger<ThrowOnError extends boolean = false>(options: Options<CreateTriggerData, ThrowOnError>): RequestResult<CreateTriggerResponses, CreateTriggerErrors, ThrowOnError>;
|
|
39688
39707
|
/**
|
|
@@ -39706,7 +39725,7 @@ export declare class Triggers {
|
|
|
39706
39725
|
/**
|
|
39707
39726
|
* Update a trigger
|
|
39708
39727
|
*
|
|
39709
|
-
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing acts under the trigger's `policy_ids` rather than the updater's grant. A caller who could not start the new target is answered `403` and the trigger keeps the target it had. A `{{secret:...}}` reference in a written `tool_context`, or in the stored one when the target changes, also needs `secrets:UseSecret` on that secret, else `403`. An update leaving an event trigger's `policy_ids` unable to read a platform namespace its `events` subscribe to is refused with `400` `
|
|
39728
|
+
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing acts under the trigger's `policy_ids` rather than the updater's grant. A caller who could not start the new target is answered `403` and the trigger keeps the target it had. A `{{secret:...}}` reference in a written `tool_context`, or in the stored one when the target changes, also needs `secrets:UseSecret` on that secret, else `403`. An update leaving an event trigger's `policy_ids` unable to read a platform namespace its `events` subscribe to is refused with `400` `EVENTS_UNREADABLE`.
|
|
39710
39729
|
*
|
|
39711
39730
|
*/
|
|
39712
39731
|
static updateTrigger<ThrowOnError extends boolean = false>(options: Options<UpdateTriggerData, ThrowOnError>): RequestResult<UpdateTriggerResponses, UpdateTriggerErrors, ThrowOnError>;
|
package/dist/index.d.mts
CHANGED
|
@@ -4924,7 +4924,7 @@ type PolicyResourceProperties = {
|
|
|
4924
4924
|
*/
|
|
4925
4925
|
action: Array<string>;
|
|
4926
4926
|
/**
|
|
4927
|
-
* Resource SRN patterns.
|
|
4927
|
+
* Resource SRN patterns. Omitted, an `Allow` matches every resource of the formation's project (`srn:<project_id>:*:*`); a `Deny` matches every resource.
|
|
4928
4928
|
*/
|
|
4929
4929
|
resource?: Array<string> | null;
|
|
4930
4930
|
/**
|
|
@@ -8336,9 +8336,12 @@ type ConfirmPlaybookCaseNodeRequest = {
|
|
|
8336
8336
|
type PolicyStatement = {
|
|
8337
8337
|
effect: 'Allow' | 'Deny';
|
|
8338
8338
|
action: Array<string>;
|
|
8339
|
+
/**
|
|
8340
|
+
* Resource SRN patterns. Omitted, an `Allow` in a project policy matches every resource of the policy's project (`srn:<project_id>:*:*`); anywhere else it matches every resource.
|
|
8341
|
+
*/
|
|
8339
8342
|
resource?: Array<string>;
|
|
8340
8343
|
/**
|
|
8341
|
-
* Optional condition block. Keys are condition operators (e.g. StringEquals) mapping to context-key/value maps; evaluated by the policy compiler. A context key must be one the platform supplies — `iam:ResourceType` or `iam:
|
|
8344
|
+
* Optional condition block. Keys are condition operators (e.g. StringEquals) mapping to context-key/value maps; evaluated by the policy compiler. A context key must be one the platform supplies — `iam:ResourceType`, `iam:ResourceTag/<tag>` (the tag on the target resource) or `iam:RequestTag/<key>` (the tag value the request writes) — because an unknown key is absent from the evaluation context, so a `Deny` naming one would never deny. The tag name after the slash is opaque and unconstrained. Operator and context keys are matched by exact string and are never case-converted, so they round-trip exactly as written: `iam:ResourceTag/cost_center` selects the tag `cost_center`, not `costCenter`.
|
|
8342
8345
|
*
|
|
8343
8346
|
*/
|
|
8344
8347
|
condition?: {
|
|
@@ -10212,7 +10215,7 @@ type UserPlanChange = {
|
|
|
10212
10215
|
* A naturali event type. Its values are what this API emits — deliberately only the events it can itself cause, so no declared name is one that never fires. It grows as modules land.
|
|
10213
10216
|
*
|
|
10214
10217
|
*/
|
|
10215
|
-
type EventType = 'conversation.started' | 'message.received' | 'generation.completed' | 'generation.failed' | 'usage.threshold_crossed' | 'project.paused' | 'project.resumed' | 'decision.completed' | 'decision.failed' | 'task.created' | 'task.transitioned' | 'task.closed' | 'task.migrated' | 'task.stalled' | 'task.paused' | 'task.resumed' | 'task.approval_failed' | 'task.automation_retrying' | 'task.automation_rejected' | 'task.automation_unrouted' | 'task.unblocked' | 'approval.created' | 'approval.approved' | 'approval.rejected' | 'approval.expired';
|
|
10218
|
+
type EventType = 'conversation.started' | 'message.received' | 'generation.completed' | 'generation.failed' | 'usage.threshold_crossed' | 'project.paused' | 'project.resumed' | 'decision.completed' | 'decision.failed' | 'task.created' | 'task.transitioned' | 'task.closed' | 'task.migrated' | 'task.stalled' | 'task.paused' | 'task.resumed' | 'task.approval_failed' | 'task.automation_retrying' | 'task.automation_rejected' | 'task.automation_unrouted' | 'task.unblocked' | 'approval.created' | 'approval.approved' | 'approval.rejected' | 'approval.expired' | 'exception.created';
|
|
10216
10219
|
/**
|
|
10217
10220
|
* Which events this endpoint receives. Each entry is an exact type (`generation.completed`), a resource wildcard (`generation.*`), or `*` for everything. A bare resource name (`generation`) matches nothing and is rejected.
|
|
10218
10221
|
*
|
|
@@ -10233,7 +10236,7 @@ type Event = {
|
|
|
10233
10236
|
/**
|
|
10234
10237
|
* What the event is about.
|
|
10235
10238
|
*/
|
|
10236
|
-
resource_type: 'conversation' | 'message' | 'generation' | 'usage_threshold' | 'project' | 'decision' | 'task' | 'approval';
|
|
10239
|
+
resource_type: 'conversation' | 'message' | 'generation' | 'usage_threshold' | 'project' | 'decision' | 'task' | 'approval' | 'exception';
|
|
10237
10240
|
/**
|
|
10238
10241
|
* The id of that resource, in the form its own API uses.
|
|
10239
10242
|
*/
|
|
@@ -23851,11 +23854,19 @@ type SearchKnowledgeData = {
|
|
|
23851
23854
|
*/
|
|
23852
23855
|
query?: string;
|
|
23853
23856
|
/**
|
|
23854
|
-
*
|
|
23857
|
+
* Ranks by this document's stored embedding (the mean of its chunk embeddings) instead of a query: the vector channel alone, no embedding call, and none of the document's own chunks in the results. Not combinable with `query` or `similar_to_memory_id`.
|
|
23858
|
+
*/
|
|
23859
|
+
similar_to_document_id?: string;
|
|
23860
|
+
/**
|
|
23861
|
+
* Ranks by this memory's stored embedding instead of a query: the vector channel alone, no embedding call, and the memory itself left out of the results. Not combinable with `query` or `similar_to_document_id`.
|
|
23862
|
+
*/
|
|
23863
|
+
similar_to_memory_id?: string;
|
|
23864
|
+
/**
|
|
23865
|
+
* Minimum raw cosine `similarity_score` a **vector** candidate must reach to take part in ranking, applied before fusion. Only applies when `query` or a `similar_to_*` source is provided. Lexical candidates are deliberately exempt: a result that literally contains the searched token is the evidence, and dropping it for a low cosine is the failure hybrid search exists to prevent. Not a floor on `score`, whose fused value encodes rank position rather than similarity.
|
|
23855
23866
|
*/
|
|
23856
23867
|
min_similarity?: number;
|
|
23857
23868
|
/**
|
|
23858
|
-
* The `k` in the reciprocal rank fusion term `1 / (k + rank)`, which sets how steeply a result's contribution decays with its position in each ranked list. A smaller value weights the very top of each list more heavily. Defaults to 60. Only applies when `query` is provided.
|
|
23869
|
+
* The `k` in the reciprocal rank fusion term `1 / (k + rank)`, which sets how steeply a result's contribution decays with its position in each ranked list. A smaller value weights the very top of each list more heavily. Defaults to 60. Only applies when `query` is provided; ignored with a `similar_to_*` source, which ranks by one channel.
|
|
23859
23870
|
*/
|
|
23860
23871
|
rrf_k?: number;
|
|
23861
23872
|
/**
|
|
@@ -23910,7 +23921,7 @@ type SearchKnowledgeData = {
|
|
|
23910
23921
|
};
|
|
23911
23922
|
type SearchKnowledgeErrors = {
|
|
23912
23923
|
/**
|
|
23913
|
-
* Bad request — at least one search parameter is required
|
|
23924
|
+
* Bad request — at least one search parameter is required, and a `similar_to_*` source takes neither `query` nor the other source
|
|
23914
23925
|
*/
|
|
23915
23926
|
400: ErrorResponse;
|
|
23916
23927
|
/**
|
|
@@ -23922,9 +23933,13 @@ type SearchKnowledgeErrors = {
|
|
|
23922
23933
|
*/
|
|
23923
23934
|
403: ErrorResponse;
|
|
23924
23935
|
/**
|
|
23925
|
-
* The
|
|
23936
|
+
* The `similar_to_*` source does not exist or the caller cannot search it
|
|
23926
23937
|
*/
|
|
23927
23938
|
404: ErrorResponse;
|
|
23939
|
+
/**
|
|
23940
|
+
* SIMILARITY_SOURCE_NOT_EMBEDDED — the `similar_to_*` source has no embedding yet
|
|
23941
|
+
*/
|
|
23942
|
+
409: ErrorResponse;
|
|
23928
23943
|
/**
|
|
23929
23944
|
* `REQUEST_REJECTED` — the request body is over the size the body parser accepts
|
|
23930
23945
|
*/
|
|
@@ -32998,6 +33013,10 @@ type ListTasksData = {
|
|
|
32998
33013
|
* A `StructuredFilter` over `metadata`, as JSON, url-encoded. It travels as JSON rather than as `key:value` pairs because the match is exact and a query string cannot otherwise say whether `3` is the number or the string.
|
|
32999
33014
|
*/
|
|
33000
33015
|
metadata?: string;
|
|
33016
|
+
/**
|
|
33017
|
+
* Omitted, newest first. `next` lists in pull order: effective priority (the highest `priority` of the task and of every open task it blocks, transitively; `null` below `very_low`), then `readiness.unblocks` descending, then `entered_state_at` oldest first, then `id`. It composes with every filter and answers one page: `limit` applies, a `cursor` is a `400`, and `next_cursor` is `null`.
|
|
33018
|
+
*/
|
|
33019
|
+
order?: 'next';
|
|
33001
33020
|
/**
|
|
33002
33021
|
* Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.
|
|
33003
33022
|
*/
|
|
@@ -38405,7 +38424,7 @@ export declare class Knowledge {
|
|
|
38405
38424
|
/**
|
|
38406
38425
|
* Search knowledge
|
|
38407
38426
|
*
|
|
38408
|
-
* Searches across documents and memories using hybrid retrieval — a vector query and a full-text query per source, fused by reciprocal rank — or by file paths, document IDs, memory store IDs, or tags. At least one of `query`, `tags`, `document_paths`, `document_ids`, or `memory_store_ids` must be provided.
|
|
38427
|
+
* Searches across documents and memories using hybrid retrieval — a vector query and a full-text query per source, fused by reciprocal rank — by the stored vector of an existing document or memory (`similar_to_document_id`, `similar_to_memory_id`), or by file paths, document IDs, memory store IDs, or tags. At least one of `query`, `similar_to_document_id`, `similar_to_memory_id`, `tags`, `document_paths`, `document_ids`, or `memory_store_ids` must be provided.
|
|
38409
38428
|
*/
|
|
38410
38429
|
static searchKnowledge<ThrowOnError extends boolean = false>(options: Options<SearchKnowledgeData, ThrowOnError>): RequestResult<SearchKnowledgeResponses, SearchKnowledgeErrors, ThrowOnError>;
|
|
38411
38430
|
}
|
|
@@ -39109,7 +39128,7 @@ export declare class Policies {
|
|
|
39109
39128
|
/**
|
|
39110
39129
|
* Create a policy
|
|
39111
39130
|
*
|
|
39112
|
-
* Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:<project_id>:<type>:<id>`), else `400
|
|
39131
|
+
* Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:<project_id>:<type>:<id>`), else `400`; an `Allow` without `resource` grants every resource of that project. Without a project, creates a global policy, which only the unrestricted admin may.
|
|
39113
39132
|
*/
|
|
39114
39133
|
static createPolicy<ThrowOnError extends boolean = false>(options: Options<CreatePolicyData, ThrowOnError>): RequestResult<CreatePolicyResponses, CreatePolicyErrors, ThrowOnError>;
|
|
39115
39134
|
/**
|
|
@@ -39682,7 +39701,7 @@ export declare class Triggers {
|
|
|
39682
39701
|
/**
|
|
39683
39702
|
* Create a trigger
|
|
39684
39703
|
*
|
|
39685
|
-
* Creates a new trigger for a project. A `{{secret:...}}` reference in `tool_context` also needs `secrets:UseSecret` on that secret, else `403`. An event trigger whose `policy_ids` cannot read a platform namespace its `events` subscribe to is refused with `400` `
|
|
39704
|
+
* Creates a new trigger for a project. A `{{secret:...}}` reference in `tool_context` also needs `secrets:UseSecret` on that secret, else `403`. An event trigger whose `policy_ids` cannot read a platform namespace its `events` subscribe to is refused with `400` `EVENTS_UNREADABLE`.
|
|
39686
39705
|
*/
|
|
39687
39706
|
static createTrigger<ThrowOnError extends boolean = false>(options: Options<CreateTriggerData, ThrowOnError>): RequestResult<CreateTriggerResponses, CreateTriggerErrors, ThrowOnError>;
|
|
39688
39707
|
/**
|
|
@@ -39706,7 +39725,7 @@ export declare class Triggers {
|
|
|
39706
39725
|
/**
|
|
39707
39726
|
* Update a trigger
|
|
39708
39727
|
*
|
|
39709
|
-
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing acts under the trigger's `policy_ids` rather than the updater's grant. A caller who could not start the new target is answered `403` and the trigger keeps the target it had. A `{{secret:...}}` reference in a written `tool_context`, or in the stored one when the target changes, also needs `secrets:UseSecret` on that secret, else `403`. An update leaving an event trigger's `policy_ids` unable to read a platform namespace its `events` subscribe to is refused with `400` `
|
|
39728
|
+
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing acts under the trigger's `policy_ids` rather than the updater's grant. A caller who could not start the new target is answered `403` and the trigger keeps the target it had. A `{{secret:...}}` reference in a written `tool_context`, or in the stored one when the target changes, also needs `secrets:UseSecret` on that secret, else `403`. An update leaving an event trigger's `policy_ids` unable to read a platform namespace its `events` subscribe to is refused with `400` `EVENTS_UNREADABLE`.
|
|
39710
39729
|
*
|
|
39711
39730
|
*/
|
|
39712
39731
|
static updateTrigger<ThrowOnError extends boolean = false>(options: Options<UpdateTriggerData, ThrowOnError>): RequestResult<UpdateTriggerResponses, UpdateTriggerErrors, ThrowOnError>;
|
package/dist/index.mjs
CHANGED
|
@@ -3700,7 +3700,7 @@ var Knowledge = class {
|
|
|
3700
3700
|
/**
|
|
3701
3701
|
* Search knowledge
|
|
3702
3702
|
*
|
|
3703
|
-
* Searches across documents and memories using hybrid retrieval — a vector query and a full-text query per source, fused by reciprocal rank — or by file paths, document IDs, memory store IDs, or tags. At least one of `query`, `tags`, `document_paths`, `document_ids`, or `memory_store_ids` must be provided.
|
|
3703
|
+
* Searches across documents and memories using hybrid retrieval — a vector query and a full-text query per source, fused by reciprocal rank — by the stored vector of an existing document or memory (`similar_to_document_id`, `similar_to_memory_id`), or by file paths, document IDs, memory store IDs, or tags. At least one of `query`, `similar_to_document_id`, `similar_to_memory_id`, `tags`, `document_paths`, `document_ids`, or `memory_store_ids` must be provided.
|
|
3704
3704
|
*/
|
|
3705
3705
|
static searchKnowledge(options) {
|
|
3706
3706
|
return (options.client ?? client).post({
|
|
@@ -5102,7 +5102,7 @@ var Policies = class {
|
|
|
5102
5102
|
/**
|
|
5103
5103
|
* Create a policy
|
|
5104
5104
|
*
|
|
5105
|
-
* Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:<project_id>:<type>:<id>`), else `400
|
|
5105
|
+
* Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:<project_id>:<type>:<id>`), else `400`; an `Allow` without `resource` grants every resource of that project. Without a project, creates a global policy, which only the unrestricted admin may.
|
|
5106
5106
|
*/
|
|
5107
5107
|
static createPolicy(options) {
|
|
5108
5108
|
return (options.client ?? client).post({
|
|
@@ -6189,7 +6189,7 @@ var Triggers = class {
|
|
|
6189
6189
|
/**
|
|
6190
6190
|
* Create a trigger
|
|
6191
6191
|
*
|
|
6192
|
-
* Creates a new trigger for a project. A `{{secret:...}}` reference in `tool_context` also needs `secrets:UseSecret` on that secret, else `403`. An event trigger whose `policy_ids` cannot read a platform namespace its `events` subscribe to is refused with `400` `
|
|
6192
|
+
* Creates a new trigger for a project. A `{{secret:...}}` reference in `tool_context` also needs `secrets:UseSecret` on that secret, else `403`. An event trigger whose `policy_ids` cannot read a platform namespace its `events` subscribe to is refused with `400` `EVENTS_UNREADABLE`.
|
|
6193
6193
|
*/
|
|
6194
6194
|
static createTrigger(options) {
|
|
6195
6195
|
return (options.client ?? client).post({
|
|
@@ -6237,7 +6237,7 @@ var Triggers = class {
|
|
|
6237
6237
|
/**
|
|
6238
6238
|
* Update a trigger
|
|
6239
6239
|
*
|
|
6240
|
-
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing acts under the trigger's `policy_ids` rather than the updater's grant. A caller who could not start the new target is answered `403` and the trigger keeps the target it had. A `{{secret:...}}` reference in a written `tool_context`, or in the stored one when the target changes, also needs `secrets:UseSecret` on that secret, else `403`. An update leaving an event trigger's `policy_ids` unable to read a platform namespace its `events` subscribe to is refused with `400` `
|
|
6240
|
+
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing acts under the trigger's `policy_ids` rather than the updater's grant. A caller who could not start the new target is answered `403` and the trigger keeps the target it had. A `{{secret:...}}` reference in a written `tool_context`, or in the stored one when the target changes, also needs `secrets:UseSecret` on that secret, else `403`. An update leaving an event trigger's `policy_ids` unable to read a platform namespace its `events` subscribe to is refused with `400` `EVENTS_UNREADABLE`.
|
|
6241
6241
|
*
|
|
6242
6242
|
*/
|
|
6243
6243
|
static updateTrigger(options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.259.0",
|
|
4
4
|
"description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"naturali",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
41
|
-
"@naturali/api": "0.
|
|
41
|
+
"@naturali/api": "0.259.0",
|
|
42
42
|
"@ttoss/openapi-codegen": "^0.10.1",
|
|
43
43
|
"@types/node": "^26.5.1",
|
|
44
44
|
"tsdown": "^0.23.0",
|