@hexis-ai/engram-server 0.3.0 → 0.4.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/openapi.json CHANGED
@@ -3,12 +3,38 @@
3
3
  "info": {
4
4
  "title": "engram-server",
5
5
  "version": "1.0",
6
- "description": "Cross-session retrieval for AI agents. Request bodies are derived from the server's Zod schemas (src/schemas.ts); response schemas are described by status only for now and are a planned follow-up."
6
+ "description": "AI エージェント向けのクロスセッション検索。リクエストボディはサーバーの Zod スキーマ(src/schemas.ts)から導出される。レスポンススキーマは現状ステータスコードのみの記述で、本格的な記述は今後対応予定。"
7
7
  },
8
+ "tags": [
9
+ {
10
+ "name": "Me",
11
+ "description": "識別プローブ"
12
+ },
13
+ {
14
+ "name": "Sessions",
15
+ "description": "セッションの作成・取得・イベント追加"
16
+ },
17
+ {
18
+ "name": "Search",
19
+ "description": "ワークスペースコーパスへのスコアリング検索"
20
+ },
21
+ {
22
+ "name": "Persons",
23
+ "description": "person の作成・更新・検索"
24
+ },
25
+ {
26
+ "name": "Workspaces (admin)",
27
+ "description": "ワークスペースの管理(管理者トークン必須)"
28
+ },
29
+ {
30
+ "name": "API Keys (admin)",
31
+ "description": "ワークスペース API キーの発行・無効化(管理者トークン必須)"
32
+ }
33
+ ],
8
34
  "servers": [
9
35
  {
10
36
  "url": "/",
11
- "description": "relative to the deployed engram-server"
37
+ "description": "デプロイされた engram-server からの相対パス"
12
38
  }
13
39
  ],
14
40
  "security": [
@@ -21,13 +47,13 @@
21
47
  "workspaceKey": {
22
48
  "type": "http",
23
49
  "scheme": "bearer",
24
- "description": "Workspace API key (`eng_…`). Also accepted as the `X-Api-Key` header."
50
+ "description": "ワークスペース API キー(`eng_…`)。`X-Api-Key` ヘッダーでも受け付ける。"
25
51
  },
26
52
  "adminToken": {
27
53
  "type": "apiKey",
28
54
  "in": "header",
29
55
  "name": "X-Admin-Token",
30
- "description": "Platform admin token for `/admin/v1/*`. Also accepted as `Authorization: Bearer`."
56
+ "description": "`/admin/v1/*` 用のプラットフォーム管理者トークン。`Authorization: Bearer` でも受け付ける。"
31
57
  }
32
58
  },
