@unson/brainbase-mcp 0.10.12 → 0.10.13

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.
@@ -640,6 +640,25 @@ function unsupported(input, action, error) {
640
640
  error: { code: error.code, message: error.message },
641
641
  };
642
642
  }
643
+ function lookupActionVariant(kind, properties, required) {
644
+ return {
645
+ type: 'object',
646
+ properties: {
647
+ kind: { const: kind },
648
+ ...properties,
649
+ required_fields: {
650
+ type: 'array',
651
+ minItems: 1,
652
+ maxItems: MAX_FIELDS,
653
+ description: 'Must contain the same public field paths as the top-level required_fields.',
654
+ items: { type: 'string', minLength: 1, maxLength: MAX_FIELD_LENGTH },
655
+ },
656
+ why_different: { type: 'string', minLength: 1, maxLength: MAX_HINT_LENGTH },
657
+ },
658
+ required: ['kind', ...required],
659
+ additionalProperties: false,
660
+ };
661
+ }
643
662
  export const knowledgeLookupTools = [{
644
663
  name: 'brainbase_knowledge_lookup',
645
664
  description: 'Find and read authorized Graph knowledge by purpose. Each call performs one bounded search, read, relation follow, or finish proposal; project hints never change authorization scope.',
@@ -664,57 +683,49 @@ export const knowledgeLookupTools = [{
664
683
  missing_information: { type: 'array', maxItems: MAX_FIELDS, items: { type: 'string', minLength: 1, maxLength: MAX_HINT_LENGTH } },
665
684
  based_on_attempt_ids: { type: 'array', maxItems: MAX_IDS, items: { type: 'string', minLength: 1, maxLength: 300 } },
666
685
  why_different: { type: 'string', minLength: 1, maxLength: MAX_HINT_LENGTH },
686
+ // Each variant lists its own properties. Codex renders only the oneOf
687
+ // variants into the model-facing declaration, so properties declared
688
+ // beside oneOf are invisible and read/finish calls cannot be written.
667
689
  next_action: {
668
690
  type: 'object',
669
- properties: {
670
- kind: { type: 'string', enum: ['search', 'read', 'follow_relation', 'finish'] },
671
- query: { type: 'string', minLength: 1, maxLength: MAX_TEXT_LENGTH },
672
- entity_types: { type: 'array', maxItems: 10, items: { type: 'string', minLength: 1, maxLength: 100 } },
673
- seed_ids: { type: 'array', minItems: 1, maxItems: MAX_IDS, items: { type: 'string', minLength: 1, maxLength: 1_000 } },
674
- entity_id: { type: 'string', minLength: 1, maxLength: 1_000 },
675
- entity_type: { type: 'string', minLength: 1, maxLength: 100 },
676
- required_fields: {
677
- type: 'array',
678
- minItems: 1,
679
- maxItems: MAX_FIELDS,
680
- description: 'Must contain the same public field paths as the top-level required_fields.',
681
- items: { type: 'string', minLength: 1, maxLength: MAX_FIELD_LENGTH },
682
- },
683
- relation: { type: 'string', minLength: 1, maxLength: MAX_RELATION_LENGTH },
684
- direction: { type: 'string', enum: ['incoming', 'outgoing'] },
685
- target_types: { type: 'array', maxItems: 10, items: { type: 'string', minLength: 1, maxLength: 100 } },
686
- why_different: { type: 'string', minLength: 1, maxLength: MAX_HINT_LENGTH },
687
- assessment: { type: 'string', enum: ['sufficient', 'insufficient'] },
688
- status: { type: 'string', enum: ['satisfied', 'unresolved', 'needs_user_input'] },
689
- reference_ids: { type: 'array', maxItems: MAX_IDS, items: { type: 'string', minLength: 1, maxLength: 1_000 } },
690
- field_evidence: {
691
- type: 'array',
692
- maxItems: MAX_FIELDS,
693
- items: {
694
- type: 'object',
695
- properties: {
696
- field: { type: 'string', minLength: 1, maxLength: MAX_FIELD_LENGTH },
697
- reference_id: { type: 'string', minLength: 1, maxLength: 1_000 },
698
- attempt_id: { type: 'string', minLength: 1, maxLength: 300 },
691
+ oneOf: [
692
+ lookupActionVariant('search', {
693
+ query: { type: 'string', minLength: 1, maxLength: MAX_TEXT_LENGTH },
694
+ entity_types: { type: 'array', maxItems: 10, items: { type: 'string', minLength: 1, maxLength: 100 } },
695
+ seed_ids: { type: 'array', minItems: 1, maxItems: MAX_IDS, items: { type: 'string', minLength: 1, maxLength: 1_000 } },
696
+ }, []),
697
+ lookupActionVariant('read', {
698
+ entity_id: { type: 'string', minLength: 1, maxLength: 1_000 },
699
+ entity_type: { type: 'string', minLength: 1, maxLength: 100 },
700
+ }, ['entity_id', 'entity_type']),
701
+ lookupActionVariant('follow_relation', {
702
+ seed_ids: { type: 'array', minItems: 1, maxItems: MAX_IDS, items: { type: 'string', minLength: 1, maxLength: 1_000 } },
703
+ relation: { type: 'string', minLength: 1, maxLength: MAX_RELATION_LENGTH },
704
+ direction: { type: 'string', enum: ['incoming', 'outgoing'] },
705
+ target_types: { type: 'array', maxItems: 10, items: { type: 'string', minLength: 1, maxLength: 100 } },
706
+ }, ['seed_ids', 'relation', 'direction']),
707
+ lookupActionVariant('finish', {
708
+ assessment: { type: 'string', enum: ['sufficient', 'insufficient'] },
709
+ status: { type: 'string', enum: ['satisfied', 'unresolved', 'needs_user_input'] },
710
+ reference_ids: { type: 'array', maxItems: MAX_IDS, items: { type: 'string', minLength: 1, maxLength: 1_000 } },
711
+ field_evidence: {
712
+ type: 'array',
713
+ maxItems: MAX_FIELDS,
714
+ items: {
715
+ type: 'object',
716
+ properties: {
717
+ field: { type: 'string', minLength: 1, maxLength: MAX_FIELD_LENGTH },
718
+ reference_id: { type: 'string', minLength: 1, maxLength: 1_000 },
719
+ attempt_id: { type: 'string', minLength: 1, maxLength: 300 },
720
+ },
721
+ required: ['field', 'reference_id', 'attempt_id'],
722
+ additionalProperties: false,
699
723
  },
700
- required: ['field', 'reference_id', 'attempt_id'],
701
- additionalProperties: false,
702
724
  },
703
- },
704
- unresolved_items: { type: 'array', maxItems: MAX_FIELDS, items: { type: 'string', minLength: 1, maxLength: MAX_HINT_LENGTH } },
705
- termination_reason: { type: 'string', minLength: 1, maxLength: MAX_HINT_LENGTH },
706
- },
707
- oneOf: [
708
- { properties: { kind: { const: 'search' } }, required: ['kind'] },
709
- { properties: { kind: { const: 'read' } }, required: ['kind', 'entity_id', 'entity_type'] },
710
- { properties: { kind: { const: 'follow_relation' } }, required: ['kind', 'seed_ids', 'relation', 'direction'] },
711
- {
712
- properties: { kind: { const: 'finish' } },
713
- required: ['kind', 'assessment', 'status', 'reference_ids', 'field_evidence', 'unresolved_items', 'termination_reason'],
714
- },
725
+ unresolved_items: { type: 'array', maxItems: MAX_FIELDS, items: { type: 'string', minLength: 1, maxLength: MAX_HINT_LENGTH } },
726
+ termination_reason: { type: 'string', minLength: 1, maxLength: MAX_HINT_LENGTH },
727
+ }, ['assessment', 'status', 'reference_ids', 'field_evidence', 'unresolved_items', 'termination_reason']),
715
728
  ],
716
- required: ['kind'],
717
- additionalProperties: false,
718
729
  },
719
730
  },
720
731
  required: ['question', 'target_hint', 'required_fields'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unson/brainbase-mcp",
3
- "version": "0.10.12",
3
+ "version": "0.10.13",
4
4
  "description": "Local-first Brainbase judgment OS that lets supported AI agents reuse a user's approved goals, priorities, decisions, and judgment criteria.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -340,5 +340,5 @@
340
340
  "engines": {
341
341
  "node": ">=20"
342
342
  },
343
- "gitHead": "10493d41000c832bf85c33fc30e920a4c194fe61"
343
+ "gitHead": "e064a40fee8b023550daab1a28ca28fecb55f171"
344
344
  }
@@ -875,9 +875,14 @@ export function renderValueProofReview(root, state, callbacks = {}, options = {}
875
875
  surface.append(renderCoverageNotice(doc, home));
876
876
  if (home.coverage.possiblyStalled) {
877
877
  surface.append(workspaceNotice(doc, {
878
- label: '記録の停止',
878
+ label: '価値の確認記録の停止',
879
879
  tone: 'warning',
880
- text: 'しばらく新しい記録がありません。記録が止まっている可能性があります。0件を「何も無かった」とは扱いません。',
880
+ text: noticeBody(
881
+ doc,
882
+ 'しばらく新しい価値の確認記録(.value-proof.json)がありません。',
883
+ 'この画面は判断journalのうち価値の確認記録だけを表示しています。判断journalには別の記録(episode/final)が書かれますが、この注意はjournal全体の停止を示しません。journal全体の最新の書き込み状況は、この画面では確認できません。',
884
+ '保存済み件数や最新時刻が未確認の場合は、0件・成功とは扱いません。',
885
+ ),
881
886
  }));
882
887
  }
883
888
  surface.append(renderFilters(doc, home, state, callbacks), renderMetrics(doc, home));