@codecell-germany/company-agent-wiki-skill 0.1.1 → 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 +137 -153
- package/dist/index.js +142 -95
- package/dist/installer.js +51 -16
- package/knowledge/ARCHITECTURE.md +3 -2
- package/knowledge/KNOWN_LIMITATIONS.md +1 -0
- package/knowledge/RELEASE_CHECKLIST.md +6 -2
- package/package.json +2 -2
- package/skills/company-agent-wiki-cli/SKILL.md +25 -7
- package/skills/company-agent-wiki-cli/references/agent-onboarding.md +3 -0
- package/skills/company-agent-wiki-cli/references/command-cheatsheet.md +3 -0
- package/skills/company-agent-wiki-cli/references/company-onboarding.md +1 -1
- package/skills/company-agent-wiki-cli/references/overview.md +1 -0
- package/skills/company-agent-wiki-cli/references/workspace-first-run.md +4 -1
package/dist/installer.js
CHANGED
|
@@ -3470,6 +3470,7 @@ var {
|
|
|
3470
3470
|
} = import_index.default;
|
|
3471
3471
|
|
|
3472
3472
|
// src/lib/constants.ts
|
|
3473
|
+
var PACKAGE_NAME = "@codecell-germany/company-agent-wiki-skill";
|
|
3473
3474
|
var CLI_NAME = "company-agent-wiki-cli";
|
|
3474
3475
|
var INSTALLER_NAME = "company-agent-wiki-skill";
|
|
3475
3476
|
var SKILL_NAME = "company-agent-wiki-cli";
|
|
@@ -3537,14 +3538,18 @@ exec "$NODE_BIN" "${runtimeScript}" "$@"
|
|
|
3537
3538
|
`;
|
|
3538
3539
|
import_node_fs2.default.writeFileSync(targetPath, content, { encoding: "utf8", mode: 493 });
|
|
3539
3540
|
}
|
|
3540
|
-
function
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3541
|
+
function getDefaultAgentsHome() {
|
|
3542
|
+
return process.env.AGENTS_HOME || import_node_path.default.join(import_node_os.default.homedir(), ".agents");
|
|
3543
|
+
}
|
|
3544
|
+
function getDefaultCodexHome() {
|
|
3545
|
+
return process.env.CODEX_HOME || import_node_path.default.join(import_node_os.default.homedir(), ".codex");
|
|
3546
|
+
}
|
|
3547
|
+
function installIntoHome(target, home, packageRoot, force = false) {
|
|
3548
|
+
const runtimeDir = import_node_path.default.join(home, "tools", SKILL_NAME);
|
|
3549
|
+
const skillDir = import_node_path.default.join(home, "skills", SKILL_NAME);
|
|
3550
|
+
const binDir = import_node_path.default.join(home, "bin");
|
|
3546
3551
|
const shimPath = import_node_path.default.join(binDir, CLI_NAME);
|
|
3547
|
-
if (
|
|
3552
|
+
if (force) {
|
|
3548
3553
|
import_node_fs2.default.rmSync(runtimeDir, { recursive: true, force: true });
|
|
3549
3554
|
import_node_fs2.default.rmSync(skillDir, { recursive: true, force: true });
|
|
3550
3555
|
import_node_fs2.default.rmSync(shimPath, { force: true });
|
|
@@ -3564,7 +3569,8 @@ function installIntoCodexHome(options) {
|
|
|
3564
3569
|
const runtimeScript = import_node_path.default.join(runtimeDir, "dist", "index.js");
|
|
3565
3570
|
writeShim(shimPath, runtimeScript);
|
|
3566
3571
|
return {
|
|
3567
|
-
|
|
3572
|
+
target,
|
|
3573
|
+
home,
|
|
3568
3574
|
binDir,
|
|
3569
3575
|
runtimeDir,
|
|
3570
3576
|
skillDir,
|
|
@@ -3573,6 +3579,31 @@ function installIntoCodexHome(options) {
|
|
|
3573
3579
|
pathHint: (process.env.PATH || "").split(import_node_path.default.delimiter).includes(binDir) ? void 0 : `The shim exists, but ${binDir} is not in PATH. Use "${shimPath}" directly or add ${binDir} to PATH.`
|
|
3574
3580
|
};
|
|
3575
3581
|
}
|
|
3582
|
+
function installIntoAgentHomes(options) {
|
|
3583
|
+
const packageRoot = resolvePackageRoot(__dirname);
|
|
3584
|
+
const agentsHome = options?.agentsHome || getDefaultAgentsHome();
|
|
3585
|
+
const codexHome = options?.codexHome || getDefaultCodexHome();
|
|
3586
|
+
const target = options?.target || "all";
|
|
3587
|
+
if (!["agents", "codex", "all"].includes(target)) {
|
|
3588
|
+
throw new Error(`Unsupported install target "${target}". Use agents, codex or all.`);
|
|
3589
|
+
}
|
|
3590
|
+
const installs = [];
|
|
3591
|
+
if (target === "agents" || target === "all") {
|
|
3592
|
+
installs.push(installIntoHome("agents", agentsHome, packageRoot, options?.force));
|
|
3593
|
+
}
|
|
3594
|
+
if (target === "codex" || target === "all") {
|
|
3595
|
+
const shouldSkipCodex = installs.some((entry) => entry.home === codexHome);
|
|
3596
|
+
if (!shouldSkipCodex) {
|
|
3597
|
+
installs.push(installIntoHome("codex", codexHome, packageRoot, options?.force));
|
|
3598
|
+
}
|
|
3599
|
+
}
|
|
3600
|
+
return {
|
|
3601
|
+
packageName: PACKAGE_NAME,
|
|
3602
|
+
installerName: INSTALLER_NAME,
|
|
3603
|
+
cliName: CLI_NAME,
|
|
3604
|
+
installs
|
|
3605
|
+
};
|
|
3606
|
+
}
|
|
3576
3607
|
|
|
3577
3608
|
// src/lib/errors.ts
|
|
3578
3609
|
var CliError = class extends Error {
|
|
@@ -3653,23 +3684,27 @@ function printJson(value) {
|
|
|
3653
3684
|
|
|
3654
3685
|
// src/installer.ts
|
|
3655
3686
|
var program2 = new Command();
|
|
3656
|
-
program2.name(INSTALLER_NAME).description("Install the Company Agent Wiki skill and CLI
|
|
3657
|
-
program2.command("install").option("--codex-home <path>", "Target Codex home directory").option("--force", "Replace an existing install", false).option("--json", "Emit JSON output", false).action((options) => {
|
|
3658
|
-
const result =
|
|
3687
|
+
program2.name(INSTALLER_NAME).description("Install the Company Agent Wiki skill and CLI for shared agent homes and Codex compatibility");
|
|
3688
|
+
program2.command("install").option("--agents-home <path>", "Target shared agents home directory").option("--codex-home <path>", "Target Codex home directory").option("--target <target>", "Install target: agents, codex or all", "all").option("--force", "Replace an existing install", false).option("--json", "Emit JSON output", false).action((options) => {
|
|
3689
|
+
const result = installIntoAgentHomes({
|
|
3690
|
+
agentsHome: options.agentsHome,
|
|
3659
3691
|
codexHome: options.codexHome,
|
|
3660
|
-
force: Boolean(options.force)
|
|
3692
|
+
force: Boolean(options.force),
|
|
3693
|
+
target: options.target
|
|
3661
3694
|
});
|
|
3662
3695
|
if (options.json) {
|
|
3663
3696
|
printJson(envelope("install", result));
|
|
3664
3697
|
return;
|
|
3665
3698
|
}
|
|
3666
|
-
|
|
3699
|
+
for (const install of result.installs) {
|
|
3700
|
+
process.stdout.write(`Installed ${install.target} target into ${install.home}
|
|
3667
3701
|
`);
|
|
3668
|
-
|
|
3702
|
+
process.stdout.write(`CLI shim: ${install.shimPath}
|
|
3669
3703
|
`);
|
|
3670
|
-
|
|
3671
|
-
|
|
3704
|
+
if (install.pathHint) {
|
|
3705
|
+
process.stdout.write(`warning: ${install.pathHint}
|
|
3672
3706
|
`);
|
|
3707
|
+
}
|
|
3673
3708
|
}
|
|
3674
3709
|
});
|
|
3675
3710
|
async function main() {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Scope
|
|
4
4
|
|
|
5
|
-
Phase 1 delivers a publishable CLI and
|
|
5
|
+
Phase 1 delivers a publishable CLI and a shared agent skill for a private, local company knowledge workspace.
|
|
6
6
|
|
|
7
7
|
The implementation is intentionally limited to:
|
|
8
8
|
|
|
@@ -46,7 +46,8 @@ The index and manifest are derived artifacts and should stay ignored in the priv
|
|
|
46
46
|
8. `search`, `route` and `read` either enforce a fresh index or can explicitly auto-rebuild when `--auto-rebuild` is set.
|
|
47
47
|
9. Runtime commands may detect the current workspace automatically when the shell is already inside a private workspace.
|
|
48
48
|
10. A global per-user workspace registry stores known workspace paths and a default workspace so other agents can resolve the knowledge location automatically on macOS, Windows and Linux.
|
|
49
|
-
11.
|
|
49
|
+
11. The installer now targets a shared `~/.agents` home as the primary skill/runtime location and also installs a Codex compatibility mirror under `~/.codex`.
|
|
50
|
+
12. `serve` exposes the same read-only data through a local web view and now distinguishes `missing`, `stale` and `ok` states with a rebuild action.
|
|
50
51
|
|
|
51
52
|
## Onboarding Model
|
|
52
53
|
|
|
@@ -30,3 +30,4 @@
|
|
|
30
30
|
- The CLI can initialize a private Git remote URL, but it does not validate remote policy or access controls.
|
|
31
31
|
- The package does not enforce OS-level filesystem permissions; the workspace owner must place the private workspace in a properly protected location.
|
|
32
32
|
- The global workspace registry is only a discovery layer, not an access-control boundary. Any agent running as the same local user can read the registered workspace path.
|
|
33
|
+
- The installer now targets a shared `~/.agents` home first and mirrors into `~/.codex` for compatibility, but it does not manage every agent product's own skill-indexing or refresh logic automatically.
|
|
@@ -66,7 +66,8 @@ Installer aus lokalem Tarball:
|
|
|
66
66
|
```bash
|
|
67
67
|
TMP="$(mktemp -d)"
|
|
68
68
|
cd "$TMP"
|
|
69
|
-
npx -y -p /absolute/path/to/codecell-germany-company-agent-wiki-skill-0.1.0.tgz company-agent-wiki-skill install --codex-home "$TMP/codex" --force
|
|
69
|
+
npx -y -p /absolute/path/to/codecell-germany-company-agent-wiki-skill-0.1.0.tgz company-agent-wiki-skill install --agents-home "$TMP/agents" --codex-home "$TMP/codex" --force
|
|
70
|
+
"$TMP/agents/bin/company-agent-wiki-cli" --help
|
|
70
71
|
"$TMP/codex/bin/company-agent-wiki-cli" --help
|
|
71
72
|
```
|
|
72
73
|
|
|
@@ -114,7 +115,8 @@ TMP="$(mktemp -d)"
|
|
|
114
115
|
CACHE="$(mktemp -d)"
|
|
115
116
|
cd "$TMP"
|
|
116
117
|
npm_config_cache="$CACHE" npx -y @codecell-germany/company-agent-wiki-skill@0.1.0 company-agent-wiki-cli --help
|
|
117
|
-
npm_config_cache="$CACHE" npx -y @codecell-germany/company-agent-wiki-skill@0.1.0 company-agent-wiki-skill install --codex-home "$TMP/codex" --force
|
|
118
|
+
npm_config_cache="$CACHE" npx -y @codecell-germany/company-agent-wiki-skill@0.1.0 company-agent-wiki-skill install --agents-home "$TMP/agents" --codex-home "$TMP/codex" --force
|
|
119
|
+
"$TMP/agents/bin/company-agent-wiki-cli" --help
|
|
118
120
|
"$TMP/codex/bin/company-agent-wiki-cli" --help
|
|
119
121
|
```
|
|
120
122
|
|
|
@@ -155,6 +157,8 @@ npx -y skills add codecell-germany/company-agent-wiki-skill -g --skill company-a
|
|
|
155
157
|
|
|
156
158
|
- CLI läuft über `company-agent-wiki-cli`
|
|
157
159
|
- Installer läuft über `company-agent-wiki-skill`
|
|
160
|
+
- Shared agent install unter `~/.agents` funktioniert
|
|
161
|
+
- Codex-Kompatibilitätsinstall unter `~/.codex` funktioniert
|
|
158
162
|
- README, Skill, Referenzen und Knowledge sind synchron
|
|
159
163
|
- `npm pack` enthält nur gewollte Dateien
|
|
160
164
|
- lokaler Tarball-Smoketest ist grün
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecell-germany/company-agent-wiki-skill",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Context is king: agent-first local company knowledge workspace with metadata-first retrieval, Markdown as truth, SQLite-indexed front matter, Git-aware verification, and a
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Context is king: agent-first local company knowledge workspace with metadata-first retrieval, Markdown as truth, SQLite-indexed front matter, Git-aware verification, and a shared agent skill installer.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "commonjs",
|
|
@@ -12,6 +12,8 @@ Use this skill when the task is about a private company knowledge workspace buil
|
|
|
12
12
|
- Git-backed history
|
|
13
13
|
- a read-only local browsing view
|
|
14
14
|
|
|
15
|
+
This package now targets a shared `~/.agents` home first so the same published package can work across multiple agent runtimes, not only Codex.
|
|
16
|
+
|
|
15
17
|
## Preconditions
|
|
16
18
|
|
|
17
19
|
- The public CLI binary is `company-agent-wiki-cli`.
|
|
@@ -19,21 +21,37 @@ Use this skill when the task is about a private company knowledge workspace buil
|
|
|
19
21
|
- The private workspace may be the current dedicated local folder; it just must not be the public skill/CLI repo.
|
|
20
22
|
- The human should provide the workspace path at least once and, if desired, the private Git remote URL. After setup or manual registration, the CLI stores the workspace path in a global per-user registry so later agents can resolve it automatically.
|
|
21
23
|
- Runtime discovery matters. Before relying on the CLI, verify which path is actually available.
|
|
22
|
-
-
|
|
23
|
-
- The `npx -p @codecell-germany/company-agent-wiki-skill
|
|
24
|
-
- `node dist/index.js` only works inside the public implementation repo after `npm run build`, not inside an arbitrary private workspace.
|
|
24
|
+
- The primary shared install target is `~/.agents`. Codex additionally gets a compatibility mirror under `~/.codex`.
|
|
25
|
+
- The preferred one-command installer path is `npx -y -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-skill install --force`. This only works after the npm package is really published.
|
|
25
26
|
- If the binary is not already installed in PATH, use these fallbacks in this order:
|
|
26
27
|
|
|
27
28
|
```bash
|
|
29
|
+
"$HOME/.agents/bin/company-agent-wiki-cli" --help
|
|
30
|
+
"$AGENTS_HOME/bin/company-agent-wiki-cli" --help
|
|
28
31
|
"$CODEX_HOME/bin/company-agent-wiki-cli" --help
|
|
29
32
|
"$HOME/.codex/bin/company-agent-wiki-cli" --help
|
|
30
|
-
|
|
33
|
+
company-agent-wiki-cli --help
|
|
34
|
+
npx -y -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-skill install --force
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
If you are actively developing inside the public implementation repo, the repo-local fallback also exists:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
"$HOME/.agents/bin/company-agent-wiki-cli" --help
|
|
41
|
+
"$CODEX_HOME/bin/company-agent-wiki-cli" --help
|
|
31
42
|
node dist/index.js --help
|
|
32
43
|
```
|
|
33
44
|
|
|
34
45
|
## First Run
|
|
35
46
|
|
|
36
|
-
1.
|
|
47
|
+
1. Start with the shared agent shim path:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
"$HOME/.agents/bin/company-agent-wiki-cli" --help
|
|
51
|
+
"$AGENTS_HOME/bin/company-agent-wiki-cli" --help
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
If you are in Codex, the compatibility shim also works:
|
|
37
55
|
|
|
38
56
|
```bash
|
|
39
57
|
"$CODEX_HOME/bin/company-agent-wiki-cli" --help
|
|
@@ -46,10 +64,10 @@ If that fails, try the PATH binary as a convenience fallback:
|
|
|
46
64
|
company-agent-wiki-cli --help
|
|
47
65
|
```
|
|
48
66
|
|
|
49
|
-
|
|
67
|
+
If the CLI is not installed yet and the package is already published, install it with one command:
|
|
50
68
|
|
|
51
69
|
```bash
|
|
52
|
-
npx -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-
|
|
70
|
+
npx -y -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-skill install --force
|
|
53
71
|
```
|
|
54
72
|
|
|
55
73
|
2. If no private workspace exists yet, create one:
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
## Use This Sequence
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
+
npx -y -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-skill install --force
|
|
7
|
+
"$HOME/.agents/bin/company-agent-wiki-cli" --help
|
|
8
|
+
"$AGENTS_HOME/bin/company-agent-wiki-cli" --help
|
|
6
9
|
"$CODEX_HOME/bin/company-agent-wiki-cli" --help
|
|
7
10
|
"$HOME/.codex/bin/company-agent-wiki-cli" --help
|
|
8
11
|
company-agent-wiki-cli --help
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
## Workspace
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
+
npx -y -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-skill install --force
|
|
7
|
+
"$HOME/.agents/bin/company-agent-wiki-cli" --help
|
|
8
|
+
"$AGENTS_HOME/bin/company-agent-wiki-cli" --help
|
|
6
9
|
"$CODEX_HOME/bin/company-agent-wiki-cli" --help
|
|
7
10
|
"$HOME/.codex/bin/company-agent-wiki-cli" --help
|
|
8
11
|
company-agent-wiki-cli about --json
|
|
@@ -59,7 +59,7 @@ If target files already exist, the CLI refuses the write unless `--force` is add
|
|
|
59
59
|
|
|
60
60
|
```json
|
|
61
61
|
{
|
|
62
|
-
"answeredBy": "
|
|
62
|
+
"answeredBy": "AI Agent",
|
|
63
63
|
"notes": ["Buchhaltung zuerst priorisieren"],
|
|
64
64
|
"answers": {
|
|
65
65
|
"official_legal_name": "Beispiel GmbH",
|
|
@@ -25,12 +25,15 @@ The workspace path only has to be provided once. After setup or manual registrat
|
|
|
25
25
|
Before relying on the CLI, verify a real executable path:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
+
npx -y -p @codecell-germany/company-agent-wiki-skill company-agent-wiki-skill install --force
|
|
29
|
+
"$HOME/.agents/bin/company-agent-wiki-cli" --help
|
|
30
|
+
"$AGENTS_HOME/bin/company-agent-wiki-cli" --help
|
|
28
31
|
"$CODEX_HOME/bin/company-agent-wiki-cli" --help
|
|
29
32
|
"$HOME/.codex/bin/company-agent-wiki-cli" --help
|
|
30
33
|
company-agent-wiki-cli --help
|
|
31
34
|
```
|
|
32
35
|
|
|
33
|
-
The package-based `npx` path is only valid once the npm package is published.
|
|
36
|
+
The package-based `npx` installer path is only valid once the npm package is published.
|
|
34
37
|
|
|
35
38
|
If the current folder is already inside a private workspace, runtime commands may omit `--workspace`.
|
|
36
39
|
If not, inspect or update the global registry:
|