33
59
  "schemas": {
@@ -329,20 +355,23 @@
329
355
  "paths": {
330
356
  "/v1/me": {
331
357
  "get": {
332
- "summary": "Identity probe the workspace the caller's key resolves to.",
358
+ "summary": "識別プローブ呼び出し元のキーが解決するワークスペースを返す。",
333
359
  "responses": {
334
360
  "200": {
335
- "description": "workspace id"
361
+ "description": "ワークスペース id"
336
362
  },
337
363
  "401": {
338
- "description": "unauthorized"
364
+ "description": "認証エラー"
339
365
  }
340
- }
366
+ },
367
+ "tags": [
368
+ "Me"
369
+ ]
341
370
  }
342
371
  },
343
372
  "/v1/sessions": {
344
373
  "post": {
345
- "summary": "Create a session.",
374
+ "summary": "セッションを作成する。",
346
375
  "requestBody": {
347
376
  "required": true,
348
377
  "content": {
@@ -355,18 +384,21 @@
355
384
  },
356
385
  "responses": {
357
386
  "200": {
358
- "description": "created session id"
387
+ "description": "作成されたセッション id"
359
388
  },
360
389
  "400": {
361
- "description": "invalid body"
390
+ "description": "リクエストボディが不正"
362
391
  },
363
392
  "401": {
364
- "description": "unauthorized"
393
+ "description": "認証エラー"
365
394
  }
366
- }
395
+ },
396
+ "tags": [
397
+ "Sessions"
398
+ ]
367
399
  },
368
400
  "get": {
369
- "summary": "List recent sessions plus their persons map.",
401
+ "summary": "最近のセッション一覧と、それに紐づく persons マップを取得する。",
370
402
  "parameters": [
371
403
  {
372
404
  "name": "limit",
@@ -376,7 +408,7 @@
376
408
  "type": "integer",
377
409
  "minimum": 1
378
410
  },
379
- "description": "Page size; clamped server-side."
411
+ "description": "ページサイズ。サーバー側で上限が適用される。"
380
412
  },
381
413
  {
382
414
  "name": "channel",
@@ -385,22 +417,25 @@
385
417
  "schema": {
386
418
  "type": "string"
387
419
  },
388
- "description": "Filter by session channel."
420
+ "description": "セッションのチャンネルで絞り込む。"
389
421
  }
390
422
  ],
391
423
  "responses": {
392
424
  "200": {
393
- "description": "session list envelope"
425
+ "description": "セッション一覧のエンベロープ"
394
426
  },
395
427
  "401": {
396
- "description": "unauthorized"
428
+ "description": "認証エラー"
397
429
  }
398
- }
430
+ },
431
+ "tags": [
432
+ "Sessions"
433
+ ]
399
434
  }
400
435
  },
401
436
  "/v1/sessions/{id}": {
402
437
  "get": {
403
- "summary": "Fetch one session plus its persons map.",
438
+ "summary": "単一セッションと、それに紐づく persons マップを取得する。",
404
439
  "parameters": [
405
440
  {
406
441
  "name": "id",
@@ -409,25 +444,28 @@
409
444
  "schema": {
410
445
  "type": "string"
411
446
  },
412
- "description": "Session id."
447
+ "description": "セッション id"
413
448
  }
414
449
  ],
415
450
  "responses": {
416
451
  "200": {
417
- "description": "session envelope"
452
+ "description": "セッションのエンベロープ"
418
453
  },
419
454
  "401": {
420
- "description": "unauthorized"
455
+ "description": "認証エラー"
421
456
  },
422
457
  "404": {
423
- "description": "session not found"
458
+ "description": "セッションが見つからない"
424
459
  }
425
- }
460
+ },
461
+ "tags": [
462
+ "Sessions"
463
+ ]
426
464
  }
427
465
  },
428
466
  "/v1/sessions/{id}/events": {
429
467
  "post": {
430
- "summary": "Append events to a session.",
468
+ "summary": "セッションにイベントを追加する。",
431
469
  "parameters": [
432
470
  {
433
471
  "name": "id",
@@ -436,7 +474,7 @@
436
474
  "schema": {
437
475
  "type": "string"
438
476
  },
439
- "description": "Session id."
477
+ "description": "セッション id"
440
478
  }
441
479
  ],
442
480
  "requestBody": {
@@ -451,23 +489,54 @@
451
489
  },
452
490
  "responses": {
453
491
  "204": {
454
- "description": "appended"
492
+ "description": "追加完了"
455
493
  },
456
494
  "400": {
457
- "description": "invalid body"
495
+ "description": "リクエストボディが不正"
496
+ },
497
+ "401": {
498
+ "description": "認証エラー"
499
+ },
500
+ "404": {
501
+ "description": "セッションが見つからない"
502
+ }
503
+ },
504
+ "tags": [
505
+ "Sessions"
506
+ ]
507
+ },
508
+ "get": {
509
+ "summary": "セッションの生イベントログを seq 順で取得する(fold せず、各イベントの時刻つき)。",
510
+ "parameters": [
511
+ {
512
+ "name": "id",
513
+ "in": "path",
514
+ "required": true,
515
+ "schema": {
516
+ "type": "string"
517
+ },
518
+ "description": "セッション id。"
519
+ }
520
+ ],
521
+ "responses": {
522
+ "200": {
523
+ "description": "イベントログ"
458
524
  },
459
525
  "401": {
460
- "description": "unauthorized"
526
+ "description": "認証エラー"
461
527
  },
462
528
  "404": {
463
- "description": "session not found"
529
+ "description": "セッションが見つからない"
464
530
  }
465
- }
531
+ },
532
+ "tags": [
533
+ "Sessions"
534
+ ]
466
535
  }
