@petercatai/whisker-client 6.0.1 → 6.0.202606061614
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/api.d.ts +174 -41
- package/dist/api.js +37 -10
- package/package.json +4 -4
package/dist/api.d.ts
CHANGED
|
@@ -163,14 +163,6 @@ export declare enum IOperator {
|
|
|
163
163
|
And = "and",
|
|
164
164
|
Or = "or"
|
|
165
165
|
}
|
|
166
|
-
/**
|
|
167
|
-
* MemoryTypeEnum
|
|
168
|
-
* Memory lifecycle type
|
|
169
|
-
*/
|
|
170
|
-
export declare enum IMemoryTypeEnum {
|
|
171
|
-
MemoryWorking = "memory_working",
|
|
172
|
-
MemoryLongTerm = "memory_long_term"
|
|
173
|
-
}
|
|
174
166
|
/**
|
|
175
167
|
* MemoryStatusEnum
|
|
176
168
|
* Memory status enumeration
|
|
@@ -680,6 +672,60 @@ export interface IAdminRebuildKnowledgeIndexResponse {
|
|
|
680
672
|
*/
|
|
681
673
|
details?: Record<string, any>[];
|
|
682
674
|
}
|
|
675
|
+
/**
|
|
676
|
+
* AdminRunSchedulerNowRequest
|
|
677
|
+
* 管理员强制立即执行某个 scheduler job 请求
|
|
678
|
+
*/
|
|
679
|
+
export interface IAdminRunSchedulerNowRequest {
|
|
680
|
+
/**
|
|
681
|
+
* Tenant Id
|
|
682
|
+
* 租户ID
|
|
683
|
+
*/
|
|
684
|
+
tenant_id: string;
|
|
685
|
+
/**
|
|
686
|
+
* Job Id
|
|
687
|
+
* job_id;提供时直接执行该 job,忽略筛选条件
|
|
688
|
+
*/
|
|
689
|
+
job_id?: string | null;
|
|
690
|
+
/**
|
|
691
|
+
* Eq Conditions
|
|
692
|
+
* 等值筛选条件(未提供 job_id 时用于唯一定位 job),如 {'job_type': 'knowledge_refresh', 'target_id': '<space_id>'}
|
|
693
|
+
*/
|
|
694
|
+
eq_conditions?: Record<string, any> | null;
|
|
695
|
+
/** 高级筛选条件(未提供 job_id 时使用) */
|
|
696
|
+
advanced_filter?: IFilterGroup | null;
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* AdminRunSchedulerNowResponse
|
|
700
|
+
* 管理员强制执行 scheduler job 响应
|
|
701
|
+
*/
|
|
702
|
+
export interface IAdminRunSchedulerNowResponse {
|
|
703
|
+
/**
|
|
704
|
+
* Tenant Id
|
|
705
|
+
* 租户ID
|
|
706
|
+
*/
|
|
707
|
+
tenant_id: string;
|
|
708
|
+
/**
|
|
709
|
+
* Job Id
|
|
710
|
+
* 被执行的 job_id
|
|
711
|
+
*/
|
|
712
|
+
job_id: string;
|
|
713
|
+
/**
|
|
714
|
+
* Status
|
|
715
|
+
* 执行结果:success / skipped / failed
|
|
716
|
+
*/
|
|
717
|
+
status: string;
|
|
718
|
+
/**
|
|
719
|
+
* Message
|
|
720
|
+
* 执行信息/错误信息
|
|
721
|
+
*/
|
|
722
|
+
message?: string | null;
|
|
723
|
+
/**
|
|
724
|
+
* Detail
|
|
725
|
+
* 执行明细(如各知识的刷新结果)
|
|
726
|
+
*/
|
|
727
|
+
detail?: Record<string, any> | null;
|
|
728
|
+
}
|
|
683
729
|
/**
|
|
684
730
|
* AdminSyncSummaryToStorageRequest
|
|
685
731
|
* 管理员同步 space summary 到自持 tenant 请求
|
|
@@ -798,6 +844,14 @@ export interface IAdminTaskRestartResponse {
|
|
|
798
844
|
*/
|
|
799
845
|
task_ids?: string[];
|
|
800
846
|
}
|
|
847
|
+
/** AdminTenantRequest */
|
|
848
|
+
export interface IAdminTenantRequest {
|
|
849
|
+
/**
|
|
850
|
+
* Tenant Id
|
|
851
|
+
* Target tenant ID
|
|
852
|
+
*/
|
|
853
|
+
tenant_id: string;
|
|
854
|
+
}
|
|
801
855
|
/**
|
|
802
856
|
* AdminUpdateSpaceRequest
|
|
803
857
|
* 管理员更新空间信息请求
|
|
@@ -1614,9 +1668,10 @@ export interface IFileUploadCreate {
|
|
|
1614
1668
|
file_name: string;
|
|
1615
1669
|
/**
|
|
1616
1670
|
* File Ext
|
|
1617
|
-
* 文件扩展名(不含 '.'),如 pdf / md / xlsx
|
|
1671
|
+
* 文件扩展名(不含 '.'),如 pdf / md / xlsx。留空表示未知类型,系统只存储不处理。
|
|
1672
|
+
* @default ""
|
|
1618
1673
|
*/
|
|
1619
|
-
file_ext
|
|
1674
|
+
file_ext?: string;
|
|
1620
1675
|
/**
|
|
1621
1676
|
* File Url
|
|
1622
1677
|
* 文件下载地址
|
|
@@ -2953,8 +3008,6 @@ export interface IMemory {
|
|
|
2953
3008
|
* Memory content
|
|
2954
3009
|
*/
|
|
2955
3010
|
content: string;
|
|
2956
|
-
/** Memory lifecycle type */
|
|
2957
|
-
memory_type: IMemoryTypeEnum;
|
|
2958
3011
|
/** Brain cortex region this memory resides in */
|
|
2959
3012
|
cortex_region: IMemoryCortexEnum;
|
|
2960
3013
|
/**
|
|
@@ -2972,10 +3025,9 @@ export interface IMemory {
|
|
|
2972
3025
|
tags?: string[];
|
|
2973
3026
|
/**
|
|
2974
3027
|
* Confidence
|
|
2975
|
-
* Confidence score
|
|
2976
|
-
* @default 1
|
|
3028
|
+
* Confidence score, None means not yet evaluated
|
|
2977
3029
|
*/
|
|
2978
|
-
confidence?: number;
|
|
3030
|
+
confidence?: number | null;
|
|
2979
3031
|
/**
|
|
2980
3032
|
* Retrieval Count
|
|
2981
3033
|
* Retrieval count
|
|
@@ -3027,6 +3079,36 @@ export interface IMemoryConsolidateResponse {
|
|
|
3027
3079
|
*/
|
|
3028
3080
|
consolidated_count: number;
|
|
3029
3081
|
}
|
|
3082
|
+
/**
|
|
3083
|
+
* MemoryForgetResult
|
|
3084
|
+
* Memory forgetting result DTO
|
|
3085
|
+
*/
|
|
3086
|
+
export interface IMemoryForgetResult {
|
|
3087
|
+
/**
|
|
3088
|
+
* Total Scanned
|
|
3089
|
+
* Memories scanned (expiring or uninitialized)
|
|
3090
|
+
* @default 0
|
|
3091
|
+
*/
|
|
3092
|
+
total_scanned?: number;
|
|
3093
|
+
/**
|
|
3094
|
+
* Forgotten Count
|
|
3095
|
+
* Memories deleted by low retention score
|
|
3096
|
+
* @default 0
|
|
3097
|
+
*/
|
|
3098
|
+
forgotten_count?: number;
|
|
3099
|
+
/**
|
|
3100
|
+
* Renewed Count
|
|
3101
|
+
* Memories renewed with extended expires_at
|
|
3102
|
+
* @default 0
|
|
3103
|
+
*/
|
|
3104
|
+
renewed_count?: number;
|
|
3105
|
+
/**
|
|
3106
|
+
* Total Deleted
|
|
3107
|
+
* Total memories deleted
|
|
3108
|
+
* @default 0
|
|
3109
|
+
*/
|
|
3110
|
+
total_deleted?: number;
|
|
3111
|
+
}
|
|
3030
3112
|
/**
|
|
3031
3113
|
* MemoryRecord
|
|
3032
3114
|
* Retrieved memory record
|
|
@@ -3044,8 +3126,6 @@ export interface IMemoryRecord {
|
|
|
3044
3126
|
* Memory content
|
|
3045
3127
|
*/
|
|
3046
3128
|
content: string;
|
|
3047
|
-
/** Memory type */
|
|
3048
|
-
memory_type: IMemoryTypeEnum;
|
|
3049
3129
|
/**
|
|
3050
3130
|
* Similarity
|
|
3051
3131
|
* Semantic similarity with query (0-1)
|
|
@@ -3067,10 +3147,9 @@ export interface IMemoryRecord {
|
|
|
3067
3147
|
tags?: string[];
|
|
3068
3148
|
/**
|
|
3069
3149
|
* Confidence
|
|
3070
|
-
* Confidence
|
|
3071
|
-
* @default 1
|
|
3150
|
+
* Confidence, None means not yet evaluated
|
|
3072
3151
|
*/
|
|
3073
|
-
confidence?: number;
|
|
3152
|
+
confidence?: number | null;
|
|
3074
3153
|
/**
|
|
3075
3154
|
* Retrieval Count
|
|
3076
3155
|
* Historical retrieval count
|
|
@@ -3099,11 +3178,6 @@ export interface IMemoryRetrievalConfig {
|
|
|
3099
3178
|
* Cortex regions to search. None means search all regions.
|
|
3100
3179
|
*/
|
|
3101
3180
|
cortex_regions?: IMemoryCortexEnum[] | null;
|
|
3102
|
-
/**
|
|
3103
|
-
* Memory Types
|
|
3104
|
-
* Specify memory types, None means retrieve all types
|
|
3105
|
-
*/
|
|
3106
|
-
memory_types?: IMemoryTypeEnum[] | null;
|
|
3107
3181
|
/**
|
|
3108
3182
|
* Include Working Memory
|
|
3109
3183
|
* Whether to include working memory from hippocampus
|
|
@@ -3143,6 +3217,11 @@ export interface IMemoryRetrievalConfig {
|
|
|
3143
3217
|
* @default "jina_v3"
|
|
3144
3218
|
*/
|
|
3145
3219
|
embedding_model_name?: string | null;
|
|
3220
|
+
/**
|
|
3221
|
+
* Session Id
|
|
3222
|
+
* Current session ID, working memories from this session will be excluded
|
|
3223
|
+
*/
|
|
3224
|
+
session_id?: string | null;
|
|
3146
3225
|
[key: string]: any;
|
|
3147
3226
|
}
|
|
3148
3227
|
/**
|
|
@@ -3171,18 +3250,6 @@ export interface IMemoryRetrievalResponse {
|
|
|
3171
3250
|
* @default []
|
|
3172
3251
|
*/
|
|
3173
3252
|
memories?: IMemoryRecord[];
|
|
3174
|
-
/**
|
|
3175
|
-
* Working Memory Count
|
|
3176
|
-
* Count from working memory
|
|
3177
|
-
* @default 0
|
|
3178
|
-
*/
|
|
3179
|
-
working_memory_count?: number;
|
|
3180
|
-
/**
|
|
3181
|
-
* Long Term Memory Count
|
|
3182
|
-
* Count from long-term memory
|
|
3183
|
-
* @default 0
|
|
3184
|
-
*/
|
|
3185
|
-
long_term_memory_count?: number;
|
|
3186
3253
|
/**
|
|
3187
3254
|
* Total Count
|
|
3188
3255
|
* Total retrieval count
|
|
@@ -3231,6 +3298,20 @@ export interface IMemorySplitConfig {
|
|
|
3231
3298
|
*/
|
|
3232
3299
|
type?: "memory";
|
|
3233
3300
|
}
|
|
3301
|
+
/**
|
|
3302
|
+
* MetadataUpdate
|
|
3303
|
+
* 仅更新 metadata 的请求体。
|
|
3304
|
+
*
|
|
3305
|
+
* metadata_updates 中的 key 会按 dict.update 语义合并进既有 metadata(同名 key 整体替换、
|
|
3306
|
+
* 未提供的 key 保持不变)。不触发 source 解析 / file_sha 重算 / 重新切分,
|
|
3307
|
+
* 也不做 split_config × knowledge_type 兼容校验,适用于 AI 标注、关联(_xiaohu_links)等场景。
|
|
3308
|
+
*/
|
|
3309
|
+
export interface IMetadataUpdate {
|
|
3310
|
+
/** Knowledge Id */
|
|
3311
|
+
knowledge_id: string;
|
|
3312
|
+
/** Metadata Updates */
|
|
3313
|
+
metadata_updates?: Record<string, any>;
|
|
3314
|
+
}
|
|
3234
3315
|
/**
|
|
3235
3316
|
* MoveKnowledgeRequest
|
|
3236
3317
|
* 移动知识请求
|
|
@@ -4276,6 +4357,14 @@ export interface IResponseModelAdminRebuildKnowledgeIndexResponse {
|
|
|
4276
4357
|
/** Message */
|
|
4277
4358
|
message?: string | null;
|
|
4278
4359
|
}
|
|
4360
|
+
/** ResponseModel[AdminRunSchedulerNowResponse] */
|
|
4361
|
+
export interface IResponseModelAdminRunSchedulerNowResponse {
|
|
4362
|
+
/** Success */
|
|
4363
|
+
success: boolean;
|
|
4364
|
+
data?: IAdminRunSchedulerNowResponse | null;
|
|
4365
|
+
/** Message */
|
|
4366
|
+
message?: string | null;
|
|
4367
|
+
}
|
|
4279
4368
|
/** ResponseModel[AdminSyncSummaryToStorageResponse] */
|
|
4280
4369
|
export interface IResponseModelAdminSyncSummaryToStorageResponse {
|
|
4281
4370
|
/** Success */
|
|
@@ -4565,6 +4654,14 @@ export interface IResponseModelMemoryConsolidateResponse {
|
|
|
4565
4654
|
/** Message */
|
|
4566
4655
|
message?: string | null;
|
|
4567
4656
|
}
|
|
4657
|
+
/** ResponseModel[MemoryForgetResult] */
|
|
4658
|
+
export interface IResponseModelMemoryForgetResult {
|
|
4659
|
+
/** Success */
|
|
4660
|
+
success: boolean;
|
|
4661
|
+
data?: IMemoryForgetResult | null;
|
|
4662
|
+
/** Message */
|
|
4663
|
+
message?: string | null;
|
|
4664
|
+
}
|
|
4568
4665
|
/** ResponseModel[MemoryRetrievalResponse] */
|
|
4569
4666
|
export interface IResponseModelMemoryRetrievalResponse {
|
|
4570
4667
|
/** Success */
|
|
@@ -5696,13 +5793,13 @@ export interface ITaggingCreate {
|
|
|
5696
5793
|
*/
|
|
5697
5794
|
tag_name: string;
|
|
5698
5795
|
/**
|
|
5699
|
-
*
|
|
5796
|
+
* 对象类型:space 或 knowledge
|
|
5700
5797
|
* @default "space"
|
|
5701
5798
|
*/
|
|
5702
5799
|
object_type?: ITagObjectType;
|
|
5703
5800
|
/**
|
|
5704
5801
|
* Object Id
|
|
5705
|
-
* 被打标签对象ID
|
|
5802
|
+
* 被打标签对象ID(space_id 或 knowledge_id)
|
|
5706
5803
|
* @maxLength 255
|
|
5707
5804
|
*/
|
|
5708
5805
|
object_id: string;
|
|
@@ -6425,8 +6522,8 @@ export interface IWohuSpaceMemberGrant {
|
|
|
6425
6522
|
* WorkingMemoryCreate
|
|
6426
6523
|
* Create working memory request DTO
|
|
6427
6524
|
*
|
|
6428
|
-
* Working memory is always written to hippocampus
|
|
6429
|
-
*
|
|
6525
|
+
* Working memory is always written to hippocampus.
|
|
6526
|
+
* Callers cannot override this invariant.
|
|
6430
6527
|
*/
|
|
6431
6528
|
export interface IWorkingMemoryCreate {
|
|
6432
6529
|
/**
|
|
@@ -6771,6 +6868,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6771
6868
|
* @request POST:/api/knowledge/update/filter_fields
|
|
6772
6869
|
*/
|
|
6773
6870
|
updateKnowledgeFilterFields: (data: IFilterFieldsUpdate, params?: RequestParams) => Promise<HttpResponse<IResponseModelKnowledge, void | IHTTPValidationError>>;
|
|
6871
|
+
/**
|
|
6872
|
+
* @description 仅更新知识的 metadata 字段 将 body.metadata_updates 按 dict.update 语义合并进既有 metadata(同名 key 整体替换、 未提供的 key 保持不变)。与全量 /update 不同:不触发 source 解析 / file_sha 重算 / 重新切分,也不做 split_config × knowledge_type 兼容校验,避免「仅改 metadata 却被历史 不兼容的 split_config(如 html + markdown)拒绝」。适用于 AI 标注、双向关联(_xiaohu_links)等场景。 Args: body.knowledge_id: 知识ID body.metadata_updates: 要合并写入的 metadata 键值 Returns: 更新后的知识对象(auth_info 字段已脱敏)
|
|
6873
|
+
*
|
|
6874
|
+
* @tags knowledge
|
|
6875
|
+
* @name UpdateKnowledgeMetadata
|
|
6876
|
+
* @summary Update Knowledge Metadata
|
|
6877
|
+
* @request POST:/api/knowledge/update/metadata
|
|
6878
|
+
*/
|
|
6879
|
+
updateKnowledgeMetadata: (data: IMetadataUpdate, params?: RequestParams) => Promise<HttpResponse<IResponseModelKnowledge, void | IHTTPValidationError>>;
|
|
6774
6880
|
/**
|
|
6775
6881
|
* @description 分页查询知识列表 支持灵活的查询条件: - eq_conditions: 等值查询条件,如 {"space_id": "xxx", "enabled": true} - advanced_filter: 高级过滤条件,支持 AND/OR 组合及多种比较操作符 - order_by/order_direction: 排序字段和方向 Args: body: 分页查询参数,包含 page、page_size 和过滤条件 Returns: 分页结果,包含 items、total、page、page_size、total_pages
|
|
6776
6882
|
*
|
|
@@ -7717,6 +7823,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7717
7823
|
* @request POST:/api/admin/scheduler/manage
|
|
7718
7824
|
*/
|
|
7719
7825
|
adminManageSchedulerByFilter: (data: IAdminManageSchedulerRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminManageSchedulerResponse, void | IHTTPValidationError>>;
|
|
7826
|
+
/**
|
|
7827
|
+
* @description 管理员强制立即执行指定 scheduler job(在当前 API 进程内同步执行)。 - 不要求 job 处于 due 状态,不影响常规调度节奏,会落一条运行历史。 - 当定时调度所在 FaaS 环境网络受限时,在此执行可绕过该限制并直接看到结果。 - 未提供 job_id 时,按筛选条件唯一定位 job(匹配到多个会报错)。
|
|
7828
|
+
*
|
|
7829
|
+
* @tags admin
|
|
7830
|
+
* @name AdminRunSchedulerNow
|
|
7831
|
+
* @summary Admin Run Scheduler Now
|
|
7832
|
+
* @request POST:/api/admin/scheduler/run-now
|
|
7833
|
+
*/
|
|
7834
|
+
adminRunSchedulerNow: (data: IAdminRunSchedulerNowRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminRunSchedulerNowResponse, void | IHTTPValidationError>>;
|
|
7720
7835
|
/**
|
|
7721
7836
|
* @description 批量为指定前缀的租户绑定记忆巩固 scheduler job。 对每个匹配的活跃租户,使用 upsert 语义创建或更新 job_type=memory_consolidation / target_type=space / target_id=mem_hippocampus 的定时任务。
|
|
7722
7837
|
*
|
|
@@ -7726,6 +7841,24 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7726
7841
|
* @request POST:/api/admin/scheduler/bind-memory-consolidation
|
|
7727
7842
|
*/
|
|
7728
7843
|
adminBindMemoryConsolidationJobs: (data: IBindMemoryConsolidationRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelBindMemoryConsolidationResponse, void | IHTTPValidationError>>;
|
|
7844
|
+
/**
|
|
7845
|
+
* @description Admin: immediately trigger memory consolidation for a specific tenant.
|
|
7846
|
+
*
|
|
7847
|
+
* @tags admin
|
|
7848
|
+
* @name AdminTriggerMemoryConsolidation
|
|
7849
|
+
* @summary Admin Trigger Memory Consolidation
|
|
7850
|
+
* @request POST:/api/admin/memory/consolidate
|
|
7851
|
+
*/
|
|
7852
|
+
adminTriggerMemoryConsolidation: (data: IAdminTenantRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelMemoryConsolidateResponse, void | IHTTPValidationError>>;
|
|
7853
|
+
/**
|
|
7854
|
+
* @description Admin: scan long-term memories and forget stale ones by retention score.
|
|
7855
|
+
*
|
|
7856
|
+
* @tags admin
|
|
7857
|
+
* @name AdminTriggerMemoryForget
|
|
7858
|
+
* @summary Admin Trigger Memory Forget
|
|
7859
|
+
* @request POST:/api/admin/memory/forget
|
|
7860
|
+
*/
|
|
7861
|
+
adminTriggerMemoryForget: (data: IAdminTenantRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelMemoryForgetResult, void | IHTTPValidationError>>;
|
|
7729
7862
|
/**
|
|
7730
7863
|
* @description 管理员接口:校验 tenant 下 chunk 与 knowledge 的存在一致性。 使用 ES 聚合(composite terms)获取 distinct knowledge_id 集合; 以 DB 校验知识是否存在;对缺失 knowledge_id 对应 chunk 做物理删除。
|
|
7731
7864
|
*
|
package/dist/api.js
CHANGED
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
return t;
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.Api = exports.HttpClient = exports.ContentType = exports.IAction = exports.ICliApplyStatus = exports.ICliChangeOp = exports.IKnowledgeSourceEnum = exports.IKnowledgeTypeEnum = exports.ILanguage = exports.IMemoryCortexEnum = exports.IMemoryInputTypeEnum = exports.IMemoryStatusEnum = exports.
|
|
25
|
+
exports.Api = exports.HttpClient = exports.ContentType = exports.IAction = exports.ICliApplyStatus = exports.ICliChangeOp = exports.IKnowledgeSourceEnum = exports.IKnowledgeTypeEnum = exports.ILanguage = exports.IMemoryCortexEnum = exports.IMemoryInputTypeEnum = exports.IMemoryStatusEnum = exports.IOperator = exports.IPublicEndpointId = exports.IResource = exports.ISchedulerCronTimezone = exports.ISchedulerIntervalType = exports.ISchedulerJobStatus = exports.ISchedulerJobType = exports.ISchedulerRunResult = exports.ISchedulerTargetType = exports.ITagObjectType = exports.ITaskStatus = exports.ITextKnowledgeContentUpdateStatusEnum = exports.IWebhookDeliveryStatus = exports.IWebhookEventType = exports.IWebhookOutboxStatus = exports.IWebhookSubscriptionStatus = exports.IWohuSpaceRole = void 0;
|
|
26
26
|
/** WohuSpaceRole */
|
|
27
27
|
var IWohuSpaceRole;
|
|
28
28
|
(function (IWohuSpaceRole) {
|
|
@@ -205,15 +205,6 @@ var IOperator;
|
|
|
205
205
|
IOperator["And"] = "and";
|
|
206
206
|
IOperator["Or"] = "or";
|
|
207
207
|
})(IOperator || (exports.IOperator = IOperator = {}));
|
|
208
|
-
/**
|
|
209
|
-
* MemoryTypeEnum
|
|
210
|
-
* Memory lifecycle type
|
|
211
|
-
*/
|
|
212
|
-
var IMemoryTypeEnum;
|
|
213
|
-
(function (IMemoryTypeEnum) {
|
|
214
|
-
IMemoryTypeEnum["MemoryWorking"] = "memory_working";
|
|
215
|
-
IMemoryTypeEnum["MemoryLongTerm"] = "memory_long_term";
|
|
216
|
-
})(IMemoryTypeEnum || (exports.IMemoryTypeEnum = IMemoryTypeEnum = {}));
|
|
217
208
|
/**
|
|
218
209
|
* MemoryStatusEnum
|
|
219
210
|
* Memory status enumeration
|
|
@@ -610,6 +601,15 @@ class Api extends HttpClient {
|
|
|
610
601
|
* @request POST:/api/knowledge/update/filter_fields
|
|
611
602
|
*/
|
|
612
603
|
updateKnowledgeFilterFields: (data, params = {}) => this.request(Object.assign({ path: `/api/knowledge/update/filter_fields`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
604
|
+
/**
|
|
605
|
+
* @description 仅更新知识的 metadata 字段 将 body.metadata_updates 按 dict.update 语义合并进既有 metadata(同名 key 整体替换、 未提供的 key 保持不变)。与全量 /update 不同:不触发 source 解析 / file_sha 重算 / 重新切分,也不做 split_config × knowledge_type 兼容校验,避免「仅改 metadata 却被历史 不兼容的 split_config(如 html + markdown)拒绝」。适用于 AI 标注、双向关联(_xiaohu_links)等场景。 Args: body.knowledge_id: 知识ID body.metadata_updates: 要合并写入的 metadata 键值 Returns: 更新后的知识对象(auth_info 字段已脱敏)
|
|
606
|
+
*
|
|
607
|
+
* @tags knowledge
|
|
608
|
+
* @name UpdateKnowledgeMetadata
|
|
609
|
+
* @summary Update Knowledge Metadata
|
|
610
|
+
* @request POST:/api/knowledge/update/metadata
|
|
611
|
+
*/
|
|
612
|
+
updateKnowledgeMetadata: (data, params = {}) => this.request(Object.assign({ path: `/api/knowledge/update/metadata`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
613
613
|
/**
|
|
614
614
|
* @description 分页查询知识列表 支持灵活的查询条件: - eq_conditions: 等值查询条件,如 {"space_id": "xxx", "enabled": true} - advanced_filter: 高级过滤条件,支持 AND/OR 组合及多种比较操作符 - order_by/order_direction: 排序字段和方向 Args: body: 分页查询参数,包含 page、page_size 和过滤条件 Returns: 分页结果,包含 items、total、page、page_size、total_pages
|
|
615
615
|
*
|
|
@@ -1487,6 +1487,15 @@ class Api extends HttpClient {
|
|
|
1487
1487
|
* @request POST:/api/admin/scheduler/manage
|
|
1488
1488
|
*/
|
|
1489
1489
|
adminManageSchedulerByFilter: (data, params = {}) => this.request(Object.assign({ path: `/api/admin/scheduler/manage`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
1490
|
+
/**
|
|
1491
|
+
* @description 管理员强制立即执行指定 scheduler job(在当前 API 进程内同步执行)。 - 不要求 job 处于 due 状态,不影响常规调度节奏,会落一条运行历史。 - 当定时调度所在 FaaS 环境网络受限时,在此执行可绕过该限制并直接看到结果。 - 未提供 job_id 时,按筛选条件唯一定位 job(匹配到多个会报错)。
|
|
1492
|
+
*
|
|
1493
|
+
* @tags admin
|
|
1494
|
+
* @name AdminRunSchedulerNow
|
|
1495
|
+
* @summary Admin Run Scheduler Now
|
|
1496
|
+
* @request POST:/api/admin/scheduler/run-now
|
|
1497
|
+
*/
|
|
1498
|
+
adminRunSchedulerNow: (data, params = {}) => this.request(Object.assign({ path: `/api/admin/scheduler/run-now`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
1490
1499
|
/**
|
|
1491
1500
|
* @description 批量为指定前缀的租户绑定记忆巩固 scheduler job。 对每个匹配的活跃租户,使用 upsert 语义创建或更新 job_type=memory_consolidation / target_type=space / target_id=mem_hippocampus 的定时任务。
|
|
1492
1501
|
*
|
|
@@ -1496,6 +1505,24 @@ class Api extends HttpClient {
|
|
|
1496
1505
|
* @request POST:/api/admin/scheduler/bind-memory-consolidation
|
|
1497
1506
|
*/
|
|
1498
1507
|
adminBindMemoryConsolidationJobs: (data, params = {}) => this.request(Object.assign({ path: `/api/admin/scheduler/bind-memory-consolidation`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
1508
|
+
/**
|
|
1509
|
+
* @description Admin: immediately trigger memory consolidation for a specific tenant.
|
|
1510
|
+
*
|
|
1511
|
+
* @tags admin
|
|
1512
|
+
* @name AdminTriggerMemoryConsolidation
|
|
1513
|
+
* @summary Admin Trigger Memory Consolidation
|
|
1514
|
+
* @request POST:/api/admin/memory/consolidate
|
|
1515
|
+
*/
|
|
1516
|
+
adminTriggerMemoryConsolidation: (data, params = {}) => this.request(Object.assign({ path: `/api/admin/memory/consolidate`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
1517
|
+
/**
|
|
1518
|
+
* @description Admin: scan long-term memories and forget stale ones by retention score.
|
|
1519
|
+
*
|
|
1520
|
+
* @tags admin
|
|
1521
|
+
* @name AdminTriggerMemoryForget
|
|
1522
|
+
* @summary Admin Trigger Memory Forget
|
|
1523
|
+
* @request POST:/api/admin/memory/forget
|
|
1524
|
+
*/
|
|
1525
|
+
adminTriggerMemoryForget: (data, params = {}) => this.request(Object.assign({ path: `/api/admin/memory/forget`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
1499
1526
|
/**
|
|
1500
1527
|
* @description 管理员接口:校验 tenant 下 chunk 与 knowledge 的存在一致性。 使用 ES 聚合(composite terms)获取 distinct knowledge_id 集合; 以 DB 校验知识是否存在;对缺失 knowledge_id 对应 chunk 做物理删除。
|
|
1501
1528
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@petercatai/whisker-client",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.202606061614",
|
|
4
4
|
"description": "Generated API client (Production)",
|
|
5
5
|
"main": "dist/api.js",
|
|
6
6
|
"types": "dist/api.d.ts",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"tag": "latest"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@types/node": "^25.
|
|
20
|
-
"axios": "^1.
|
|
21
|
-
"typescript": "^6.0.
|
|
19
|
+
"@types/node": "^25.9.2",
|
|
20
|
+
"axios": "^1.17.0",
|
|
21
|
+
"typescript": "^6.0.3"
|
|
22
22
|
}
|
|
23
23
|
}
|