@petercatai/whisker-client 5.0.0 → 5.0.202604071229

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 (3) hide show
  1. package/dist/api.d.ts +481 -197
  2. package/dist/api.js +81 -33
  3. package/package.json +4 -4
package/dist/api.d.ts CHANGED
@@ -1,3 +1,9 @@
1
+ /** WohuSpaceRole */
2
+ export declare enum IWohuSpaceRole {
3
+ SPACE_MASTER = "SPACE_MASTER",
4
+ SPACE_MEMBER = "SPACE_MEMBER",
5
+ SPACE_GUEST = "SPACE_GUEST"
6
+ }
1
7
  /**
2
8
  * WebhookSubscriptionStatus
3
9
  * Webhook订阅状态
@@ -27,6 +33,7 @@ export declare enum IWebhookEventType {
27
33
  KnowledgeCreated = "knowledge.created",
28
34
  KnowledgeUpdated = "knowledge.updated",
29
35
  KnowledgeDeleted = "knowledge.deleted",
36
+ TaskCompleted = "task.completed",
30
37
  TaskHituPackageCompleted = "task.hitu_package.completed",
31
38
  TaskHituPackageAnalyseCompleted = "task.hitu_package_analyse.completed",
32
39
  TaskComponentRepoAnalyseCompleted = "task.component_repo_analyse.completed",
@@ -92,7 +99,8 @@ export declare enum ISchedulerRunResult {
92
99
  * Supported scheduler job types.
93
100
  */
94
101
  export declare enum ISchedulerJobType {
95
- KnowledgeRefresh = "knowledge_refresh"
102
+ KnowledgeRefresh = "knowledge_refresh",
103
+ MemoryConsolidation = "memory_consolidation"
96
104
  }
97
105
  /**
98
106
  * SchedulerJobStatus
@@ -157,12 +165,11 @@ export declare enum IOperator {
157
165
  }
158
166
  /**
159
167
  * MemoryTypeEnum
160
- * Memory type enumeration
168
+ * Memory lifecycle type
161
169
  */
162
170
  export declare enum IMemoryTypeEnum {
163
171
  MemoryWorking = "memory_working",
164
- MemoryLongTerm = "memory_long_term",
165
- MemoryUser = "memory_user"
172
+ MemoryLongTerm = "memory_long_term"
166
173
  }
167
174
  /**
168
175
  * MemoryStatusEnum
@@ -172,6 +179,26 @@ export declare enum IMemoryStatusEnum {
172
179
  Activated = "activated",
173
180
  Archived = "archived"
174
181
  }
182
+ /**
183
+ * MemoryInputTypeEnum
184
+ * Memory input type
185
+ */
186
+ export declare enum IMemoryInputTypeEnum {
187
+ Direct = "direct",
188
+ Conversation = "conversation",
189
+ Consolidation = "consolidation"
190
+ }
191
+ /**
192
+ * MemoryCortexEnum
193
+ * Brain cortex region enum - maps to space_id
194
+ */
195
+ export declare enum IMemoryCortexEnum {
196
+ MemHippocampus = "mem_hippocampus",
197
+ MemSemantic = "mem_semantic",
198
+ MemEpisodic = "mem_episodic",
199
+ MemPreference = "mem_preference",
200
+ MemProcedural = "mem_procedural"
201
+ }
175
202
  /**
176
203
  * Language
177
204
  * Enum of the programming languages.
@@ -186,6 +213,7 @@ export declare enum ILanguage {
186
213
  Php = "php",
187
214
  Proto = "proto",
188
215
  Python = "python",
216
+ R = "r",
189
217
  Rst = "rst",
190
218
  Ruby = "ruby",
191
219
  Rust = "rust",
@@ -256,8 +284,7 @@ export declare enum IKnowledgeTypeEnum {
256
284
  NodePackage = "node_package",
257
285
  NodePackageElement = "node_package_element",
258
286
  MemoryWorking = "memory_working",
259
- MemoryLongTerm = "memory_long_term",
260
- MemoryUser = "memory_user"
287
+ MemoryLongTerm = "memory_long_term"
261
288
  }
262
289
  /**
263
290
  * KnowledgeSourceEnum
@@ -412,6 +439,148 @@ export interface IActiveStatusUpdate {
412
439
  /** Status */
413
440
  status: boolean;
414
441
  }
