@netsirk/hippocampe 0.0.0-stage → 0.6.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.
Files changed (3) hide show
  1. package/bin/hippo.js +30 -0
  2. package/package.json +17 -4
  3. package/README.md +0 -3
package/bin/hippo.js ADDED
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ // Runs the executable of this platform, with where its PostgreSQL binaries are: the package of
3
+ // the platform carries both, as esbuild carries its own.
4
+ 'use strict'
5
+ const { spawnSync } = require('node:child_process')
6
+ const { dirname, join } = require('node:path')
7
+
8
+ const platform = `${process.platform}-${process.arch}`
9
+ /** The folder of an installed package, looked for from `from` (this package by default). */
10
+ const found = (name, from) => {
11
+ try {
12
+ return dirname(
13
+ require.resolve(`${name}/package.json`, from === undefined ? {} : { paths: [from] }),
14
+ )
15
+ } catch {
16
+ return undefined
17
+ }
18
+ }
19
+ const own = found(`@netsirk/hippocampe-${platform}`)
20
+ if (own === undefined) {
21
+ console.error(`Hippocampe has no build for ${platform} yet: Linux x64 only, for now.`)
22
+ process.exit(1)
23
+ }
24
+ // A dependency of the package of the platform: looked for from there.
25
+ const postgres = found(`@embedded-postgres/${platform}`, own)
26
+ const executable = join(own, 'bin', 'hippo')
27
+ const env = { ...process.env, HIPPOCAMPE_EXECUTABLE: executable }
28
+ if (postgres !== undefined) env.HIPPOCAMPE_POSTGRES_BINARIES = join(postgres, 'native')
29
+ const ran = spawnSync(executable, process.argv.slice(2), { stdio: 'inherit', env })
30
+ process.exit(ran.status ?? 1)
package/package.json CHANGED
@@ -1,6 +1,19 @@
1
1
  {
2
2
  "name": "@netsirk/hippocampe",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.6.0",
4
+ "description": "Hippocampe, a personal knowledge system kept by AI agents: the server, its MCP tools and its command line.",
5
+ "license": "AGPL-3.0-only",
6
+ "repository": "github:KristenJestin/hippocampe",
7
+ "bin": {
8
+ "hippo": "bin/hippo.js"
9
+ },
10
+ "files": [
11
+ "bin"
12
+ ],
13
+ "optionalDependencies": {
14
+ "@netsirk/hippocampe-linux-x64": "0.6.0"
15
+ },
16
+ "engines": {
17
+ "node": ">=20"
18
+ }
19
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.