467
536
  },
468
537
  "/v1/search": {
469
538
  "post": {
470
- "summary": "Score the workspace corpus against a query session.",
539
+ "summary": "クエリセッションに対してワークスペースのコーパスをスコアリングする。",
471
540
  "requestBody": {
472
541
  "required": true,
473
542
  "content": {
@@ -480,23 +549,26 @@
480
549
  },
481
550
  "responses": {
482
551
  "200": {
483
- "description": "scored results plus persons map"
552
+ "description": "スコアリング結果と persons マップ"
484
553
  },
485
554
  "400": {
486
- "description": "invalid body"
555
+ "description": "リクエストボディが不正"
487
556
  },
488
557
  "401": {
489
- "description": "unauthorized"
558
+ "description": "認証エラー"
490
559
  },
491
560
  "404": {
492
- "description": "query session not found"
561
+ "description": "クエリセッションが見つからない"
493
562
  }
494
- }
563
+ },
564
+ "tags": [
565
+ "Search"
566
+ ]
495
567
  }
496
568
  },
497
569
  "/v1/persons": {
498
570
  "post": {
499
- "summary": "Create a person (server allocates the id).",
571
+ "summary": "person を作成する(id はサーバーが採番する)。",
500
572
  "requestBody": {
501
573
  "required": true,
502
574
  "content": {
@@ -509,18 +581,21 @@
509
581
  },
510
582
  "responses": {
511
583
  "201": {
512
- "description": "created person"
584
+ "description": "作成された person"
513
585
  },
514
586
  "400": {
515
- "description": "invalid body"
587
+ "description": "リクエストボディが不正"
516
588
  },
517
589
  "401": {
518
- "description": "unauthorized"
590
+ "description": "認証エラー"
519
591
  }
520
- }
592
+ },
593
+ "tags": [
594
+ "Persons"
595
+ ]
521
596
  },
522
597
  "get": {
523
- "summary": "List or free-text search persons.",
598
+ "summary": "person の一覧取得、またはフリーテキスト検索を行う。",
524
599
  "parameters": [
525
600
  {
526
601
  "name": "limit",
@@ -530,7 +605,7 @@
530
605
  "type": "integer",
531
606
  "minimum": 1
532
607
  },
533
- "description": "Page size; clamped server-side."
608
+ "description": "ページサイズ。サーバー側で上限が適用される。"
534
609
  },
535
610
  {
536
611
  "name": "q",
@@ -539,22 +614,25 @@
539
614
  "schema": {
540
615
  "type": "string"
541
616
  },
542
- "description": "Free-text query over id + display_name."
617
+ "description": "id display_name に対するフリーテキストクエリ。"
543
618
  }
544
619
  ],
545
620
  "responses": {
546
621
  "200": {
547
- "description": "person list"
622
+ "description": "person 一覧"
548
623
  },
549
624
  "401": {
550
- "description": "unauthorized"
625
+ "description": "認証エラー"
551
626
  }
552
- }
627
+ },
628
+ "tags": [
629
+ "Persons"
630
+ ]
553
631
  }
554
632
  },