442
+ /** AdminBackfillAntCodeBranchDetail */
443
+ export interface IAdminBackfillAntCodeBranchDetail {
444
+ /** Knowledge Id */
445
+ knowledge_id: string;
446
+ /** Space Id */
447
+ space_id: string;
448
+ /** Knowledge Name */
449
+ knowledge_name: string;
450
+ /** Repo Name */
451
+ repo_name?: string | null;
452
+ /** Url */
453
+ url?: string | null;
454
+ /** Resolved Branch */
455
+ resolved_branch?: string | null;
456
+ /** Status */
457
+ status: string;
458
+ /** Reason */
459
+ reason?: string | null;
460
+ }
461
+ /** AdminBackfillAntCodeBranchRequest */
462
+ export interface IAdminBackfillAntCodeBranchRequest {
463
+ /**
464
+ * Tenant Id
465
+ * 租户ID(必填)
466
+ */
467
+ tenant_id: string;
468
+ /**
469
+ * Space Id
470
+ * 空间ID(可选)
471
+ */
472
+ space_id?: string | null;
473
+ /**
474
+ * Dry Run
475
+ * 仅预览,不实际写库
476
+ * @default false
477
+ */
478
+ dry_run?: boolean;
479
+ /**
480
+ * Limit
481
+ * 最大处理数量保护
482
+ * @min 1
483
+ * @max 20000
484
+ * @default 5000
485
+ */
486
+ limit?: number;
487
+ /**
488
+ * Max Concurrency
489
+ * 并发度
490
+ * @min 1
491
+ * @max 50
492
+ * @default 10
493
+ */
494
+ max_concurrency?: number;
495
+ }
496
+ /** AdminBackfillAntCodeBranchResponse */
497
+ export interface IAdminBackfillAntCodeBranchResponse {
498
+ /** Total Scanned */
499
+ total_scanned: number;
500
+ /** Matched Branch Null */
501
+ matched_branch_null: number;
502
+ /** Updated Count */
503
+ updated_count: number;
504
+ /** Failed Count */
505
+ failed_count: number;
506
+ /** Details */
507
+ details: IAdminBackfillAntCodeBranchDetail[];
508
+ }
509
+ /** AdminCheckChunkKnowledgeConsistencyRequest */
510
+ export interface IAdminCheckChunkKnowledgeConsistencyRequest {
511
+ /**
512
+ * Tenant Id
513
+ * 需要检查的一租户 ID
514
+ */
515
+ tenant_id: string;
516
+ /**
517
+ * Space Id
518
+ * 可选:限制检查范围到指定 space_id;不传表示扫描全部 space。
519
+ */
520
+ space_id?: string | null;
521
+ /**
522
+ * Dry Run
523
+ * 如果为 true,仅校验,不执行物理删除
524
+ * @default false
525
+ */
526
+ dry_run?: boolean;
527
+ /**
528
+ * Index Names
529
+ * 指定需要扫描/删除的 chunk 索引列表(显式传入以避免遗漏)。
530
+ * @minItems 1
531
+ */
532
+ index_names: string[];
533
+ /**
534
+ * Max Missing Preview
535
+ * 返回的缺失 knowledge_id 预览数量上限
536
+ * @min 1
537
+ * @max 500
538
+ * @default 50
539
+ */
540
+ max_missing_preview?: number;
541
+ }
542
+ /** AdminCheckChunkKnowledgeConsistencyResponse */
543
+ export interface IAdminCheckChunkKnowledgeConsistencyResponse {
544
+ /** Tenant Id */
545
+ tenant_id: string;
546
+ /** Scanned Index Names */
547
+ scanned_index_names: string[];
548
+ /** Scanned Knowledge Id Count */
549
+ scanned_knowledge_id_count: number;
550
+ /** Existing Knowledge Id Count */
551
+ existing_knowledge_id_count: number;
552
+ /** Missing Knowledge Id Count */
553
+ missing_knowledge_id_count: number;
554
+ /** Missing Knowledge Id Preview */
555
+ missing_knowledge_id_preview: string[];
556
+ /** Deleted Missing Knowledge Id Count */
557
+ deleted_missing_knowledge_id_count: number;
558
+ }
559
+ /** AdminDeleteWohuProductSpaceRequest */
560
+ export interface IAdminDeleteWohuProductSpaceRequest {
561
+ /**
562
+ * Space Id
563
+ * wohu product 的 space_id(不是 whisker space_id)
564
+ */
565
+ space_id: string;
566
+ /**
567
+ * Dry Run
568
+ * 仅预览,不实际删除
569
+ * @default false
570
+ */
571
+ dry_run?: boolean;
572
+ }
573
+ /** AdminDeleteWohuProductSpaceResponse */
574
+ export interface IAdminDeleteWohuProductSpaceResponse {
575
+ /** Space Id */
576
+ space_id: string;
577
+ /** Dry Run */
578
+ dry_run: boolean;
579
+ /** Deleted Space */
580
+ deleted_space: number;
581
+ /** Deleted Space User Role */
582
+ deleted_space_user_role: number;
583
+ }
415
584
  /**
416
585
  * AdminManageSchedulerRequest
417
586
  * 管理员按条件管理 scheduler 请求
@@ -924,61 +1093,60 @@ export interface IBatchQueryRequest {
924
1093
  }
925
1094
  /**
926
1095
  * Blob
927
- * Blob represents raw data by either reference or value.
928
- *
929
- * Provides an interface to materialize the blob in different representations, and
930
- * help to decouple the development of data loaders from the downstream parsing of
931
- * the raw data.
932
- *
933
- * Inspired by: https://developer.mozilla.org/en-US/docs/Web/API/Blob
1096
+ * Raw data abstraction for document loading and file processing.
934
1097
  *
935
- * Example: Initialize a blob from in-memory data
1098
+ * Represents raw bytes or text, either in-memory or by file reference. Used
1099
+ * primarily by document loaders to decouple data loading from parsing.
936
1100
  *
937
- * .. code-block:: python
1101
+ * Inspired by [Mozilla's `Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
938
1102
  *
939
- * from langchain_core.documents import Blob
1103
+ * ???+ example "Initialize a blob from in-memory data"
940
1104
  *
941
- * blob = Blob.from_data("Hello, world!")
1105
+ * ```python
1106
+ * from langchain_core.documents import Blob
942
1107
  *
943
- * # Read the blob as a string
944
- * print(blob.as_string())
1108
+ * blob = Blob.from_data("Hello, world!")
945
1109
  *
946
- * # Read the blob as bytes
947
- * print(blob.as_bytes())
1110
+ * # Read the blob as a string
1111
+ * print(blob.as_string())
948
1112
  *
949
- * # Read the blob as a byte stream
950
- * with blob.as_bytes_io() as f:
951
- * print(f.read())
1113
+ * # Read the blob as bytes
1114
+ * print(blob.as_bytes())
952
1115
  *
953
- * Example: Load from memory and specify mime-type and metadata
1116
+ * # Read the blob as a byte stream
1117
+ * with blob.as_bytes_io() as f:
1118
+ * print(f.read())
1119
+ * ```
954
1120
  *
955
- * .. code-block:: python
1121
+ * ??? example "Load from memory and specify MIME type and metadata"
956
1122
  *
957
- * from langchain_core.documents import Blob
1123
+ * ```python
1124
+ * from langchain_core.documents import Blob
958
1125
  *
959
- * blob = Blob.from_data(
960
- * data="Hello, world!",
961
- * mime_type="text/plain",
962
- * metadata={"source": "https://example.com"},
963
- * )
1126
+ * blob = Blob.from_data(
1127
+ * data="Hello, world!",
1128
+ * mime_type="text/plain",
1129
+ * metadata={"source": "https://example.com"},
1130
+ * )
1131
+ * ```
964
1132
  *
965
- * Example: Load the blob from a file
1133
+ * ??? example "Load the blob from a file"
966
1134
  *
967
- * .. code-block:: python
1135
+ * ```python
1136
+ * from langchain_core.documents import Blob
968
1137
  *
969
- * from langchain_core.documents import Blob
1138
+ * blob = Blob.from_path("path/to/file.txt")
970
1139
  *
971
- * blob = Blob.from_path("path/to/file.txt")
1140
+ * # Read the blob as a string
1141
+ * print(blob.as_string())
972
1142
  *
973
- * # Read the blob as a string
974
- * print(blob.as_string())
1143
+ * # Read the blob as bytes
1144
+ * print(blob.as_bytes())
975
1145
  *
976
- * # Read the blob as bytes
977
- * print(blob.as_bytes())
978
- *
979
- * # Read the blob as a byte stream
980
- * with blob.as_bytes_io() as f:
981
- * print(f.read())
1146
+ * # Read the blob as a byte stream
1147
+ * with blob.as_bytes_io() as f:
1148
+ * print(f.read())
1149
+ * ```
982
1150
  */
