broader-vids 0.1.0 → 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/LICENSE +21 -21
- package/README.md +133 -114
- package/bin/broader-vids.cjs +482 -482
- package/bin/plugin-install.cjs +99 -99
- package/bin/profile-data.cjs +327 -327
- package/bin/runtime-lock.cjs +151 -151
- package/docs/ARCHITECTURE.md +398 -396
- package/docs/REFERENCE.md +113 -26
- package/docs/SCORING.md +501 -501
- package/docs/WORKFLOW.md +447 -443
- package/package.json +51 -48
- package/plugin.json +28 -28
- package/python/asr-requirements.txt +315 -315
- package/python/broader_vids-0.1.3-py3-none-any.whl +0 -0
- package/python/core-requirements.txt +4 -4
- package/python/evidence-requirements.txt +640 -640
- package/skills/broader-vids/SKILL.md +269 -269
- package/skills/broader-vids/agents/openai.yaml +4 -4
- package/skills/broader-vids-clean/SKILL.md +42 -42
- package/skills/broader-vids-clean/agents/openai.yaml +4 -4
- package/skills/broader-vids-dashboard/SKILL.md +69 -69
- package/skills/broader-vids-dashboard/agents/openai.yaml +4 -4
- package/skills/broader-vids-reset/SKILL.md +42 -42
- package/skills/broader-vids-reset/agents/openai.yaml +4 -4
- package/skills/broader-vids-setup/SKILL.md +193 -193
- package/skills/broader-vids-setup/agents/openai.yaml +4 -4
- package/python/broader_vids-0.1.0-py3-none-any.whl +0 -0
package/bin/plugin-install.cjs
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const fs = require("node:fs");
|
|
4
|
-
const os = require("node:os");
|
|
5
|
-
const path = require("node:path");
|
|
6
|
-
const { randomUUID } = require("node:crypto");
|
|
7
|
-
|
|
8
|
-
function resolveCodex(env = process.env, platform = process.platform) {
|
|
9
|
-
if (platform !== "win32") return ["codex", []];
|
|
10
|
-
const directories = (env.PATH || env.Path || "").split(path.delimiter);
|
|
11
|
-
for (const directory of directories) {
|
|
12
|
-
const folder = directory.replace(/^"(.*)"$/, "$1");
|
|
13
|
-
if (!folder) continue;
|
|
14
|
-
const executable = path.join(folder, "codex.exe");
|
|
15
|
-
if (fs.existsSync(executable)) return [executable, []];
|
|
16
|
-
const script = path.join(
|
|
17
|
-
folder,
|
|
18
|
-
"node_modules",
|
|
19
|
-
"@openai",
|
|
20
|
-
"codex",
|
|
21
|
-
"bin",
|
|
22
|
-
"codex.js",
|
|
23
|
-
);
|
|
24
|
-
if (fs.existsSync(script)) return [process.execPath, [script]];
|
|
25
|
-
}
|
|
26
|
-
throw new Error(
|
|
27
|
-
"Install Codex CLI and add it to PATH before installing the plugin.",
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function installPlugin(version, run, env = process.env) {
|
|
32
|
-
const [command, prefix] = resolveCodex(env);
|
|
33
|
-
const home = path.resolve(
|
|
34
|
-
env.CODEX_HOME || path.join(os.homedir(), ".codex"),
|
|
35
|
-
);
|
|
36
|
-
const root = path.join(home, "broader-vids-npm");
|
|
37
|
-
const directory = path.join(root, ".agents", "plugins");
|
|
38
|
-
for (const folder of [root, path.join(root, ".agents"), directory]) {
|
|
39
|
-
fs.mkdirSync(folder, { recursive: true });
|
|
40
|
-
if (fs.lstatSync(folder).isSymbolicLink())
|
|
41
|
-
throw new Error(
|
|
42
|
-
"The managed marketplace must not contain symbolic links.",
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
const lock = path.join(root, "install.lock");
|
|
46
|
-
let handle;
|
|
47
|
-
try {
|
|
48
|
-
handle = fs.openSync(lock, "wx", 0o600);
|
|
49
|
-
} catch (error) {
|
|
50
|
-
if (error.code === "EEXIST")
|
|
51
|
-
throw new Error(
|
|
52
|
-
"Another plugin installation holds this marketplace. Wait for it to finish.",
|
|
53
|
-
);
|
|
54
|
-
throw error;
|
|
55
|
-
}
|
|
56
|
-
const catalog = path.join(directory, "marketplace.json");
|
|
57
|
-
const temporary = path.join(directory, `.${randomUUID()}.tmp`);
|
|
58
|
-
try {
|
|
59
|
-
if (fs.existsSync(catalog) && fs.lstatSync(catalog).isSymbolicLink())
|
|
60
|
-
throw new Error("The managed catalog must not be a symbolic link.");
|
|
61
|
-
const marketplace = {
|
|
62
|
-
name: "broader-vids-npm",
|
|
63
|
-
interface: { displayName: "Broader Vids (npm)" },
|
|
64
|
-
plugins: [
|
|
65
|
-
{
|
|
66
|
-
name: "broader-vids",
|
|
67
|
-
source: {
|
|
68
|
-
source: "npm",
|
|
69
|
-
package: "broader-vids",
|
|
70
|
-
version,
|
|
71
|
-
registry: "https://registry.npmjs.org",
|
|
72
|
-
},
|
|
73
|
-
policy: { installation: "AVAILABLE", authentication: "ON_USE" },
|
|
74
|
-
category: "Productivity",
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
};
|
|
78
|
-
fs.writeFileSync(temporary, JSON.stringify(marketplace, null, 2) + "\n", {
|
|
79
|
-
flag: "wx",
|
|
80
|
-
mode: 0o600,
|
|
81
|
-
});
|
|
82
|
-
fs.renameSync(temporary, catalog);
|
|
83
|
-
run(command, [...prefix, "plugin", "marketplace", "add", root]);
|
|
84
|
-
run(command, [...prefix, "plugin", "add", "broader-vids@broader-vids-npm"]);
|
|
85
|
-
return { status: "installed", marketplace: marketplace.name, version };
|
|
86
|
-
} finally {
|
|
87
|
-
try {
|
|
88
|
-
fs.rmSync(temporary, { force: true });
|
|
89
|
-
} finally {
|
|
90
|
-
try {
|
|
91
|
-
fs.closeSync(handle);
|
|
92
|
-
} finally {
|
|
93
|
-
fs.unlinkSync(lock);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
module.exports = { installPlugin, resolveCodex };
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const fs = require("node:fs");
|
|
4
|
+
const os = require("node:os");
|
|
5
|
+
const path = require("node:path");
|
|
6
|
+
const { randomUUID } = require("node:crypto");
|
|
7
|
+
|
|
8
|
+
function resolveCodex(env = process.env, platform = process.platform) {
|
|
9
|
+
if (platform !== "win32") return ["codex", []];
|
|
10
|
+
const directories = (env.PATH || env.Path || "").split(path.delimiter);
|
|
11
|
+
for (const directory of directories) {
|
|
12
|
+
const folder = directory.replace(/^"(.*)"$/, "$1");
|
|
13
|
+
if (!folder) continue;
|
|
14
|
+
const executable = path.join(folder, "codex.exe");
|
|
15
|
+
if (fs.existsSync(executable)) return [executable, []];
|
|
16
|
+
const script = path.join(
|
|
17
|
+
folder,
|
|
18
|
+
"node_modules",
|
|
19
|
+
"@openai",
|
|
20
|
+
"codex",
|
|
21
|
+
"bin",
|
|
22
|
+
"codex.js",
|
|
23
|
+
);
|
|
24
|
+
if (fs.existsSync(script)) return [process.execPath, [script]];
|
|
25
|
+
}
|
|
26
|
+
throw new Error(
|
|
27
|
+
"Install Codex CLI and add it to PATH before installing the plugin.",
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function installPlugin(version, run, env = process.env) {
|
|
32
|
+
const [command, prefix] = resolveCodex(env);
|
|
33
|
+
const home = path.resolve(
|
|
34
|
+
env.CODEX_HOME || path.join(os.homedir(), ".codex"),
|
|
35
|
+
);
|
|
36
|
+
const root = path.join(home, "broader-vids-npm");
|
|
37
|
+
const directory = path.join(root, ".agents", "plugins");
|
|
38
|
+
for (const folder of [root, path.join(root, ".agents"), directory]) {
|
|
39
|
+
fs.mkdirSync(folder, { recursive: true });
|
|
40
|
+
if (fs.lstatSync(folder).isSymbolicLink())
|
|
41
|
+
throw new Error(
|
|
42
|
+
"The managed marketplace must not contain symbolic links.",
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
const lock = path.join(root, "install.lock");
|
|
46
|
+
let handle;
|
|
47
|
+
try {
|
|
48
|
+
handle = fs.openSync(lock, "wx", 0o600);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
if (error.code === "EEXIST")
|
|
51
|
+
throw new Error(
|
|
52
|
+
"Another plugin installation holds this marketplace. Wait for it to finish.",
|
|
53
|
+
);
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
const catalog = path.join(directory, "marketplace.json");
|
|
57
|
+
const temporary = path.join(directory, `.${randomUUID()}.tmp`);
|
|
58
|
+
try {
|
|
59
|
+
if (fs.existsSync(catalog) && fs.lstatSync(catalog).isSymbolicLink())
|
|
60
|
+
throw new Error("The managed catalog must not be a symbolic link.");
|
|
61
|
+
const marketplace = {
|
|
62
|
+
name: "broader-vids-npm",
|
|
63
|
+
interface: { displayName: "Broader Vids (npm)" },
|
|
64
|
+
plugins: [
|
|
65
|
+
{
|
|
66
|
+
name: "broader-vids",
|
|
67
|
+
source: {
|
|
68
|
+
source: "npm",
|
|
69
|
+
package: "broader-vids",
|
|
70
|
+
version,
|
|
71
|
+
registry: "https://registry.npmjs.org",
|
|
72
|
+
},
|
|
73
|
+
policy: { installation: "AVAILABLE", authentication: "ON_USE" },
|
|
74
|
+
category: "Productivity",
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
};
|
|
78
|
+
fs.writeFileSync(temporary, JSON.stringify(marketplace, null, 2) + "\n", {
|
|
79
|
+
flag: "wx",
|
|
80
|
+
mode: 0o600,
|
|
81
|
+
});
|
|
82
|
+
fs.renameSync(temporary, catalog);
|
|
83
|
+
run(command, [...prefix, "plugin", "marketplace", "add", root]);
|
|
84
|
+
run(command, [...prefix, "plugin", "add", "broader-vids@broader-vids-npm"]);
|
|
85
|
+
return { status: "installed", marketplace: marketplace.name, version };
|
|
86
|
+
} finally {
|
|
87
|
+
try {
|
|
88
|
+
fs.rmSync(temporary, { force: true });
|
|
89
|
+
} finally {
|
|
90
|
+
try {
|
|
91
|
+
fs.closeSync(handle);
|
|
92
|
+
} finally {
|
|
93
|
+
fs.unlinkSync(lock);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
module.exports = { installPlugin, resolveCodex };
|