@tomingtoming/kioq 0.9.2 → 0.9.3

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/src/index.js CHANGED
@@ -344,18 +344,18 @@ async function main() {
344
344
  server.tool("orient", "kioqを通じて思考を構造化するツール。チェインバー型パイロット支援システムとして、応答を組み立てる前に現在の思考を渡すことで、3つのスロットを返します: (1) relevant — 思考に直接関連するノート(engagement重み付け)、(2) active_context — 進行中のflowと最近のアクティブなノート、(3) discovery — 未接触だが接点がありそうなノート(セレンディピティ)。各ノートのengagement(接触回数、人間の反応、AI被参照数、origin)が付与されます。observationで人間の反応を記録でき、それがengagementに蓄積されます。対話の各ターンで呼び出すことを推奨します。", {
345
345
  thought: z.string().min(1).describe("今何を考えているか、何について応答しようとしているか"),
346
346
  references: z.array(z.string()).optional().describe("明示的に関連するノートの identifier(あれば)"),
347
- observation: z.object({
347
+ observations: z.array(z.object({
348
348
  note: z.string().min(1).describe("観察対象のノート identifier"),
349
349
  signal: z.enum(["cited", "discussed", "applied", "questioned", "dismissed"]).describe("人間の反応の種類"),
350
- }).optional().describe("直前の対話で人間がノートの概念に反応した場合に記録"),
351
- }, async ({ thought, references, observation }) => {
350
+ })).optional().describe("直前の対話で人間がノートの概念に反応した場合に記録(複数可)"),
351
+ }, async ({ thought, references, observations }) => {
352
352
  const signals = await signalLog.load();
353
353
  const notes = await store.loadAllNotes();
354
354
  engagementIndex.build(signals, notes);
355
355
  const result = await store.orient({
356
356
  thought,
357
357
  references,
358
- observation,
358
+ observations,
359
359
  engagementIndex,
360
360
  signalLog,
361
361
  });
@@ -2821,14 +2821,16 @@ export class LocalNoteStore {
2821
2821
  const notes = await this.loadProjectNotes();
2822
2822
  const lookup = this.buildLookup(notes);
2823
2823
  const thought = args.thought.trim();
2824
- // Record observation signal if present
2825
- if (args.observation && args.signalLog) {
2826
- const signalType = `human_${args.observation.signal}`;
2827
- const resolved = this.resolveWikiTarget(args.observation.note, lookup);
2828
- const noteId = resolved.status === "resolved" && resolved.note
2829
- ? resolved.note.permalink
2830
- : args.observation.note;
2831
- args.signalLog.record(signalType, noteId, thought.slice(0, 120));
2824
+ // Record observation signals if present
2825
+ if (args.observations && args.signalLog) {
2826
+ for (const obs of args.observations) {
2827
+ const signalType = `human_${obs.signal}`;
2828
+ const resolved = this.resolveWikiTarget(obs.note, lookup);
2829
+ const noteId = resolved.status === "resolved" && resolved.note
2830
+ ? resolved.note.permalink
2831
+ : obs.note;
2832
+ args.signalLog.record(signalType, noteId, thought.slice(0, 120));
2833
+ }
2832
2834
  }
2833
2835
  // Record orient references as signals
2834
2836
  if (args.references && args.signalLog) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomingtoming/kioq",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "Japanese-first local markdown MCP server",
5
5
  "type": "module",
6
6
  "bin": {