@pirol/charta 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/README.md +17 -0
- package/bin/charta.js +31 -0
- package/package.json +26 -0
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# @pirol/charta
|
|
2
|
+
|
|
3
|
+
Reference toolchain for [Company as Code](https://github.com/Pirol-ai/company-as-code): describe
|
|
4
|
+
your company as plain markdown files with typed frontmatter — validated like code, readable by
|
|
5
|
+
agents.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npm i -g @pirol/charta
|
|
9
|
+
|
|
10
|
+
charta validate . # is the description intact?
|
|
11
|
+
charta query orphans . # what does nothing reference?
|
|
12
|
+
charta plan . # what would this change touch?
|
|
13
|
+
charta mcp . # serve the company graph to any MCP-capable agent
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
This package installs the prebuilt binary for your platform via optional dependencies
|
|
17
|
+
(macOS arm64/x64, Linux x64, Windows x64). Apache-2.0.
|
package/bin/charta.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Thin launcher: resolves the platform binary package (esbuild pattern) and execs it.
|
|
3
|
+
const { spawnSync } = require("child_process");
|
|
4
|
+
|
|
5
|
+
const platforms = {
|
|
6
|
+
"darwin-arm64": "@pirol/charta-darwin-arm64",
|
|
7
|
+
"darwin-x64": "@pirol/charta-darwin-x64",
|
|
8
|
+
"linux-x64": "@pirol/charta-linux-x64",
|
|
9
|
+
"win32-x64": "@pirol/charta-win32-x64",
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const key = `${process.platform}-${process.arch}`;
|
|
13
|
+
const pkg = platforms[key];
|
|
14
|
+
if (!pkg) {
|
|
15
|
+
console.error(`charta: unsupported platform ${key} — download a binary from GitHub releases instead`);
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let bin;
|
|
20
|
+
try {
|
|
21
|
+
bin = require.resolve(`${pkg}/bin/charta${process.platform === "win32" ? ".exe" : ""}`);
|
|
22
|
+
} catch {
|
|
23
|
+
console.error(
|
|
24
|
+
`charta: platform package ${pkg} is missing.\n` +
|
|
25
|
+
`Reinstall with optional dependencies enabled (do not use --no-optional / --omit=optional).`
|
|
26
|
+
);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const result = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
|
|
31
|
+
process.exit(result.status ?? 1);
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pirol/charta",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Company as Code — reference toolchain (validate, query, plan, MCP server)",
|
|
5
|
+
"bin": {
|
|
6
|
+
"charta": "bin/charta.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin"
|
|
10
|
+
],
|
|
11
|
+
"license": "Apache-2.0",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/Pirol-ai/company-as-code.git"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://company-as-code.org",
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=18"
|
|
19
|
+
},
|
|
20
|
+
"optionalDependencies": {
|
|
21
|
+
"@pirol/charta-darwin-arm64": "0.1.0",
|
|
22
|
+
"@pirol/charta-darwin-x64": "0.1.0",
|
|
23
|
+
"@pirol/charta-linux-x64": "0.1.0",
|
|
24
|
+
"@pirol/charta-win32-x64": "0.1.0"
|
|
25
|
+
}
|
|
26
|
+
}
|