555
633
  "/v1/persons/{id}": {
556
634
  "put": {
557
- "summary": "Upsert a person at a caller-supplied id.",
635
+ "summary": "呼び出し元が指定した id person upsert する。",
558
636
  "parameters": [
559
637
  {
560
638
  "name": "id",
@@ -563,7 +641,7 @@
563
641
  "schema": {
564
642
  "type": "string"
565
643
  },
566
- "description": "Person id."
644
+ "description": "person id"
567
645
  }
568
646
  ],
569
647
  "requestBody": {
@@ -578,18 +656,21 @@
578
656
  },
579
657
  "responses": {
580
658
  "200": {
581
- "description": "upserted person"
659
+ "description": "upsert された person"
582
660
  },
583
661
  "400": {
584
- "description": "invalid body"
662
+ "description": "リクエストボディが不正"
585
663
  },
586
664
  "401": {
587
- "description": "unauthorized"
665
+ "description": "認証エラー"
588
666
  }
589
- }
667
+ },
668
+ "tags": [
669
+ "Persons"
670
+ ]
590
671
  },
591
672
  "patch": {
592
- "summary": "Patch a person's profile fields.",
673
+ "summary": "person のプロフィール項目を部分更新する。",
593
674
  "parameters": [
594
675
  {
595
676
  "name": "id",
@@ -598,7 +679,7 @@
598
679
  "schema": {
599
680
  "type": "string"
600
681
  },
601
- "description": "Person id."
682
+ "description": "person id"
602
683
  }
603
684
  ],
604
685
  "requestBody": {
@@ -613,21 +694,24 @@
613
694
  },
614
695
  "responses": {
615
696
  "200": {
616
- "description": "updated person"
697
+ "description": "更新された person"
617
698
  },
618
699
  "400": {
619
- "description": "invalid body"
700
+ "description": "リクエストボディが不正"
620
701
  },
621
702
  "401": {
622
- "description": "unauthorized"
703
+ "description": "認証エラー"
623
704
  },
624
705
  "404": {
625
- "description": "person not found"
706
+ "description": "person が見つからない"
626
707
  }
627
- }
708
+ },
709
+ "tags": [
710
+ "Persons"
711
+ ]
628
712
  },
629
713
  "get": {
630
- "summary": "Fetch one person.",
714
+ "summary": "単一の person を取得する。",
631
715
  "parameters": [
632
716
  {
633
717
  "name": "id",
@@ -636,7 +720,7 @@
636
720
  "schema": {
637
721
  "type": "string"
638
722
  },
639
- "description": "Person id."
723
+ "description": "person id"
640
724
  }
641
725
  ],
642
726
  "responses": {
@@ -644,17 +728,20 @@
644
728
  "description": "person"
645
729
  },
646
730
  "401": {
647
- "description": "unauthorized"
731
+ "description": "認証エラー"
648
732
  },
649
733
  "404": {
650
- "description": "person not found"
734
+ "description": "person が見つからない"
651
735
  }
652
- }
736
+ },
737
+ "tags": [
738
+ "Persons"
739
+ ]
653
740
  }
654
741
  },
655
742
  "/v1/persons/{id}/sessions": {
656
743
  "get": {
657
- "summary": "Sessions this person participates in (or can view).",
744
+ "summary": "この person が参加している(または閲覧可能な)セッション一覧。",
658
745
  "parameters": [
659
746
  {
660
747
  "name": "id",
@@ -663,7 +750,7 @@
663
750
  "schema": {
664
751
  "type": "string"
665
752
  },
666
- "description": "Person id."
753
+ "description": "person id"
667
754
  },
668
755
  {
669
756
  "name": "limit",
@@ -673,7 +760,7 @@
673
760
  "type": "integer",
674
761
  "minimum": 1
675
762
  },
676
- "description": "Page size; clamped server-side."
763
+ "description": "ページサイズ。サーバー側で上限が適用される。"
677
764
  },
678
765
  {
679
766
  "name": "channel",
@@ -682,7 +769,7 @@
682
769
  "schema": {
683
770
  "type": "string"
684
771
  },
685
- "description": "Filter by session channel."
772
+ "description": "セッションのチャンネルで絞り込む。"
686
773
  },
687
774
  {
688
775
  "name": "scope",
@@ -695,22 +782,25 @@
695
782
  "viewable"
696
783
  ]
697
784
  },
698
- "description": "`participant` (default) or `viewable`."
785
+ "description": "`participant`(デフォルト)または `viewable`。"
699
786
  }
