@first-tree-ai/context-tree 0.1.7-alpha.202609010710 → 0.1.7

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 (37) hide show
  1. package/README.md +35 -38
  2. package/dist/cli/index.mjs +923 -647
  3. package/package.json +7 -28
  4. package/scripts/postinstall.mjs +53 -0
  5. package/skills/context-tree-connect/SKILL.md +9 -7
  6. package/skills/context-tree-create/SKILL.md +10 -10
  7. package/skills/context-tree-publish/SKILL.md +4 -8
  8. package/skills/context-tree-read/SKILL.md +32 -12
  9. package/skills/context-tree-setup/SKILL.md +7 -12
  10. package/skills/context-tree-write/SKILL.md +196 -17
  11. package/.agents/plugins/marketplace.json +0 -19
  12. package/.claude-plugin/marketplace.json +0 -21
  13. package/.claude-plugin/plugin.json +0 -16
  14. package/.codex-plugin/plugin.json +0 -36
  15. package/dist/cli/index.d.mts +0 -1
  16. package/dist/index.d.mts +0 -77
  17. package/dist/index.mjs +0 -1449
  18. package/dist/schemas-C_7izpsa.d.mts +0 -390
  19. package/dist/schemas-DKHE1sWt.mjs +0 -289
  20. package/dist/schemas.d.mts +0 -2
  21. package/dist/schemas.mjs +0 -2
  22. package/docs/specification.md +0 -160
  23. package/examples/basic/NODE.md +0 -15
  24. package/examples/basic/members/NODE.md +0 -8
  25. package/examples/basic/members/example-agent/NODE.md +0 -7
  26. package/examples/basic/members/example-agent/memory.md +0 -9
  27. package/examples/basic/systems/NODE.md +0 -10
  28. package/examples/basic/systems/runtime.md +0 -15
  29. package/hooks/hooks.json +0 -26
  30. package/hooks/session-start.mjs +0 -55
  31. package/policy/context-tree-policy.md +0 -156
  32. package/skills/context-tree-connect/scripts/context-tree.mjs +0 -41
  33. package/skills/context-tree-create/scripts/context-tree.mjs +0 -41
  34. package/skills/context-tree-publish/scripts/context-tree.mjs +0 -41
  35. package/skills/context-tree-read/scripts/context-tree.mjs +0 -41
  36. package/skills/context-tree-setup/scripts/context-tree.mjs +0 -41
  37. package/skills/context-tree-write/scripts/context-tree.mjs +0 -41
@@ -1,41 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { spawnSync } from "node:child_process";
4
- import { lstatSync, readFileSync, realpathSync } from "node:fs";
5
- import { dirname, isAbsolute, relative, resolve } from "node:path";
6
- import { fileURLToPath } from "node:url";
7
-
8
- const PACKAGE_NAME = "@first-tree-ai/context-tree";
9
- const REINSTALL_MESSAGE = "Context Tree packaged CLI is unavailable. Reinstall or update the Context Tree plugin.";
10
-
11
- function packagedCli() {
12
- try {
13
- const packageRoot = realpathSync(resolve(dirname(fileURLToPath(import.meta.url)), "../../.."));
14
- const packageJson = resolve(packageRoot, "package.json");
15
- const cli = resolve(packageRoot, "dist/cli/index.mjs");
16
- if (lstatSync(packageJson).isSymbolicLink() || !lstatSync(packageJson).isFile()) return undefined;
17
- if (JSON.parse(readFileSync(packageJson, "utf8")).name !== PACKAGE_NAME) return undefined;
18
- if (lstatSync(cli).isSymbolicLink() || !lstatSync(cli).isFile()) return undefined;
19
- const realCli = realpathSync(cli);
20
- const containedPath = relative(packageRoot, realCli);
21
- return containedPath !== "" && !containedPath.startsWith("..") && !isAbsolute(containedPath) ? realCli : undefined;
22
- } catch {
23
- return undefined;
24
- }
25
- }
26
-
27
- function forward(result) {
28
- if (result.error !== undefined) {
29
- process.stderr.write(`${REINSTALL_MESSAGE}\n`);
30
- process.exit(1);
31
- }
32
- if (result.signal !== null) process.kill(process.pid, result.signal);
33
- process.exit(result.status ?? 1);
34
- }
35
-
36
- const cli = packagedCli();
37
- if (cli === undefined) {
38
- process.stderr.write(`${REINSTALL_MESSAGE}\n`);
39
- process.exit(1);
40
- }
41
- forward(spawnSync(process.execPath, [cli, ...process.argv.slice(2)], { stdio: "inherit" }));
@@ -1,41 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { spawnSync } from "node:child_process";
4
- import { lstatSync, readFileSync, realpathSync } from "node:fs";
5
- import { dirname, isAbsolute, relative, resolve } from "node:path";
6
- import { fileURLToPath } from "node:url";
7
-
8
- const PACKAGE_NAME = "@first-tree-ai/context-tree";
9
- const REINSTALL_MESSAGE = "Context Tree packaged CLI is unavailable. Reinstall or update the Context Tree plugin.";
10
-
11
- function packagedCli() {
12
- try {
13
- const packageRoot = realpathSync(resolve(dirname(fileURLToPath(import.meta.url)), "../../.."));
14
- const packageJson = resolve(packageRoot, "package.json");
15
- const cli = resolve(packageRoot, "dist/cli/index.mjs");
16
- if (lstatSync(packageJson).isSymbolicLink() || !lstatSync(packageJson).isFile()) return undefined;
17
- if (JSON.parse(readFileSync(packageJson, "utf8")).name !== PACKAGE_NAME) return undefined;
18
- if (lstatSync(cli).isSymbolicLink() || !lstatSync(cli).isFile()) return undefined;
19
- const realCli = realpathSync(cli);
20
- const containedPath = relative(packageRoot, realCli);
21
- return containedPath !== "" && !containedPath.startsWith("..") && !isAbsolute(containedPath) ? realCli : undefined;
22
- } catch {
23
- return undefined;
24
- }
25
- }
26
-
27
- function forward(result) {
28
- if (result.error !== undefined) {
29
- process.stderr.write(`${REINSTALL_MESSAGE}\n`);
30
- process.exit(1);
31
- }
32
- if (result.signal !== null) process.kill(process.pid, result.signal);
33
- process.exit(result.status ?? 1);
34
- }
35
-
36
- const cli = packagedCli();
37
- if (cli === undefined) {
38
- process.stderr.write(`${REINSTALL_MESSAGE}\n`);
39
- process.exit(1);
40
- }
41
- forward(spawnSync(process.execPath, [cli, ...process.argv.slice(2)], { stdio: "inherit" }));