yggdrasil-memory 0.1.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.
- package/LICENSE +99 -0
- package/README.md +35 -0
- package/bin/ygg.js +82 -0
- package/package.json +35 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Yggdrasil is licensed under the Elastic License 2.0.
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Yggdrasil contributors (the "Licensor").
|
|
4
|
+
|
|
5
|
+
Canonical text: https://www.elastic.co/licensing/elastic-license
|
|
6
|
+
|
|
7
|
+
-------------------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
Elastic License 2.0
|
|
10
|
+
|
|
11
|
+
## Acceptance
|
|
12
|
+
|
|
13
|
+
By using the software, you agree to all of the terms and conditions below.
|
|
14
|
+
|
|
15
|
+
## Copyright License
|
|
16
|
+
|
|
17
|
+
The licensor grants you a non-exclusive, royalty-free, worldwide,
|
|
18
|
+
non-sublicensable, non-transferable license to use, copy, distribute, make
|
|
19
|
+
available, and prepare derivative works of the software, in each case subject to
|
|
20
|
+
the limitations and conditions below.
|
|
21
|
+
|
|
22
|
+
## Limitations
|
|
23
|
+
|
|
24
|
+
You may not provide the software to third parties as a hosted or managed
|
|
25
|
+
service, where the service provides users with access to any substantial set of
|
|
26
|
+
the features or functionality of the software.
|
|
27
|
+
|
|
28
|
+
You may not move, change, disable, or circumvent the license key functionality
|
|
29
|
+
in the software, and you may not remove or obscure any functionality in the
|
|
30
|
+
software that is protected by the license key.
|
|
31
|
+
|
|
32
|
+
You may not alter, remove, or obscure any licensing, copyright, or other notices
|
|
33
|
+
of the licensor in the software. Any use of the licensor's trademarks is subject
|
|
34
|
+
to applicable law.
|
|
35
|
+
|
|
36
|
+
## Patents
|
|
37
|
+
|
|
38
|
+
The licensor grants you a license, under any patent claims the licensor can
|
|
39
|
+
license, or becomes able to license, to make, have made, use, sell, offer for
|
|
40
|
+
sale, import and have imported the software, in each case subject to the
|
|
41
|
+
limitations and conditions in this license. This license does not cover any
|
|
42
|
+
patent claims that you cause to be infringed by modifications or additions to
|
|
43
|
+
the software. If you or your company make any written claim that the software
|
|
44
|
+
infringes or contributes to infringement of any patent, your patent license for
|
|
45
|
+
the software granted under these terms ends immediately. If your company makes
|
|
46
|
+
such a claim, your patent license ends immediately for work on behalf of your
|
|
47
|
+
company.
|
|
48
|
+
|
|
49
|
+
## Notices
|
|
50
|
+
|
|
51
|
+
You must ensure that anyone who gets a copy of any part of the software from you
|
|
52
|
+
also gets a copy of these terms.
|
|
53
|
+
|
|
54
|
+
If you modify the software, you must include in any modified copies of the
|
|
55
|
+
software prominent notices stating that you have modified the software.
|
|
56
|
+
|
|
57
|
+
## No Other Rights
|
|
58
|
+
|
|
59
|
+
These terms do not imply any licenses other than those expressly granted in
|
|
60
|
+
these terms.
|
|
61
|
+
|
|
62
|
+
## Termination
|
|
63
|
+
|
|
64
|
+
If you use the software in violation of these terms, such use is not licensed,
|
|
65
|
+
and your licenses will automatically terminate. If the licensor provides you
|
|
66
|
+
with a notice of your violation, and you cease all violation of this license no
|
|
67
|
+
later than 30 days after you receive that notice, your licenses will be
|
|
68
|
+
reinstated retroactively. However, if you violate these terms after such
|
|
69
|
+
reinstatement, any additional violation of these terms will cause your licenses
|
|
70
|
+
to terminate automatically and permanently.
|
|
71
|
+
|
|
72
|
+
## No Liability
|
|
73
|
+
|
|
74
|
+
*As far as the law allows, the software comes as is, without any warranty or
|
|
75
|
+
condition, and the licensor will not be liable to you for any damages arising
|
|
76
|
+
out of these terms or the use or nature of the software, under any kind of legal
|
|
77
|
+
claim.*
|
|
78
|
+
|
|
79
|
+
## Definitions
|
|
80
|
+
|
|
81
|
+
The **licensor** is the entity offering these terms, and the **software** is the
|
|
82
|
+
software the licensor makes available under these terms, including any portion of
|
|
83
|
+
it.
|
|
84
|
+
|
|
85
|
+
**you** refers to the individual or entity agreeing to these terms.
|
|
86
|
+
|
|
87
|
+
**your company** is any legal entity, sole proprietorship, or other kind of
|
|
88
|
+
organization that you work for, plus all organizations that have control over,
|
|
89
|
+
are under the control of, or are under common control with that organization.
|
|
90
|
+
**control** means ownership of substantially all the assets of an entity, or the
|
|
91
|
+
power to direct its management and policies by vote, contract, or otherwise.
|
|
92
|
+
Control can be direct or indirect.
|
|
93
|
+
|
|
94
|
+
**your licenses** are all the licenses granted to you for the software under
|
|
95
|
+
these terms.
|
|
96
|
+
|
|
97
|
+
**use** means anything you do with the software requiring one of your licenses.
|
|
98
|
+
|
|
99
|
+
**trademark** means trademarks, service marks, and similar rights.
|
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# yggdrasil-memory (npm launcher)
|
|
2
|
+
|
|
3
|
+
> One shared, durable memory for all your AI coding agents — MCP, local-first, zero-dependency.
|
|
4
|
+
|
|
5
|
+
This npm package is a **thin launcher**. Yggdrasil's engine is pure Python; this
|
|
6
|
+
package makes sure a runner is available (it prefers [`uv`](https://docs.astral.sh/uv/),
|
|
7
|
+
which can fetch a managed Python on its own) and then runs the Python package
|
|
8
|
+
[`yggdrasil-memory`](https://pypi.org/project/yggdrasil-memory/), forwarding every
|
|
9
|
+
argument. So this works even on a machine with no Python installed:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx yggdrasil-memory install # guided setup: models, background service, MCP registration
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Everything after `install` is forwarded to the `ygg` CLI:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx yggdrasil-memory doctor
|
|
19
|
+
npx yggdrasil-memory recall --query "flaky websocket reconnect"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Or install the launcher globally to get the `ygg` command:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g yggdrasil-memory
|
|
26
|
+
ygg install
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Prefer the native channels?** `uvx --from yggdrasil-memory ygg install`,
|
|
30
|
+
`pipx install yggdrasil-memory`, `pip install yggdrasil-memory`, or
|
|
31
|
+
`brew install VonderVuflya/tap/yggdrasil` — they all install the same engine.
|
|
32
|
+
|
|
33
|
+
Full docs, FAQ, and translations: **https://github.com/VonderVuflya/yggdrasil**
|
|
34
|
+
|
|
35
|
+
Licensed under the Elastic License 2.0 (source-available). See `LICENSE`.
|
package/bin/ygg.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
* Yggdrasil npm launcher.
|
|
6
|
+
*
|
|
7
|
+
* Yggdrasil's engine is pure Python. This package is a thin launcher: it makes
|
|
8
|
+
* sure a runner is available (prefers `uv`/`uvx`, which can fetch a managed
|
|
9
|
+
* Python on its own), then runs the published Python package `yggdrasil-memory`
|
|
10
|
+
* and forwards every argument. So `npx yggdrasil-memory install` works even on
|
|
11
|
+
* a machine without Python.
|
|
12
|
+
*
|
|
13
|
+
* Env overrides:
|
|
14
|
+
* YGG_NPM_SOURCE install source for uvx/pipx (default: "yggdrasil-memory").
|
|
15
|
+
* Use a wheel path or "git+https://github.com/VonderVuflya/yggdrasil.git" to test.
|
|
16
|
+
* YGG_NO_BOOTSTRAP set to "1" to never auto-install uv.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const { spawnSync } = require('child_process');
|
|
20
|
+
const os = require('os');
|
|
21
|
+
const path = require('path');
|
|
22
|
+
|
|
23
|
+
const SOURCE = process.env.YGG_NPM_SOURCE || 'yggdrasil-memory';
|
|
24
|
+
const args = process.argv.slice(2);
|
|
25
|
+
|
|
26
|
+
function has(cmd) {
|
|
27
|
+
const r = spawnSync(cmd, ['--version'], { stdio: 'ignore' });
|
|
28
|
+
return !r.error && r.status === 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function run(cmd, cmdArgs) {
|
|
32
|
+
const r = spawnSync(cmd, cmdArgs, { stdio: 'inherit' });
|
|
33
|
+
if (r.error) return null;
|
|
34
|
+
return r.status === null ? 1 : r.status;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function ensureUv() {
|
|
38
|
+
if (process.env.YGG_NO_BOOTSTRAP === '1') return false;
|
|
39
|
+
process.stderr.write(
|
|
40
|
+
'yggdrasil: uv not found — installing it once via https://astral.sh/uv ...\n'
|
|
41
|
+
);
|
|
42
|
+
const r = process.platform === 'win32'
|
|
43
|
+
? spawnSync('powershell', ['-NoProfile', '-ExecutionPolicy', 'ByPass', '-Command',
|
|
44
|
+
'irm https://astral.sh/uv/install.ps1 | iex'], { stdio: 'inherit' })
|
|
45
|
+
: spawnSync('sh', ['-c', 'curl -LsSf https://astral.sh/uv/install.sh | sh'], { stdio: 'inherit' });
|
|
46
|
+
return !r.error && r.status === 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function freshUvBin() {
|
|
50
|
+
// uv's installer drops the binary in ~/.local/bin by default.
|
|
51
|
+
const home = os.homedir();
|
|
52
|
+
return process.platform === 'win32'
|
|
53
|
+
? path.join(home, '.local', 'bin', 'uv.exe')
|
|
54
|
+
: path.join(home, '.local', 'bin', 'uv');
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
let code = null;
|
|
58
|
+
if (has('uvx')) {
|
|
59
|
+
code = run('uvx', ['--from', SOURCE, 'ygg', ...args]);
|
|
60
|
+
} else if (has('uv')) {
|
|
61
|
+
code = run('uv', ['tool', 'run', '--from', SOURCE, 'ygg', ...args]);
|
|
62
|
+
} else if (has('pipx')) {
|
|
63
|
+
code = run('pipx', ['run', '--spec', SOURCE, 'ygg', ...args]);
|
|
64
|
+
} else if (ensureUv()) {
|
|
65
|
+
// PATH in this process may not see the freshly installed uv yet — call it directly.
|
|
66
|
+
code = run(freshUvBin(), ['tool', 'run', '--from', SOURCE, 'ygg', ...args]);
|
|
67
|
+
if (code === null && has('uv')) {
|
|
68
|
+
code = run('uv', ['tool', 'run', '--from', SOURCE, 'ygg', ...args]);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (code === null) {
|
|
73
|
+
process.stderr.write(
|
|
74
|
+
'\nyggdrasil: could not find or bootstrap a runner.\n' +
|
|
75
|
+
'Install one of these, then re-run:\n' +
|
|
76
|
+
' - uv https://docs.astral.sh/uv/ (recommended; handles Python for you)\n' +
|
|
77
|
+
' - pipx https://pipx.pypa.io/\n' +
|
|
78
|
+
'Or install the Python package directly: pip install yggdrasil-memory\n'
|
|
79
|
+
);
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
process.exit(code);
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "yggdrasil-memory",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Installer/launcher for Yggdrasil — one shared, durable memory for your AI coding agents (MCP, local-first). Bootstraps the Python core via uv, so `npx yggdrasil-memory` works even without a preinstalled Python.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"ygg": "bin/ygg.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin/",
|
|
10
|
+
"README.md",
|
|
11
|
+
"LICENSE"
|
|
12
|
+
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=16"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"mcp",
|
|
18
|
+
"memory",
|
|
19
|
+
"ai-agents",
|
|
20
|
+
"claude",
|
|
21
|
+
"codex",
|
|
22
|
+
"local-first",
|
|
23
|
+
"obsidian",
|
|
24
|
+
"yggdrasil"
|
|
25
|
+
],
|
|
26
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
27
|
+
"homepage": "https://github.com/VonderVuflya/yggdrasil#readme",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/VonderVuflya/yggdrasil.git"
|
|
31
|
+
},
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/VonderVuflya/yggdrasil/issues"
|
|
34
|
+
}
|
|
35
|
+
}
|