700
787
  ],
701
788
  "responses": {
702
789
  "200": {
703
- "description": "session list envelope"
790
+ "description": "セッション一覧のエンベロープ"
704
791
  },
705
792
  "401": {
706
- "description": "unauthorized"
793
+ "description": "認証エラー"
707
794
  }
708
- }
795
+ },
796
+ "tags": [
797
+ "Persons"
798
+ ]
709
799
  }
710
800
  },
711
801
  "/admin/v1/workspaces": {
712
802
  "post": {
713
- "summary": "Create a workspace (and, by default, an initial key).",
803
+ "summary": "ワークスペースを作成する(デフォルトで初期キーも発行する)。",
714
804
  "security": [
715
805
  {
716
806
  "adminToken": []
@@ -728,18 +818,21 @@
728
818
  },
729
819
  "responses": {
730
820
  "200": {
731
- "description": "workspace, plus key unless issueKey=false"
821
+ "description": "ワークスペース(issueKey=false でない限りキーも含む)"
732
822
  },
733
823
  "400": {
734
- "description": "invalid body or workspace id"
824
+ "description": "リクエストボディまたはワークスペース id が不正"
735
825
  },
736
826
  "401": {
737
- "description": "unauthorized"
827
+ "description": "認証エラー"
738
828
  }
739
- }
829
+ },
830
+ "tags": [
831
+ "Workspaces (admin)"
832
+ ]
740
833
  },
741
834
  "get": {
742
- "summary": "List all workspaces.",
835
+ "summary": "全ワークスペースを一覧取得する。",
743
836
  "security": [
744
837
  {
745
838
  "adminToken": []
@@ -747,17 +840,20 @@
747
840
  ],
748
841
  "responses": {
749
842
  "200": {
750
- "description": "workspace list"
843
+ "description": "ワークスペース一覧"
751
844
  },
752
845
  "401": {
753
- "description": "unauthorized"
846
+ "description": "認証エラー"
754
847
  }
755
- }
848
+ },
849
+ "tags": [
850
+ "Workspaces (admin)"
851
+ ]
756
852
  }
757
853
  },
758
854
  "/admin/v1/workspaces/{id}": {
759
855
  "get": {
760
- "summary": "Fetch one workspace.",
856
+ "summary": "単一のワークスペースを取得する。",
761
857
  "security": [
762
858
  {
763
859
  "adminToken": []
@@ -771,23 +867,26 @@
771
867
  "schema": {
772
868
  "type": "string"
773
869
  },
774
- "description": "Workspace id."
870
+ "description": "ワークスペース id"
775
871
  }
776
872
  ],
777
873
  "responses": {
778
874
  "200": {
779
- "description": "workspace"
875
+ "description": "ワークスペース"
780
876
  },
781
877
  "401": {
782
- "description": "unauthorized"
878
+ "description": "認証エラー"
783
879
  },
784
880
  "404": {
785
- "description": "workspace not found"
881
+ "description": "ワークスペースが見つからない"
786
882
  }
787
- }
883
+ },
884
+ "tags": [
885
+ "Workspaces (admin)"
886
+ ]
788
887
  },
789
888
  "delete": {
790
- "summary": "Delete a workspace (cascades to keys, sessions, events).",
889
+ "summary": "ワークスペースを削除する(キー・セッション・イベントにカスケードする)。",
791
890
  "security": [
792
891
  {
793
892
  "adminToken": []
@@ -801,25 +900,28 @@
801
900
  "schema": {
802
901
  "type": "string"
803
902
  },
804
- "description": "Workspace id."
903
+ "description": "ワークスペース id"
805
904
  }
806
905
  ],
807
906
  "responses": {
808
907
  "204": {
809
- "description": "deleted"
908
+ "description": "削除完了"
810
909
  },
811
910
  "401": {
812
- "description": "unauthorized"
911
+ "description": "認証エラー"
813
912
  },
814
913
  "404": {
815
- "description": "workspace not found"
914
+ "description": "ワークスペースが見つからない"
816
915
  }
817
- }
916
+ },
917
+ "tags": [
918
+ "Workspaces (admin)"
919
+ ]
818
920
  }
