@mem9/opencode 0.1.0 → 0.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mem9/opencode",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "OpenCode memory plugin — cloud-persistent AI agent memory with hybrid vector + keyword search via mem9",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/index.ts CHANGED
@@ -1 +1 @@
1
- export { default } from "./server/index.js";
1
+ export { default } from "./server/index.ts";
@@ -5,7 +5,7 @@ import type {
5
5
  SearchResult,
6
6
  StoreResult,
7
7
  UpdateMemoryInput,
8
- } from "../shared/types.js";
8
+ } from "../shared/types.ts";
9
9
 
10
10
  export interface IngestMessage {
11
11
  role: string;
@@ -1,18 +1,18 @@
1
1
  import { readFile } from "node:fs/promises";
2
2
  import type { PluginInput } from "@opencode-ai/plugin";
3
- import { parseCredentialsFile } from "../shared/credentials-store.js";
4
- import { DEFAULT_SCOPE_CONFIG } from "../shared/defaults.js";
3
+ import { parseCredentialsFile } from "../shared/credentials-store.ts";
4
+ import { DEFAULT_SCOPE_CONFIG } from "../shared/defaults.ts";
5
5
  import {
6
6
  resolveOpenCodeBasePaths,
7
7
  resolveMem9Home,
8
8
  resolveMem9Paths,
9
9
  type Mem9ResolvedPaths,
10
- } from "../shared/platform-paths.js";
10
+ } from "../shared/platform-paths.ts";
11
11
  import {
12
12
  DEFAULT_API_URL,
13
13
  type Mem9ConfigFile,
14
14
  type Mem9CredentialsFile,
15
- } from "../shared/types.js";
15
+ } from "../shared/types.ts";
16
16
 
17
17
  const EMPTY_CREDENTIALS: Mem9CredentialsFile = {
18
18
  schemaVersion: 1,
@@ -1,11 +1,11 @@
1
1
  import type { Hooks } from "@opencode-ai/plugin";
2
- import type { IngestMessage, MemoryBackend } from "./backend.js";
3
- import type { DebugLogger } from "./debug.js";
4
- import { selectMessagesForIngest } from "./ingest/select.js";
5
- import { submitMessagesForIngest } from "./ingest/submit.js";
6
- import { formatRecallBlock } from "./recall/format.js";
7
- import { buildRecallQuery } from "./recall/query.js";
8
- import type { SessionTranscriptLoader } from "./session-transcript.js";
2
+ import type { IngestMessage, MemoryBackend } from "./backend.ts";
3
+ import type { DebugLogger } from "./debug.ts";
4
+ import { selectMessagesForIngest } from "./ingest/select.ts";
5
+ import { submitMessagesForIngest } from "./ingest/submit.ts";
6
+ import { formatRecallBlock } from "./recall/format.ts";
7
+ import { buildRecallQuery } from "./recall/query.ts";
8
+ import type { SessionTranscriptLoader } from "./session-transcript.ts";
9
9
 
10
10
  const MAX_RECALL_RESULTS = 10;
11
11
  const MIN_RECALL_QUERY_LEN = 5;
@@ -1,16 +1,16 @@
1
1
  import type { Hooks, Plugin } from "@opencode-ai/plugin";
2
- import type { MemoryBackend } from "./backend.js";
2
+ import type { MemoryBackend } from "./backend.ts";
3
3
  import {
4
4
  resolveEffectiveConfig,
5
5
  resolvePluginIdentity,
6
- } from "./config.js";
7
- import { createDebugLogger } from "./debug.js";
8
- import { ServerBackend } from "./server-backend.js";
9
- import { buildPendingSetupHooks } from "./setup-flow.js";
10
- import { buildTools } from "./tools.js";
11
- import { buildHooks } from "./hooks.js";
12
- import { createSessionTranscriptLoader } from "./session-transcript.js";
13
- import { PLUGIN_ID } from "../shared/plugin-meta.js";
6
+ } from "./config.ts";
7
+ import { createDebugLogger } from "./debug.ts";
8
+ import { ServerBackend } from "./server-backend.ts";
9
+ import { buildPendingSetupHooks } from "./setup-flow.ts";
10
+ import { buildTools } from "./tools.ts";
11
+ import { buildHooks } from "./hooks.ts";
12
+ import { createSessionTranscriptLoader } from "./session-transcript.ts";
13
+ import { PLUGIN_ID } from "../shared/plugin-meta.ts";
14
14
 
