suemo 0.1.2 → 0.1.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/README.md CHANGED
@@ -42,6 +42,8 @@ SURREAL_DATASTORE_VERSIONED=true SURREAL_DATASTORE_RETENTION=90d surreal start \
42
42
  -- surrealkv:///path/to/data
43
43
  ```
44
44
 
45
+ Note: It is advised to create database-level admin specifically for suemo.
46
+
45
47
  For suemo, the critical capability is allowing custom functions:
46
48
 
47
49
  - `fn::*`
@@ -110,7 +112,7 @@ If `suemo` is not on root PATH, use `sudo bunx suemo ...`.
110
112
 
111
113
  Drop `--dry-run` to apply changes.
112
114
 
113
- `suemo init surreal` also creates `/opt/suemo/surrealdb/local.env` with commented overrides and does not overwrite it if it already exists. If defined in `local.env`, these values override `common.env`:
115
+ `suemo init surreal` also creates `/opt/suemo/surreal/local.env` with commented overrides and does not overwrite it if it already exists. If defined in `local.env`, these values override `common.env`:
114
116
 
115
117
  - `SURREAL_USER`
116
118
  - `SURREAL_PASS`
@@ -123,10 +125,10 @@ What these commands do:
123
125
 
124
126
  - `suemo init surreal <2gb|6gb>`
125
127
  - checks `surrealdb` package via `pacman -Q`
126
- - creates `/opt/suemo/surrealdb/common.env` + profile env (`2gb.env` or `6gb.env`)
127
- - creates `/opt/suemo/surrealdb/local.env` once (user override file; not overwritten)
128
- - writes `/etc/systemd/system/suemo-surrealdb@.service`
129
- - enables + starts `suemo-surrealdb@<profile>.service`
128
+ - creates `/opt/suemo/surreal/common.env` + profile env (`2gb.env` or `6gb.env`)
129
+ - creates `/opt/suemo/surreal/local.env` once (user override file; not overwritten)
130
+ - writes `/etc/systemd/system/suemo-surreal@.service`
131
+ - enables + starts `suemo-surreal@<profile>.service`
130
132
  - includes `VERSIONED` + retention config and strict capability allowlist:
131
133
  - `SURREAL_DATASTORE_VERSIONED=true`
132
134
  - `SURREAL_DATASTORE_RETENTION=90d`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suemo",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Persistent semantic memory for AI agents — backed by SurrealDB.",
5
5
  "author": {
6
6
  "name": "Umar Alfarouk",
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: suemo
3
3
  description: OpenCode-focused persistent memory workflow for suemo with CLI/MCP parity and versioned references.
4
+ license: GPL-3.0-only
5
+ compatibility: opencode
4
6
  version: 0.1.2
5
7
  ---
6
8
 
@@ -29,9 +29,9 @@ const log = getLogger(['suemo', 'cli', 'init'])
29
29
  const init = app.sub('init')
30
30
  .meta({ description: 'Initialize suemo config and/or database schema' })
31
31
 
32
- const SURREAL_PROFILES_DIR = '/opt/suemo/surrealdb'
33
- const SURREAL_LOCAL_ENV_PATH = '/opt/suemo/surrealdb/local.env'
34
- const SURREAL_SYSTEMD_UNIT_PATH = '/etc/systemd/system/suemo-surrealdb@.service'
32
+ const SURREAL_PROFILES_DIR = '/opt/suemo/surreal'
33
+ const SURREAL_LOCAL_ENV_PATH = '/opt/suemo/surreal/local.env'
34
+ const SURREAL_SYSTEMD_UNIT_PATH = '/etc/systemd/system/suemo-surreal@.service'
35
35
  const SURREAL_DATA_DIR = '/var/lib/surrealdb'
36
36
  const FASTEMBED_INSTALL_DIR = '/opt/suemo'
37
37
  const FASTEMBED_LOCAL_ENV_DIR = '/opt/fastembed'
@@ -52,9 +52,9 @@ Type=simple
52
52
  AmbientCapabilities=CAP_NET_BIND_SERVICE
53
53
  User=surrealdb
54
54
  Group=surrealdb
55
- EnvironmentFile=/opt/suemo/surrealdb/common.env
56
- EnvironmentFile=/opt/suemo/surrealdb/%i.env
57
- EnvironmentFile=-/opt/suemo/surrealdb/local.env
55
+ EnvironmentFile=/opt/suemo/surreal/common.env
56
+ EnvironmentFile=/opt/suemo/surreal/%i.env
57
+ EnvironmentFile=-/opt/suemo/surreal/local.env
58
58
  ExecStart=/usr/bin/surreal start
59
59
  ExecStop=/bin/kill -s SIGTERM $MAINPID
60
60
  Restart=on-failure
@@ -77,7 +77,7 @@ StateDirectoryMode=0750
77
77
  WorkingDirectory=/var/lib/surrealdb
78
78
  StandardOutput=journal
79
79
  StandardError=journal
80
- SyslogIdentifier=suemo-surrealdb-%i
80
+ SyslogIdentifier=suemo-surreal-%i
81
81
 
82
82
  [Install]
83
83
  WantedBy=multi-user.target
@@ -484,7 +484,7 @@ function buildSurrealActions(
484
484
  {
485
485
  kind: 'run',
486
486
  command: 'systemctl',
487
- args: ['enable', '--now', `suemo-surrealdb@${profile}.service`],
487
+ args: ['enable', '--now', `suemo-surreal@${profile}.service`],
488
488
  requireRoot: true,
489
489
  },
490
490
  )
@@ -542,9 +542,9 @@ function printInitSystemSummary(kind: 'surreal' | 'fastembed', dryRun: boolean,
542
542
  console.log('✓ SurrealDB setup complete.')
543
543
  }
544
544
  if (profile) {
545
- console.log(`Service: suemo-surrealdb@${profile}.service`)
546
- console.log(`Status: systemctl status suemo-surrealdb@${profile}.service`)
547
- console.log(`Logs: journalctl -u suemo-surrealdb@${profile}.service -f`)
545
+ console.log(`Service: suemo-surreal@${profile}.service`)
546
+ console.log(`Status: systemctl status suemo-surreal@${profile}.service`)
547
+ console.log(`Logs: journalctl -u suemo-surreal@${profile}.service -f`)
548
548
  }
549
549
  return
550
550
  }
@@ -849,7 +849,7 @@ const initSurrealCmd = init.sub('surreal')
849
849
  ok: true,
850
850
  dryRun: false,
851
851
  profile,
852
- service: `suemo-surrealdb@${profile}.service`,
852
+ service: `suemo-surreal@${profile}.service`,
853
853
  credentialStatus: result.credentialStatus,
854
854
  }, flags)
855
855
  return
@@ -1,13 +1,9 @@
1
1
  import { readdirSync, readFileSync } from 'node:fs'
2
- import { basename, dirname } from 'node:path'
3
- import { fileURLToPath } from 'node:url'
2
+ import { basename, join } from 'node:path'
4
3
 
5
- const PROJECT_ROOT = dirname(
6
- fileURLToPath(import.meta.resolve('@/package.json')),
7
- )
8
-
9
- const SKILL_FILE_PATH = `${PROJECT_ROOT}/skills/suemo/SKILL.md`
10
- const SKILL_REFERENCES_DIR = `${PROJECT_ROOT}/skills/suemo/references/`
4
+ const PROJECT_ROOT = new URL('.', import.meta.resolve('@/package.json')).pathname
5
+ const SKILL_FILE_PATH = join(PROJECT_ROOT, 'skills/suemo/SKILL.md')
6
+ const SKILL_REFERENCES_DIR = join(PROJECT_ROOT, 'skills/suemo/references/')
11
7
 
12
8
  export function skillFilePath(): string {
13
9
  return SKILL_FILE_PATH
@@ -29,7 +25,7 @@ export function skillReferencePath(reference: string): string | null {
29
25
  if (!cleaned) return null
30
26
  const available = new Set(listSkillReferences())
31
27
  if (!available.has(cleaned)) return null
32
- return `${PROJECT_ROOT}/skills/suemo/references/${cleaned}.md`
28
+ return join(PROJECT_ROOT, `/skills/suemo/references/${cleaned}.md`)
33
29
  }
34
30
 
35
31
  export function readSkillReference(reference: string): { name: string; path: string; content: string } | null {