983
1151
  export interface IBlob {
984
1152
  /** Id */
@@ -2073,6 +2241,16 @@ export interface IKnowledgeInput {
2073
2241
  * @default true
2074
2242
  */
2075
2243
  enabled?: boolean;
2244
+ /**
2245
+ * Expires At
2246
+ * expiration time
2247
+ */
2248
+ expires_at?: string | null;
2249
+ /**
2250
+ * Last Accessed At
2251
+ * last access time
2252
+ */
2253
+ last_accessed_at?: string | null;
2076
2254
  }
2077
2255
  /** Knowledge */
2078
2256
  export interface IKnowledgeOutput {
@@ -2158,6 +2336,16 @@ export interface IKnowledgeOutput {
2158
2336
  * @default true
2159
2337
  */
2160
2338
  enabled?: boolean;
2339
+ /**
2340
+ * Expires At
2341
+ * expiration time
2342
+ */
2343
+ expires_at?: string | null;
2344
+ /**
2345
+ * Last Accessed At
2346
+ * last access time
2347
+ */
2348
+ last_accessed_at?: string | null;
2161
2349
  }
2162
2350
  /**
2163
2351
  * KnowledgeBatchRefreshRequest
@@ -2410,6 +2598,16 @@ export interface IKnowledgeResponse {
2410
2598
  * @default true
2411
2599
  */
2412
2600
  enabled?: boolean;
2601
+ /**
2602
+ * Expires At
2603
+ * expiration time
2604
+ */
2605
+ expires_at?: string | null;
2606
+ /**
2607
+ * Last Accessed At
2608
+ * last access time
2609
+ */
2610
+ last_accessed_at?: string | null;
2413
2611
  /**
2414
2612
  * Scheduler Jobs
2415
2613
  * scheduler jobs bound to this knowledge
@@ -2432,6 +2630,54 @@ export interface ILLMTxtSourceRequest {
2432
2630
  /** Page Size */
2433
2631
  page_size?: number | null;
2434
2632
  }
2633
+ /**
2634
+ * LongTermMemoryCreate
2635
+ * Create long-term memory request DTO
2636
+ */
2637
+ export interface ILongTermMemoryCreate {
2638
+ /**
2639
+ * Content
2640
+ * Memory content, supports plain text
2641
+ * @minLength 1
2642
+ * @maxLength 10000
2643
+ */
2644
+ content: string;
2645
+ /** Memory source information (agent, session, input type) */
2646
+ from_source?: IMemorySource | null;
2647
+ /**
2648
+ * Tags
2649
+ * Memory tags for filtering retrieval
2650
+ * @maxItems 10
2651
+ * @default []
2652
+ */
2653
+ tags?: string[];
2654
+ /**
2655
+ * Confidence
2656
+ * Memory confidence (0-1) for dedup and merge decisions
2657
+ * @min 0
2658
+ * @max 1
2659
+ * @default 1
2660
+ */
2661
+ confidence?: number;
2662
+ /**
2663
+ * Expires At
2664
+ * Expiration time (UTC), None means never expires
2665
+ */
2666
+ expires_at?: string | null;
2667
+ /**
2668
+ * Metadata
2669
+ * Additional metadata following MemoryKnowledgeMetadata constraints
2670
+ * @default {}
2671
+ */
2672
+ metadata?: Record<string, any>;
2673
+ /**
2674
+ * Embedding Model Name
2675
+ * Embedding model name, uses Space default if empty
2676
+ */
2677
+ embedding_model_name?: string | null;
2678
+ /** Target cortex region for long-term memory storage */
2679
+ cortex_region: IMemoryCortexEnum;
2680
+ }
2435
2681
  /** MarkdownCreate */
2436
2682
  export interface IMarkdownCreate {
2437
2683
  /**
@@ -2547,11 +2793,6 @@ export interface IMemory {
2547
2793
  * Memory unique identifier (= knowledge_id)
2548
2794
  */
2549
2795
  memory_id: string;
2550
- /**
2551
- * Agent Id
2552
- * Owning Agent ID
2553
- */
2554
- agent_id: string;
2555
2796
  /**
2556
2797
  * Tenant Id
2557
2798
  * Owning tenant ID
@@ -2562,13 +2803,17 @@ export interface IMemory {
2562
2803
  * Memory content
2563
2804
  */
2564
2805
  content: string;
2565
- /** Memory type */
2806
+ /** Memory lifecycle type */
2566
2807
  memory_type: IMemoryTypeEnum;
2808
+ /** Brain cortex region this memory resides in */
2809
+ cortex_region: IMemoryCortexEnum;
2567
2810
  /**
2568
2811
  * Memory status
2569
2812
  * @default "activated"
2570
2813
  */
2571
2814
  memory_status?: IMemoryStatusEnum;
2815
+ /** Memory source information */
2816
+ from_source?: IMemorySource;
2572
2817
  /**
2573
2818
  * Tags
2574
2819
  * Tag list
@@ -2587,16 +2832,6 @@ export interface IMemory {
2587
2832
  * @default 0
2588
2833
  */
2589
2834
  retrieval_count?: number;
2590
- /**
2591
- * Session Id
2592
- * Source session ID
2593
- */
2594
- session_id?: string | null;
2595
- /**
2596
- * Message Index
2597
- * Source message index
2598
- */
2599
- message_index?: number | null;
2600
2835
  /**
2601
2836
  * Expires At
2602
2837
  * Expiration time
@@ -2632,69 +2867,15 @@ export interface IMemory {
2632
2867
  embedding_model_name: string;
2633
2868
  }
2634
2869
  /**
2635
- * MemoryCreate
2636
- * Create memory request DTO
2870
+ * MemoryConsolidateResponse
2871
+ * Memory consolidation response DTO
2637
2872
  */
2638
- export interface IMemoryCreate {
2639
- /**
2640
- * Agent Id
2641
- * Agent unique identifier, converted to mem_{agent_id} as space_id
2642
- * @maxLength 255
2643
- */
2644
- agent_id: string;
2645
- /**
2646
- * Content
2647
- * Memory content, supports plain text
2648
- * @minLength 1
2649
- * @maxLength 10000
2650
- */
2651
- content: string;
2652
- /**
2653
- * Memory type, auto-classified based on content semantics if empty
2654
- * @default "memory_working"
2655
- */
2656
- memory_type?: IMemoryTypeEnum | null;
2657
- /**
2658
- * Session Id
2659
- * Source session ID for tracing memory origin
2660
- */
2661
- session_id?: string | null;
2662
- /**
2663
- * Message Index
2664
- * Source message index within session
2665
- */
2666
- message_index?: number | null;
2667
- /**
2668
- * Tags
2669
- * Memory tags for filtering retrieval
2670
- * @maxItems 10
2671
- * @default []
2672
- */
2673
- tags?: string[];
2674
- /**
2675
- * Confidence
2676
- * Memory confidence (0-1) for dedup and merge decisions
2677
- * @min 0
2678
- * @max 1
2679
- * @default 1
2680
- */
2681
- confidence?: number;
2682
- /**
2683
- * Expires At
2684
- * Expiration time (UTC), None means never expires
2685
- */
2686
- expires_at?: string | null;
2873
+ export interface IMemoryConsolidateResponse {
2687
2874
  /**
2688
- * Metadata
2689
- * Additional metadata following MemoryKnowledgeMetadata constraints
2690
- * @default {}
2875
+ * Consolidated Count
2876
+ * Number of memories consolidated
2691
2877
  */
2692
- metadata?: Record<string, any>;
2693
- /**
2694
- * Embedding Model Name
2695
- * Embedding model name, uses Space default if empty
2696
- */
2697
- embedding_model_name?: string | null;
2878
+ consolidated_count: number;
2698
2879
  }
2699
2880
  /**
2700
2881
  * MemoryRecord
@@ -2706,11 +2887,8 @@ export interface IMemoryRecord {
2706
2887
  * Memory ID (= knowledge_id)
2707
2888
  */
2708
2889
  memory_id: string;
2709
- /**
2710
- * Agent Id
2711
- * Owning Agent ID
2712
- */
2713
- agent_id: string;
2890
+ /** Cortex region this memory belongs to */
2891
+ cortex_region: IMemoryCortexEnum;
2714
2892
  /**
2715
2893
  * Content
2716
2894
  * Memory content
@@ -2729,6 +2907,8 @@ export interface IMemoryRecord {
2729
2907
  * @default "vector_search"
2730
2908
  */
2731
2909
  source?: string;
2910
+ /** Memory source information */
2911
+ from_source?: IMemorySource;
2732
2912
  /**
2733
2913
  * Tags
2734
2914
  * Tags
@@ -2765,10 +2945,10 @@ export interface IMemoryRetrievalConfig {
2765
2945
  */
2766
2946
  type?: "memory";
2767
2947
  /**
2768
- * Agent Id
2769
- * Target Agent ID, converted to mem_{agent_id} as space_id
2948
+ * Cortex Regions
2949
+ * Cortex regions to search. None means search all regions.
2770
2950
  */
2771
- agent_id: string;
2951
+ cortex_regions?: IMemoryCortexEnum[] | null;
2772
2952
  /**
2773
2953
  * Memory Types
2774
2954
  * Specify memory types, None means retrieve all types
@@ -2776,7 +2956,7 @@ export interface IMemoryRetrievalConfig {
2776
2956
  memory_types?: IMemoryTypeEnum[] | null;
2777
2957
  /**
2778
2958
  * Include Working Memory
2779
- * Whether to include working memory
2959
+ * Whether to include working memory from hippocampus
2780
2960
  * @default true
2781
2961
  */
2782
2962
  include_working_memory?: boolean;
@@ -2803,7 +2983,7 @@ export interface IMemoryRetrievalConfig {
2803
2983
  tags?: string[] | null;
2804
2984
  /**
2805
2985
  * Skip Rerank
2806
- * Whether to enable rerank reordering
2986
+ * Whether to skip rerank reordering
2807
2987
  * @default false
2808
2988
  */
2809
2989
  skip_rerank?: boolean;
@@ -2870,36 +3050,36 @@ export interface IMemoryRetrievalResponse {
2870
3050
  latency_ms: number;
2871
3051
  }
2872
3052
  /**
2873
- * MemorySplitConfig
2874
- * Memory split configuration
3053
+ * MemorySource
3054
+ * Memory source information - tracks where the memory originated
2875
3055
  */
2876
- export interface IMemorySplitConfig {
3056
+ export interface IMemorySource {
2877
3057
  /**
2878
- * Type
2879
- * @default "memory"
3058
+ * Agent Id
3059
+ * Agent that contributed this memory
2880
3060
  */
2881
- type?: "memory";
2882
- }
2883
- /**
2884
- * MemoryUpdate
2885
- * Update memory request DTO
2886
- */
2887
- export interface IMemoryUpdate {
3061
+ agent_id?: string | null;
2888
3062
  /**
2889
- * Content
2890
- * Update content
3063
+ * Session Id
3064
+ * Source session ID for tracing
2891
3065
  */
2892
- content?: string | null;
3066
+ session_id?: string | null;
2893
3067
  /**
2894
- * Expires At
2895
- * Update expiration time
3068
+ * How this memory was created
3069
+ * @default "direct"
2896
3070
  */
2897
- expires_at?: string | null;
3071
+ input_type?: IMemoryInputTypeEnum;
3072
+ }
3073
+ /**
3074
+ * MemorySplitConfig
3075
+ * Memory split configuration
3076
+ */
3077
+ export interface IMemorySplitConfig {
2898
3078
  /**
2899
- * Metadata
2900
- * Update metadata
3079
+ * Type
3080
+ * @default "memory"
2901
3081
  */
2902
- metadata?: Record<string, any> | null;
3082
+ type?: "memory";
2903
3083
  }
2904
3084
  /**
2905
3085
  * MoveKnowledgeRequest
@@ -3906,6 +4086,30 @@ export interface IResponseModelAPIKey {
3906
4086
  /** Message */
3907
4087
  message?: string | null;
3908
4088
  }
4089
+ /** ResponseModel[AdminBackfillAntCodeBranchResponse] */
4090
+ export interface IResponseModelAdminBackfillAntCodeBranchResponse {
4091
+ /** Success */
4092
+ success: boolean;
4093
+ data?: IAdminBackfillAntCodeBranchResponse | null;
4094
+ /** Message */
4095
+ message?: string | null;
4096
+ }
4097
+ /** ResponseModel[AdminCheckChunkKnowledgeConsistencyResponse] */
4098
+ export interface IResponseModelAdminCheckChunkKnowledgeConsistencyResponse {
4099
+ /** Success */
4100
+ success: boolean;
4101
+ data?: IAdminCheckChunkKnowledgeConsistencyResponse | null;
4102
+ /** Message */
4103
+ message?: string | null;
4104
+ }
4105
+ /** ResponseModel[AdminDeleteWohuProductSpaceResponse] */
4106
+ export interface IResponseModelAdminDeleteWohuProductSpaceResponse {
4107
+ /** Success */
4108
+ success: boolean;
4109
+ data?: IAdminDeleteWohuProductSpaceResponse | null;
4110
+ /** Message */
4111
+ message?: string | null;
4112
+ }
3909
4113
  /** ResponseModel[AdminManageSchedulerResponse] */
3910
4114
  export interface IResponseModelAdminManageSchedulerResponse {
3911
4115
  /** Success */
@@ -4114,15 +4318,6 @@ export interface IResponseModelListKnowledge {
4114
4318
  /** Message */
4115
4319
  message?: string | null;
4116
4320
  }
4117
- /** ResponseModel[List[Memory]] */
4118
- export interface IResponseModelListMemory {
4119
- /** Success */
4120
- success: boolean;
4121
- /** Data */
4122
- data?: IMemory[] | null;
4123
- /** Message */
4124
- message?: string | null;
4125
- }
4126
4321
  /** ResponseModel[List[PublicReadEndpointIdItem]] */
4127
4322
  export interface IResponseModelListPublicReadEndpointIdItem {
4128
4323
  /** Success */
@@ -4204,6 +4399,14 @@ export interface IResponseModelListWohuProductSpace {
4204
4399
  /** Message */
4205
4400
  message?: string | null;
4206
4401
  }
4402
+ /** ResponseModel[MemoryConsolidateResponse] */
4403
+ export interface IResponseModelMemoryConsolidateResponse {
4404
+ /** Success */
4405
+ success: boolean;
4406
+ data?: IMemoryConsolidateResponse | null;
4407
+ /** Message */
4408
+ message?: string | null;
4409
+ }
4207
4410
  /** ResponseModel[MemoryRetrievalResponse] */
4208
4411
  export interface IResponseModelMemoryRetrievalResponse {
4209
4412
  /** Success */
@@ -5547,6 +5750,11 @@ export interface ITenantCreateBindWohu {
5547
5750
  * 产品空间头像 URL,可选
5548
5751
  */
5549
5752
  spaceAvatar?: string | null;
5753
+ /**
5754
+ * Membergrants
5755
+ * 额外成员角色列表(可选,避免重复工号)
5756
+ */
5757
+ memberGrants?: IWohuSpaceMemberGrant[];
5550
5758
  }
5551
5759
  /** TenantLog */
5552
5760
  export interface ITenantLog {
@@ -6038,6 +6246,72 @@ export interface IWohuProductSpace {
6038
6246
  */
6039
6247
  visit_url: string;
6040
6248
  }
6249
+ /**
6250
+ * WohuSpaceMemberGrant
6251
+ * 绑定卧虎产品空间后,为其他成员补建角色。
6252
+ *
6253
+ * - role: 角色枚举(SPACE_MASTER / SPACE_MEMBER / SPACE_GUEST)
6254
+ * - outUserId: 成员工号
6255
+ */
6256
+ export interface IWohuSpaceMemberGrant {
6257
+ /** 角色枚举(SPACE_MASTER / SPACE_MEMBER / SPACE_GUEST) */
6258
+ role: IWohuSpaceRole;
6259
+ /**
6260
+ * Outuserid
6261
+ * 成员工号
6262
+ * @minLength 1
6263
+ */
6264
+ outUserId: string;
6265
+ }
6266
+ /**
6267
+ * WorkingMemoryCreate
6268
+ * Create working memory request DTO
6269
+ *
6270
+ * Working memory is always written to hippocampus and always uses
6271
+ * `memory_working`. Callers cannot override those invariants.
6272
+ */
6273
+ export interface IWorkingMemoryCreate {
6274
+ /**
6275
+ * Content
6276
+ * Memory content, supports plain text
6277
+ * @minLength 1
6278
+ * @maxLength 10000
6279
+ */
6280
+ content: string;
6281
+ /** Memory source information (agent, session, input type) */
6282
+ from_source?: IMemorySource | null;
6283
+ /**
6284
+ * Tags
6285
+ * Memory tags for filtering retrieval
6286
+ * @maxItems 10
6287
+ * @default []
6288
+ */
6289
+ tags?: string[];
6290
+ /**
6291
+ * Confidence
6292
+ * Memory confidence (0-1) for dedup and merge decisions
6293
+ * @min 0
6294
+ * @max 1
6295
+ * @default 1
6296
+ */
6297
+ confidence?: number;
6298
+ /**
6299
+ * Expires At
6300
+ * Expiration time (UTC), None means never expires
6301
+ */
6302
+ expires_at?: string | null;
6303
+ /**
6304
+ * Metadata
6305
+ * Additional metadata following MemoryKnowledgeMetadata constraints
6306
+ * @default {}
6307
+ */
6308
+ metadata?: Record<string, any>;
6309
+ /**
6310
+ * Embedding Model Name
6311
+ * Embedding model name, uses Space default if empty
6312
+ */
6313
+ embedding_model_name?: string | null;
6314
+ }
6041
6315
  /** YuqueCreate */
6042
6316
  export interface IYuqueCreate {
6043
6317
  /**
@@ -7289,6 +7563,33 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7289
7563
  * @request POST:/api/admin/scheduler/manage
7290
7564
  */
7291
7565
  adminManageSchedulerByFilter: (data: IAdminManageSchedulerRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminManageSchedulerResponse, void | IHTTPValidationError>>;
7566
+ /**
7567
+ * @description 管理员接口:校验 tenant 下 chunk 与 knowledge 的存在一致性。 使用 ES 聚合(composite terms)获取 distinct knowledge_id 集合; 以 DB 校验知识是否存在;对缺失 knowledge_id 对应 chunk 做物理删除。
7568
+ *
7569
+ * @tags admin
7570
+ * @name AdminCheckChunkKnowledgeConsistency
7571
+ * @summary Admin Check Chunk Knowledge Consistency
7572
+ * @request POST:/api/admin/chunk/knowledge-consistency/check
7573
+ */
7574
+ adminCheckChunkKnowledgeConsistency: (data: IAdminCheckChunkKnowledgeConsistencyRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminCheckChunkKnowledgeConsistencyResponse, void | IHTTPValidationError>>;
7575
+ /**
7576
+ * @description 管理员接口:回填 AntCode 仓库知识的 source_config.branch(写入数据库)。 仅处理: - source_type = github_repo - source_config.url 包含 code.alipay.com - source_config.branch 为空 回填策略: - 优先调用 AntCode v3 project API 获取 default_branch - 失败/无 token 兜底写入 master(保证 webhook 严格匹配可用)
7577
+ *
7578
+ * @tags admin
7579
+ * @name AdminBackfillAntcodeKnowledgeBranch
7580
+ * @summary Admin Backfill Antcode Knowledge Branch
7581
+ * @request POST:/api/admin/knowledge-source/antcode/branch/backfill
7582
+ */
7583
+ adminBackfillAntcodeKnowledgeBranch: (data: IAdminBackfillAntCodeBranchRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminBackfillAntCodeBranchResponse, void | IHTTPValidationError>>;
7584
+ /**
7585
+ * @description 管理员接口:删除卧虎产品空间(space + space_user_role)。
7586
+ *
7587
+ * @tags admin
7588
+ * @name AdminDeleteWohuProductSpace
7589
+ * @summary Admin Delete Wohu Product Space
7590
+ * @request POST:/api/admin/wohu/product-space/delete
7591
+ */
7592
+ adminDeleteWohuProductSpace: (data: IAdminDeleteWohuProductSpaceRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminDeleteWohuProductSpaceResponse, void | IHTTPValidationError>>;
7292
7593
  };
7293
7594
  llmTxt: {
7294
7595
  /**
@@ -7312,34 +7613,34 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7312
7613
  };
7313
7614
  memory: {
7314
7615
  /**
7315
- * @description Add a new memory Creates a new memory entry for the specified agent. Memory type is automatically classified if not specified. Working memories are subject to FIFO eviction when exceeding the limit. Args: body: MemoryCreate request with content and optional configuration Returns: Created memory object
7616
+ * @description Add a new working memory to hippocampus.
7316
7617
  *
7317
7618
  * @tags memory
7318
- * @name AddMemory
7319
- * @summary Add Memory
7320
- * @request POST:/api/memory/add
7619
+ * @name AddWorkingMemory
7620
+ * @summary Add Working Memory
7621
+ * @request POST:/api/memory/working
7321
7622
  */
7322
- addMemory: (data: IMemoryCreate, params?: RequestParams) => Promise<HttpResponse<IResponseModelMemory, void | IHTTPValidationError>>;
7623
+ addWorkingMemory: (data: IWorkingMemoryCreate, params?: RequestParams) => Promise<HttpResponse<IResponseModelMemory, void | IHTTPValidationError>>;
7323
7624
  /**
7324
- * @description Get a memory by ID Retrieves a single memory entry by its unique identifier. Args: memory_id: Unique identifier of the memory Returns: Memory object if found, None otherwise
7625
+ * @description Add a new long-term memory to a specific cortex region.
7325
7626
  *
7326
7627
  * @tags memory
7327
- * @name GetMemoryById
7328
- * @summary Get Memory By Id
7329
- * @request GET:/api/memory/{memory_id}
7628
+ * @name AddLongTermMemory
7629
+ * @summary Add Long Term Memory
7630
+ * @request POST:/api/memory/long-term
7330
7631
  */
7331
- getMemoryById: (memoryId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelUnionMemoryNoneType, void | IHTTPValidationError>>;
7632
+ addLongTermMemory: (data: ILongTermMemoryCreate, params?: RequestParams) => Promise<HttpResponse<IResponseModelMemory, void | IHTTPValidationError>>;
7332
7633
  /**
7333
- * @description Update a memory Updates an existing memory entry. Only provided fields will be updated. Args: memory_id: Unique identifier of the memory to update body: MemoryUpdate request with fields to update Returns: Updated memory object if found
7634
+ * @description Get a memory by ID.
7334
7635
  *
7335
7636
  * @tags memory
7336
- * @name UpdateMemory
7337
- * @summary Update Memory
7338
- * @request PUT:/api/memory/{memory_id}
7637
+ * @name GetMemoryById
7638
+ * @summary Get Memory By Id
7639
+ * @request GET:/api/memory/{memory_id}
7339
7640
  */
7340
- updateMemory: (memoryId: string, data: IMemoryUpdate, params?: RequestParams) => Promise<HttpResponse<IResponseModelUnionMemoryNoneType, void | IHTTPValidationError>>;
7641
+ getMemoryById: (memoryId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelUnionMemoryNoneType, void | IHTTPValidationError>>;
7341
7642
  /**
7342
- * @description Delete a memory Permanently deletes a memory entry and its associated chunks. Args: memory_id: Unique identifier of the memory to delete Returns: True if deleted successfully, False if not found
7643
+ * @description Delete a memory.
7343
7644
  *
7344
7645
  * @tags memory
7345
7646
  * @name DeleteMemory
@@ -7348,7 +7649,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7348
7649
  */
7349
7650
  deleteMemory: (memoryId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelBool, void | IHTTPValidationError>>;
7350
7651
  /**
7351
- * @description Retrieve memories using semantic search Performs semantic search to retrieve relevant memories based on the query. Combines working memory (from database) and long-term memory (via vector search). Process: 1. Get working memories from database (if enabled) 2. Vector search for long-term memories 3. Deduplicate and merge results 4. Optional rerank 5. Return results with similarity scores Args: body: MemoryRetrievalRequest with query and configuration Returns: MemoryRetrievalResponse with retrieved memories and statistics
7652
+ * @description Retrieve memories using semantic search across cortex regions. Specify cortex_regions to limit search scope.
7352
7653
  *
7353
7654
  * @tags memory
7354
7655
  * @name RetrieveMemory
@@ -7357,7 +7658,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7357
7658
  */
7358
7659
  retrieveMemory: (data: IMemoryRetrievalRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelMemoryRetrievalResponse, void | IHTTPValidationError>>;
7359
7660
  /**
7360
- * @description Archive a memory (soft delete) Marks a memory as archived without permanently deleting it. Archived memories are not included in retrieval results. Args: memory_id: Unique identifier of the memory to archive Returns: Archived memory object if found
7661
+ * @description Archive a memory (soft delete).
7361
7662
  *
7362
7663
  * @tags memory
7363
7664
  * @name ArchiveMemory
@@ -7366,31 +7667,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7366
7667
  */
7367
7668
  archiveMemory: (memoryId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelUnionMemoryNoneType, void | IHTTPValidationError>>;
7368
7669
  /**
7369
- * @description Get memories for a specific agent Retrieves all memories associated with a specific agent ID. Args: agent_id: Agent ID to filter memories memory_type: Optional filter by memory type limit: Optional limit on number of results Returns: List of memories for the agent
7370
- *
7371
- * @tags memory
7372
- * @name GetMemoriesByAgent
7373
- * @summary Get Memories By Agent
7374
- * @request GET:/api/memory/agent/{agent_id}
7375
- */
7376
- getMemoriesByAgent: (agentId: string, query?: {
7377
- /** Memory Type */
7378
- memory_type?: IMemoryTypeEnum | null;
7379
- /** Limit */
7380
- limit?: number | null;
7381
- }, params?: RequestParams) => Promise<HttpResponse<IResponseModelListMemory, void | IHTTPValidationError>>;
7382
- /**
7383
- * @description Trigger memory consolidation (Phase 2 placeholder) Reserved endpoint for Phase 2 memory consolidation feature. Currently returns a placeholder response. Args: agent_id: Optional agent ID to consolidate memories for Returns: Status message
7670
+ * @description Manually trigger memory consolidation for pending hippocampus memories.
7384
7671
  *
7385
7672
  * @tags memory
7386
7673
  * @name ConsolidateMemory
7387
7674
  * @summary Consolidate Memory
7388
7675
  * @request POST:/api/memory/consolidate
7389
7676
  */
7390
- consolidateMemory: (query?: {
7391
- /** Agent Id */
7392
- agent_id?: string | null;
7393
- }, params?: RequestParams) => Promise<HttpResponse<IResponseModelStr, void | IHTTPValidationError>>;
7677
+ consolidateMemory: (params?: RequestParams) => Promise<HttpResponse<IResponseModelMemoryConsolidateResponse, void | IHTTPValidationError>>;
7394
7678
  };
7395
7679
  scheduler: {
7396
7680
  /**
package/dist/api.js CHANGED
@@ -22,7 +22,14 @@ 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.IMemoryStatusEnum = exports.IMemoryTypeEnum = 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 = void 0;
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.IMemoryTypeEnum = 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
+ /** WohuSpaceRole */
27
+ var IWohuSpaceRole;
28
+ (function (IWohuSpaceRole) {
29
+ IWohuSpaceRole["SPACE_MASTER"] = "SPACE_MASTER";
30
+ IWohuSpaceRole["SPACE_MEMBER"] = "SPACE_MEMBER";
31
+ IWohuSpaceRole["SPACE_GUEST"] = "SPACE_GUEST";
32
+ })(IWohuSpaceRole || (exports.IWohuSpaceRole = IWohuSpaceRole = {}));
26
33
  /**
27
34
  * WebhookSubscriptionStatus
28
35
  * Webhook订阅状态
@@ -55,6 +62,7 @@ var IWebhookEventType;
55
62
  IWebhookEventType["KnowledgeCreated"] = "knowledge.created";
56
63
  IWebhookEventType["KnowledgeUpdated"] = "knowledge.updated";
57
64
  IWebhookEventType["KnowledgeDeleted"] = "knowledge.deleted";
65
+ IWebhookEventType["TaskCompleted"] = "task.completed";
58
66
  IWebhookEventType["TaskHituPackageCompleted"] = "task.hitu_package.completed";
59
67
  IWebhookEventType["TaskHituPackageAnalyseCompleted"] = "task.hitu_package_analyse.completed";
60
68
  IWebhookEventType["TaskComponentRepoAnalyseCompleted"] = "task.component_repo_analyse.completed";
@@ -128,6 +136,7 @@ var ISchedulerRunResult;
128
136
  var ISchedulerJobType;
129
137
  (function (ISchedulerJobType) {
130
138
  ISchedulerJobType["KnowledgeRefresh"] = "knowledge_refresh";
139
+ ISchedulerJobType["MemoryConsolidation"] = "memory_consolidation";
131
140
  })(ISchedulerJobType || (exports.ISchedulerJobType = ISchedulerJobType = {}));
132
141
  /**
133
142
  * SchedulerJobStatus
@@ -198,13 +207,12 @@ var IOperator;
198
207
  })(IOperator || (exports.IOperator = IOperator = {}));
199
208
  /**
200
209
  * MemoryTypeEnum
201
- * Memory type enumeration
210
+ * Memory lifecycle type
202
211
  */
203
212
  var IMemoryTypeEnum;
204
213
  (function (IMemoryTypeEnum) {
205
214
  IMemoryTypeEnum["MemoryWorking"] = "memory_working";
206
215
  IMemoryTypeEnum["MemoryLongTerm"] = "memory_long_term";
207
- IMemoryTypeEnum["MemoryUser"] = "memory_user";
208
216
  })(IMemoryTypeEnum || (exports.IMemoryTypeEnum = IMemoryTypeEnum = {}));
209
217
  /**
210
218
  * MemoryStatusEnum
@@ -215,6 +223,28 @@ var IMemoryStatusEnum;
215
223
  IMemoryStatusEnum["Activated"] = "activated";
216
224
  IMemoryStatusEnum["Archived"] = "archived";
217
225
  })(IMemoryStatusEnum || (exports.IMemoryStatusEnum = IMemoryStatusEnum = {}));
226
+ /**
227
+ * MemoryInputTypeEnum
228
+ * Memory input type
229
+ */
230
+ var IMemoryInputTypeEnum;
231
+ (function (IMemoryInputTypeEnum) {
232
+ IMemoryInputTypeEnum["Direct"] = "direct";
233
+ IMemoryInputTypeEnum["Conversation"] = "conversation";
234
+ IMemoryInputTypeEnum["Consolidation"] = "consolidation";
235
+ })(IMemoryInputTypeEnum || (exports.IMemoryInputTypeEnum = IMemoryInputTypeEnum = {}));
236
+ /**
237
+ * MemoryCortexEnum
238
+ * Brain cortex region enum - maps to space_id
239
+ */
240
+ var IMemoryCortexEnum;
241
+ (function (IMemoryCortexEnum) {
242
+ IMemoryCortexEnum["MemHippocampus"] = "mem_hippocampus";
243
+ IMemoryCortexEnum["MemSemantic"] = "mem_semantic";
244
+ IMemoryCortexEnum["MemEpisodic"] = "mem_episodic";
245
+ IMemoryCortexEnum["MemPreference"] = "mem_preference";
246
+ IMemoryCortexEnum["MemProcedural"] = "mem_procedural";
247
+ })(IMemoryCortexEnum || (exports.IMemoryCortexEnum = IMemoryCortexEnum = {}));
218
248
  /**
219
249
  * Language
220
250
  * Enum of the programming languages.
@@ -230,6 +260,7 @@ var ILanguage;
230
260
  ILanguage["Php"] = "php";
231
261
  ILanguage["Proto"] = "proto";
232
262
  ILanguage["Python"] = "python";
263
+ ILanguage["R"] = "r";
233
264
  ILanguage["Rst"] = "rst";
234
265
  ILanguage["Ruby"] = "ruby";
235
266
  ILanguage["Rust"] = "rust";
@@ -302,7 +333,6 @@ var IKnowledgeTypeEnum;
302
333
  IKnowledgeTypeEnum["NodePackageElement"] = "node_package_element";
303
334
  IKnowledgeTypeEnum["MemoryWorking"] = "memory_working";
304
335
  IKnowledgeTypeEnum["MemoryLongTerm"] = "memory_long_term";
305
- IKnowledgeTypeEnum["MemoryUser"] = "memory_user";
306
336
  })(IKnowledgeTypeEnum || (exports.IKnowledgeTypeEnum = IKnowledgeTypeEnum = {}));
307
337
  /**
308
338
  * KnowledgeSourceEnum
@@ -1448,6 +1478,33 @@ class Api extends HttpClient {
1448
1478
  * @request POST:/api/admin/scheduler/manage
1449
1479
  */
1450
1480
  adminManageSchedulerByFilter: (data, params = {}) => this.request(Object.assign({ path: `/api/admin/scheduler/manage`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
1481
+ /**
1482
+ * @description 管理员接口:校验 tenant 下 chunk 与 knowledge 的存在一致性。 使用 ES 聚合(composite terms)获取 distinct knowledge_id 集合; 以 DB 校验知识是否存在;对缺失 knowledge_id 对应 chunk 做物理删除。
1483
+ *
1484
+ * @tags admin
1485
+ * @name AdminCheckChunkKnowledgeConsistency
1486
+ * @summary Admin Check Chunk Knowledge Consistency
1487
+ * @request POST:/api/admin/chunk/knowledge-consistency/check
1488
+ */
1489
+ adminCheckChunkKnowledgeConsistency: (data, params = {}) => this.request(Object.assign({ path: `/api/admin/chunk/knowledge-consistency/check`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
1490
+ /**
1491
+ * @description 管理员接口:回填 AntCode 仓库知识的 source_config.branch(写入数据库)。 仅处理: - source_type = github_repo - source_config.url 包含 code.alipay.com - source_config.branch 为空 回填策略: - 优先调用 AntCode v3 project API 获取 default_branch - 失败/无 token 兜底写入 master(保证 webhook 严格匹配可用)
1492
+ *
1493
+ * @tags admin
1494
+ * @name AdminBackfillAntcodeKnowledgeBranch
1495
+ * @summary Admin Backfill Antcode Knowledge Branch
1496
+ * @request POST:/api/admin/knowledge-source/antcode/branch/backfill
1497
+ */
1498
+ adminBackfillAntcodeKnowledgeBranch: (data, params = {}) => this.request(Object.assign({ path: `/api/admin/knowledge-source/antcode/branch/backfill`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
1499
+ /**
1500
+ * @description 管理员接口:删除卧虎产品空间(space + space_user_role)。
1501
+ *
1502
+ * @tags admin
1503
+ * @name AdminDeleteWohuProductSpace
1504
+ * @summary Admin Delete Wohu Product Space
1505
+ * @request POST:/api/admin/wohu/product-space/delete
1506
+ */
1507
+ adminDeleteWohuProductSpace: (data, params = {}) => this.request(Object.assign({ path: `/api/admin/wohu/product-space/delete`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
1451
1508
  };
1452
1509
  this.llmTxt = {
1453
1510
  /**
@@ -1471,34 +1528,34 @@ class Api extends HttpClient {
1471
1528
  };
1472
1529
  this.memory = {
1473
1530
  /**
1474
- * @description Add a new memory Creates a new memory entry for the specified agent. Memory type is automatically classified if not specified. Working memories are subject to FIFO eviction when exceeding the limit. Args: body: MemoryCreate request with content and optional configuration Returns: Created memory object
1531
+ * @description Add a new working memory to hippocampus.
1475
1532
  *
1476
1533
  * @tags memory
1477
- * @name AddMemory
1478
- * @summary Add Memory
1479
- * @request POST:/api/memory/add
1534
+ * @name AddWorkingMemory
1535
+ * @summary Add Working Memory
1536
+ * @request POST:/api/memory/working
1480
1537
  */
1481
- addMemory: (data, params = {}) => this.request(Object.assign({ path: `/api/memory/add`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
1538
+ addWorkingMemory: (data, params = {}) => this.request(Object.assign({ path: `/api/memory/working`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
1482
1539
  /**
1483
- * @description Get a memory by ID Retrieves a single memory entry by its unique identifier. Args: memory_id: Unique identifier of the memory Returns: Memory object if found, None otherwise
1540
+ * @description Add a new long-term memory to a specific cortex region.
1484
1541
  *
1485
1542
  * @tags memory
1486
- * @name GetMemoryById
1487
- * @summary Get Memory By Id
1488
- * @request GET:/api/memory/{memory_id}
1543
+ * @name AddLongTermMemory
1544
+ * @summary Add Long Term Memory
1545
+ * @request POST:/api/memory/long-term
1489
1546
  */
1490
- getMemoryById: (memoryId, params = {}) => this.request(Object.assign({ path: `/api/memory/${memoryId}`, method: "GET", format: "json" }, params)),
1547
+ addLongTermMemory: (data, params = {}) => this.request(Object.assign({ path: `/api/memory/long-term`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
1491
1548
  /**
1492
- * @description Update a memory Updates an existing memory entry. Only provided fields will be updated. Args: memory_id: Unique identifier of the memory to update body: MemoryUpdate request with fields to update Returns: Updated memory object if found
1549
+ * @description Get a memory by ID.
1493
1550
  *
1494
1551
  * @tags memory
1495
- * @name UpdateMemory
1496
- * @summary Update Memory
1497
- * @request PUT:/api/memory/{memory_id}
1552
+ * @name GetMemoryById
1553
+ * @summary Get Memory By Id
1554
+ * @request GET:/api/memory/{memory_id}
1498
1555
  */
1499
- updateMemory: (memoryId, data, params = {}) => this.request(Object.assign({ path: `/api/memory/${memoryId}`, method: "PUT", body: data, type: ContentType.Json, format: "json" }, params)),
1556
+ getMemoryById: (memoryId, params = {}) => this.request(Object.assign({ path: `/api/memory/${memoryId}`, method: "GET", format: "json" }, params)),
1500
1557
  /**
1501
- * @description Delete a memory Permanently deletes a memory entry and its associated chunks. Args: memory_id: Unique identifier of the memory to delete Returns: True if deleted successfully, False if not found
1558
+ * @description Delete a memory.
1502
1559
  *
1503
1560
  * @tags memory
1504
1561
  * @name DeleteMemory
@@ -1507,7 +1564,7 @@ class Api extends HttpClient {
1507
1564
  */
1508
1565
  deleteMemory: (memoryId, params = {}) => this.request(Object.assign({ path: `/api/memory/${memoryId}`, method: "DELETE", format: "json" }, params)),
1509
1566
  /**
1510
- * @description Retrieve memories using semantic search Performs semantic search to retrieve relevant memories based on the query. Combines working memory (from database) and long-term memory (via vector search). Process: 1. Get working memories from database (if enabled) 2. Vector search for long-term memories 3. Deduplicate and merge results 4. Optional rerank 5. Return results with similarity scores Args: body: MemoryRetrievalRequest with query and configuration Returns: MemoryRetrievalResponse with retrieved memories and statistics
1567
+ * @description Retrieve memories using semantic search across cortex regions. Specify cortex_regions to limit search scope.
1511
1568
  *
1512
1569
  * @tags memory
1513
1570
  * @name RetrieveMemory
@@ -1516,7 +1573,7 @@ class Api extends HttpClient {
1516
1573
  */
1517
1574
  retrieveMemory: (data, params = {}) => this.request(Object.assign({ path: `/api/memory/retrieve`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
1518
1575
  /**
1519
- * @description Archive a memory (soft delete) Marks a memory as archived without permanently deleting it. Archived memories are not included in retrieval results. Args: memory_id: Unique identifier of the memory to archive Returns: Archived memory object if found
1576
+ * @description Archive a memory (soft delete).
1520
1577
  *
1521
1578
  * @tags memory
1522
1579
  * @name ArchiveMemory
@@ -1525,23 +1582,14 @@ class Api extends HttpClient {
1525
1582
  */
1526
1583
  archiveMemory: (memoryId, params = {}) => this.request(Object.assign({ path: `/api/memory/${memoryId}/archive`, method: "POST", format: "json" }, params)),
1527
1584
  /**
1528
- * @description Get memories for a specific agent Retrieves all memories associated with a specific agent ID. Args: agent_id: Agent ID to filter memories memory_type: Optional filter by memory type limit: Optional limit on number of results Returns: List of memories for the agent
1529
- *
1530
- * @tags memory
1531
- * @name GetMemoriesByAgent
1532
- * @summary Get Memories By Agent
1533
- * @request GET:/api/memory/agent/{agent_id}
1534
- */
1535
- getMemoriesByAgent: (agentId, query, params = {}) => this.request(Object.assign({ path: `/api/memory/agent/${agentId}`, method: "GET", query: query, format: "json" }, params)),
1536
- /**
1537
- * @description Trigger memory consolidation (Phase 2 placeholder) Reserved endpoint for Phase 2 memory consolidation feature. Currently returns a placeholder response. Args: agent_id: Optional agent ID to consolidate memories for Returns: Status message
1585
+ * @description Manually trigger memory consolidation for pending hippocampus memories.
1538
1586
  *
1539
1587
  * @tags memory
1540
1588
  * @name ConsolidateMemory
1541
1589
  * @summary Consolidate Memory
1542
1590
  * @request POST:/api/memory/consolidate
1543
1591
  */
1544
- consolidateMemory: (query, params = {}) => this.request(Object.assign({ path: `/api/memory/consolidate`, method: "POST", query: query, format: "json" }, params)),
1592
+ consolidateMemory: (params = {}) => this.request(Object.assign({ path: `/api/memory/consolidate`, method: "POST", format: "json" }, params)),
1545
1593
  };
1546
1594
  this.scheduler = {
1547
1595
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@petercatai/whisker-client",
3
- "version": "5.0.0",
3
+ "version": "5.0.202604071229",
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.5.0",
20
- "axios": "^1.13.6",
21
- "typescript": "^5.9.3"
19
+ "@types/node": "^25.5.2",
20
+ "axios": "^1.14.0",
21
+ "typescript": "^6.0.2"
22
22
  }
23
23
  }