15
15
  function buildPluginHooksAndTools(
16
16
  backend: MemoryBackend,
@@ -1,4 +1,4 @@
1
- import type { IngestMessage } from "../backend.js";
1
+ import type { IngestMessage } from "../backend.ts";
2
2
 
3
3
  const RELEVANT_MEMORIES_BLOCK_RE = /<relevant-memories>[\s\S]*?(<\/relevant-memories>|$)/g;
4
4
  const MAX_INGEST_MESSAGES = 12;
@@ -1,6 +1,6 @@
1
- import type { IngestInput, IngestResult, MemoryBackend } from "../backend.js";
2
- import type { DebugLogger } from "../debug.js";
3
- import { selectMessagesForIngest } from "./select.js";
1
+ import type { IngestInput, IngestResult, MemoryBackend } from "../backend.ts";
2
+ import type { DebugLogger } from "../debug.ts";
3
+ import { selectMessagesForIngest } from "./select.ts";
4
4
 
5
5
  export interface SubmitIngestOptions {
6
6
  backend: MemoryBackend;
@@ -1,4 +1,4 @@
1
- import type { Memory } from "../../shared/types.js";
1
+ import type { Memory } from "../../shared/types.ts";
2
2
 
3
3
  const MAX_CONTENT_LEN = 500;
4
4
  const MAX_TAGS = 3;
@@ -2,7 +2,7 @@ import type {
2
2
  IngestInput,
3
3
  IngestResult,
4
4
  MemoryBackend,
5
- } from "./backend.js";
5
+ } from "./backend.ts";
6
6
  import type {
7
7
  Memory,
8
8
  StoreResult,
@@ -10,8 +10,8 @@ import type {
10
10
  CreateMemoryInput,
11
11
  UpdateMemoryInput,
12
12
  SearchInput,
13
- } from "../shared/types.js";
14
- import { DEFAULT_SCOPE_CONFIG } from "../shared/defaults.js";
13
+ } from "../shared/types.ts";
14
+ import { DEFAULT_SCOPE_CONFIG } from "../shared/defaults.ts";
15
15
 
16
16
  function isRecord(value: unknown): value is Record<string, unknown> {
17
17
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -1,5 +1,5 @@
1
1
  import type { PluginInput } from "@opencode-ai/plugin";
2
- import type { IngestMessage } from "./backend.js";
2
+ import type { IngestMessage } from "./backend.ts";
3
3
 
4
4
  const SESSION_TRANSCRIPT_FETCH_LIMIT = 24;
5
5
 
@@ -1,5 +1,5 @@
1
1
  import type { Hooks, PluginInput } from "@opencode-ai/plugin";
2
- import type { EffectiveConfig } from "./config.js";
2
+ import type { EffectiveConfig } from "./config.ts";
3
3
 
4
4
  export function buildPendingSetupHooks(
5
5
  _input: PluginInput,
@@ -1,10 +1,10 @@
1
1
  import { tool } from "@opencode-ai/plugin";
2
- import type { MemoryBackend } from "./backend.js";
2
+ import type { MemoryBackend } from "./backend.ts";
3
3
  import type {
4
4
  CreateMemoryInput,
5
5
  UpdateMemoryInput,
6
6
  SearchInput,
7
- } from "../shared/types.js";
7
+ } from "../shared/types.ts";
8
8
 
9
9
  /**
10
10
  * Build the 5 memory tools for OpenCode.
@@ -1,4 +1,4 @@
1
- import type { Mem9CredentialsFile, Mem9Profile } from "./types.js";
1
+ import type { Mem9CredentialsFile, Mem9Profile } from "./types.ts";
2
2
 
3
3
  function isRecord(value: unknown): value is Record<string, unknown> {
4
4
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -1,4 +1,4 @@
1
- import type { Mem9ConfigFile } from "./types.js";
1
+ import type { Mem9ConfigFile } from "./types.ts";
2
2
 
3
3
  export const DEFAULT_SCOPE_CONFIG: Required<
4
4
  Pick<
@@ -1,14 +1,14 @@
1
1
  import { mkdir, readFile, writeFile } from "node:fs/promises";
2
2
  import path from "node:path";
3
- import type { Mem9ResolvedPaths } from "./platform-paths.js";
4
- import { parseCredentialsFile, stringifyCredentialsFile } from "./credentials-store.js";
5
- import { DEFAULT_SCOPE_CONFIG } from "./defaults.js";
3
+ import type { Mem9ResolvedPaths } from "./platform-paths.ts";
4
+ import { parseCredentialsFile, stringifyCredentialsFile } from "./credentials-store.ts";
5
+ import { DEFAULT_SCOPE_CONFIG } from "./defaults.ts";
6
6
  import {
7
7
  DEFAULT_API_URL,
8
8
  type Mem9ConfigFile,
9
9
  type Mem9CredentialsFile,
10
10
  type Mem9Profile,
11
- } from "./types.js";
11
+ } from "./types.ts";
12
12
 
13
13
  export type SetupScope = "user" | "project";
14
14
 
package/src/tui/index.ts CHANGED
@@ -8,8 +8,8 @@ import {
8
8
  resolveMem9Home,
9
9
  resolveMem9Paths,
10
10
  type Mem9ResolvedPaths,
11
- } from "../shared/platform-paths.js";
12
- import { PLUGIN_ID } from "../shared/plugin-meta.js";
11
+ } from "../shared/platform-paths.ts";
12
+ import { PLUGIN_ID } from "../shared/plugin-meta.ts";
13
13
  import {
14
14
  loadSetupState,
15
15
  provisionApiKey,
@@ -19,7 +19,7 @@ import {
19
19
  type SetupProfileSummary,
20
20
  type SetupScope,
21
21
  type SetupState,
22
- } from "../shared/setup-files.js";
22
+ } from "../shared/setup-files.ts";
23
23
 
24
24
  type SetupAction =
25
25
  | "auto-api-key"