819
921
  },
820
922
  "/admin/v1/workspaces/{id}/keys": {
821
923
  "post": {
822
- "summary": "Issue a new API key for a workspace.",
924
+ "summary": "ワークスペースに新しい API キーを発行する。",
823
925
  "security": [
824
926
  {
825
927
  "adminToken": []
@@ -833,7 +935,7 @@
833
935
  "schema": {
834
936
  "type": "string"
835
937
  },
836
- "description": "Workspace id."
938
+ "description": "ワークスペース id"
837
939
  }
838
940
  ],
839
941
  "requestBody": {
@@ -848,21 +950,24 @@
848
950
  },
849
951
  "responses": {
850
952
  "200": {
851
- "description": "issued key (raw key returned once)"
953
+ "description": "発行されたキー(生のキーは一度のみ返却)"
852
954
  },
853
955
  "400": {
854
- "description": "invalid body"
956
+ "description": "リクエストボディが不正"
855
957
  },
856
958
  "401": {
857
- "description": "unauthorized"
959
+ "description": "認証エラー"
858
960
  },
859
961
  "404": {
860
- "description": "workspace not found"
962
+ "description": "ワークスペースが見つからない"
861
963
  }
862
- }
964
+ },
965
+ "tags": [
966
+ "API Keys (admin)"
967
+ ]
863
968
  },
864
969
  "get": {
865
- "summary": "List a workspace's API keys (hashes only).",
970
+ "summary": "ワークスペースの API キー一覧を取得する(ハッシュのみ)。",
866
971
  "security": [
867
972
  {
868
973
  "adminToken": []
@@ -876,25 +981,28 @@
876
981
  "schema": {
877
982
  "type": "string"
878
983
  },
879
- "description": "Workspace id."
984
+ "description": "ワークスペース id"
880
985
  }
881
986
  ],
882
987
  "responses": {
883
988
  "200": {
884
- "description": "key list"
989
+ "description": "キー一覧"
885
990
  },
886
991
  "401": {
887
- "description": "unauthorized"
992
+ "description": "認証エラー"
888
993
  },
889
994
  "404": {
890
- "description": "workspace not found"
995
+ "description": "ワークスペースが見つからない"
891
996
  }
892
- }
997
+ },
998
+ "tags": [
999
+ "API Keys (admin)"
1000
+ ]
893
1001
  }
894
1002
  },
895
1003
  "/admin/v1/workspaces/{id}/keys/{keyId}": {
896
1004
  "delete": {
897
- "summary": "Revoke an API key.",
1005
+ "summary": "API キーを無効化する。",
898
1006
  "security": [
899
1007
  {
900
1008
  "adminToken": []
@@ -908,7 +1016,7 @@
908
1016
  "schema": {
909
1017
  "type": "string"
910
1018
  },
911
- "description": "Workspace id."
1019
+ "description": "ワークスペース id"
912
1020
  },
913
1021
  {
914
1022
  "name": "keyId",
@@ -917,20 +1025,23 @@
917
1025
  "schema": {
918
1026
  "type": "string"
919
1027
  },
920
- "description": "Key id."
1028
+ "description": "キー id"
921
1029
  }
922
1030
  ],
923
1031
  "responses": {
924
1032
  "204": {
925
- "description": "revoked (idempotent)"
1033
+ "description": "無効化完了(冪等)"
926
1034
  },
927
1035
  "401": {
928
- "description": "unauthorized"
1036
+ "description": "認証エラー"
929
1037
  },
930
1038
  "404": {
931
- "description": "key not found"
1039
+ "description": "キーが見つからない"
932
1040
  }
933
- }
1041
+ },
1042
+ "tags": [
1043
+ "API Keys (admin)"
1044
+ ]
934
1045
  }
935
1046
  }
936
1047
  }