@rosh100yx/outlier 0.4.21 → 0.4.23
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/bin/outlier.js +6 -44
- package/package.json +1 -1
- package/src/cli.ts +14 -45
package/bin/outlier.js
CHANGED
|
@@ -165,7 +165,7 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
165
165
|
var require_package = __commonJS((exports, module) => {
|
|
166
166
|
module.exports = {
|
|
167
167
|
name: "@rosh100yx/outlier",
|
|
168
|
-
version: "0.4.
|
|
168
|
+
version: "0.4.23",
|
|
169
169
|
description: "AI Code Governance & Capability Auditing for the Terminal. Measures AI reliance, context waste, and enforces local CI/CD policies.",
|
|
170
170
|
bin: {
|
|
171
171
|
outlier: "bin/outlier.js"
|
|
@@ -1995,7 +1995,6 @@ var ASCII_LOGO = `
|
|
|
1995
1995
|
`;
|
|
1996
1996
|
var finalReceipt = "";
|
|
1997
1997
|
async function runOnboarding() {
|
|
1998
|
-
console.clear();
|
|
1999
1998
|
console.log(import_picocolors.default.cyan(ASCII_LOGO));
|
|
2000
1999
|
intro(import_picocolors.default.inverse(" outlier: Welcome "));
|
|
2001
2000
|
note(`Outlier is a local-first Policy Engine & Governance Framework for AI Engineering.
|
|
@@ -2040,7 +2039,6 @@ async function main() {
|
|
|
2040
2039
|
process.exit(0);
|
|
2041
2040
|
action = "status";
|
|
2042
2041
|
}
|
|
2043
|
-
console.clear();
|
|
2044
2042
|
console.log(import_picocolors.default.cyan(ASCII_LOGO));
|
|
2045
2043
|
const pkg = require_package();
|
|
2046
2044
|
console.log(import_picocolors.default.dim(` Outlier v${pkg.version} · AI Code Reliance & Telemetry Engine
|
|
@@ -2230,29 +2228,10 @@ Conservative Floor: ${color(nmPct + "%")}`, "Git Authorship Breakdown");
|
|
|
2230
2228
|
try {
|
|
2231
2229
|
let authPct = "0%";
|
|
2232
2230
|
let ruleFailures = 0;
|
|
2233
|
-
let authWarning = "";
|
|
2234
|
-
let wittyRemark = isStrict ? "" : "No git history (・_・ヾ";
|
|
2235
|
-
let mentorString = "";
|
|
2236
2231
|
if (gitStats) {
|
|
2237
2232
|
authPct = `${(gitStats.ratio * 100).toFixed(1)}%`;
|
|
2238
|
-
if (
|
|
2239
|
-
if (gitStats.ratio < 0.1)
|
|
2240
|
-
wittyRemark = "Artisan, hand-crafted code. Very 2019 of you (=^ ◡ ^=)";
|
|
2241
|
-
else if (gitStats.ratio < 0.6)
|
|
2242
|
-
wittyRemark = "A true centaur. Half human, half matrix (=`ω´=)";
|
|
2243
|
-
else if (gitStats.ratio < 0.95)
|
|
2244
|
-
wittyRemark = "Orchestrating the swarm. You are the manager now (ФДФ)";
|
|
2245
|
-
else
|
|
2246
|
-
wittyRemark = "100% Cybernetic. Codebase goes brrrrr (=ಠᆽಠ=)";
|
|
2247
|
-
}
|
|
2248
|
-
if (gitStats.ratio > 0.7) {
|
|
2249
|
-
authWarning = import_picocolors.default.red(isStrict ? `⚠ High Risk Surface: ${authPct} AI-generated. Human review required.` : `⚠ Mentoring Emergency: ${authPct} AI-generated. High risk of skill atrophy.`);
|
|
2250
|
-
if (!isStrict) {
|
|
2251
|
-
mentorString = `
|
|
2252
|
-
mentor: ${import_picocolors.default.blue("\uD83D\uDCA1 Architecture Challenge Pending (See Git Hook)")}`;
|
|
2253
|
-
}
|
|
2233
|
+
if (gitStats.ratio > 0.7)
|
|
2254
2234
|
ruleFailures++;
|
|
2255
|
-
}
|
|
2256
2235
|
}
|
|
2257
2236
|
let cachePct = "0";
|
|
2258
2237
|
let co2Str = "0.0kg";
|
|
@@ -2264,22 +2243,6 @@ Conservative Floor: ${color(nmPct + "%")}`, "Git Authorship Breakdown");
|
|
|
2264
2243
|
co2Str = `${carbon.localCo2Kg.toFixed(2)}kg CO2`;
|
|
2265
2244
|
regionStr = carbon.localRegion;
|
|
2266
2245
|
}
|
|
2267
|
-
const vibeRow = !isStrict ? `
|
|
2268
|
-
vibe: ${import_picocolors.default.italic(wittyRemark)}` : "";
|
|
2269
|
-
const capIcon = isStrict ? "" : "(Ф∇Ф) ";
|
|
2270
|
-
const authIcon = isStrict ? "" : "(=^・ω・^=) ";
|
|
2271
|
-
const costIcon = isStrict ? "" : "(O_O;) ";
|
|
2272
|
-
const failIcon = isStrict ? "⚠" : "(=ಠᆽಠ=)";
|
|
2273
|
-
const passIcon = isStrict ? "✓" : "(=^ ◡ ^=)";
|
|
2274
|
-
note(`${capIcon}${import_picocolors.default.dim("[1] Capability Engine")} ${import_picocolors.default.cyan("▰▰▰▰▰▰▱▱▱▱")} ${import_picocolors.default.bold("Active")}
|
|
2275
|
-
status: ${import_picocolors.default.green("✓ Configured")}
|
|
2276
|
-
${authIcon}${import_picocolors.default.dim("[2] AI Code Reliance")} ${import_picocolors.default.yellow("▰▰▰▰▰▰▰▰▱▱")} ${import_picocolors.default.bold(`${authPct} Reliance`)}${vibeRow}
|
|
2277
|
-
gate: ${gitStats && gitStats.ratio <= 0.7 ? import_picocolors.default.green("✓ Human Mastery Sustained") : `${import_picocolors.default.red(`${failIcon} Deskilling Risk Detected`)} ${import_picocolors.default.red("⚠ Security Audit Required")}`}${mentorString}
|
|
2278
|
-
${costIcon}${import_picocolors.default.dim("[3] Tokenomics & Cost")} ${import_picocolors.default.magenta("▰▰▰▰▰▰▰▰▰▱")} ${import_picocolors.default.bold(`${cachePct}% Cache Bloat`)}
|
|
2279
|
-
waste: ${import_picocolors.default.yellow(`⚠ ${cachePct}% of tokens are redundant context reads`)}
|
|
2280
|
-
carbon: ${import_picocolors.default.green(`✓ ${co2Str} (Est. ${regionStr} Grid)`)}
|
|
2281
|
-
${import_picocolors.default.bold("Governance:")} ${ruleFailures > 0 ? import_picocolors.default.red(`${failIcon} ${ruleFailures + 1} policy failures`) : import_picocolors.default.green(`${passIcon} All clear`)}`, `${import_picocolors.default.bold("[outlier]")} ${5 - (ruleFailures + 1)}/5 policies • ${authWarning || import_picocolors.default.green(`${passIcon} safe surface`)} • ${co2Str}`);
|
|
2282
|
-
const timestamp = new Date().toISOString().split("T")[0];
|
|
2283
2246
|
const isDanger = gitStats && gitStats.ratio > 0.7;
|
|
2284
2247
|
const verdictZone = isDanger ? import_picocolors.default.red("DANGER ZONE") : import_picocolors.default.green("SAFE / SOVEREIGN");
|
|
2285
2248
|
const verdictText = isDanger ? `You are transitioning from 'Creator' to 'Reviewer'.
|
|
@@ -2294,7 +2257,8 @@ ${import_picocolors.default.bold("Governance:")} ${ruleFailures > 0 ? import_pic
|
|
|
2294
2257
|
coupled. High signal-to-noise ratio.`;
|
|
2295
2258
|
const policyStatus = ruleFailures > 0 ? import_picocolors.default.red("BLOCKED \uD83D\uDED1 (Threshold Exceeded)") : import_picocolors.default.green("PASS ✅ (Within Threshold)");
|
|
2296
2259
|
const policyAction = ruleFailures > 0 ? "Triggering Mandatory Mentoring Scenario." : "No intervention required.";
|
|
2297
|
-
const
|
|
2260
|
+
const fmtTokens = (n2) => n2 >= 1e9 ? (n2 / 1e9).toFixed(1) + "B" : n2 >= 1e6 ? (n2 / 1e6).toFixed(1) + "M" : n2 >= 1000 ? (n2 / 1000).toFixed(1) + "k" : String(n2);
|
|
2261
|
+
const totalTokensStr = carbon ? fmtTokens(carbon.totalTokens) : "0";
|
|
2298
2262
|
const humanSov = gitStats ? ((1 - gitStats.ratio) * 100).toFixed(1) + "%" : "100%";
|
|
2299
2263
|
const authorshipStr = authPct + (isDanger ? import_picocolors.default.red(" (High Reliance)") : import_picocolors.default.green(" (Healthy)"));
|
|
2300
2264
|
const getProgressBar = (pct, length = 10) => {
|
|
@@ -2548,10 +2512,8 @@ Read the full academic foundation at: ${import_picocolors.default.underline("htt
|
|
|
2548
2512
|
console.log(import_picocolors.default.bold(import_picocolors.default.magenta(" ↳ Ready to code? ")) + "Start your AI agent");
|
|
2549
2513
|
}
|
|
2550
2514
|
console.log("");
|
|
2551
|
-
console.log(import_picocolors.default.bold(import_picocolors.default.cyan(" └
|
|
2552
|
-
console.log(import_picocolors.default.bold(import_picocolors.default.green(" └
|
|
2553
|
-
|
|
2554
|
-
\uD83D\uDCCF #Outlier`)}`));
|
|
2515
|
+
console.log(import_picocolors.default.bold(import_picocolors.default.cyan(" └ Research: ")) + "Contribute to the AI deskilling study ➔ " + import_picocolors.default.bold("outlier participate"));
|
|
2516
|
+
console.log(import_picocolors.default.bold(import_picocolors.default.green(" └ Share: ")) + import_picocolors.default.underline("https://x.com/intent/tweet?text=I+just+audited+my+codebase+with+%23Outlier"));
|
|
2555
2517
|
console.log(import_picocolors.default.dim(`
|
|
2556
2518
|
(To see all local governance modules, run: `) + import_picocolors.default.dim(import_picocolors.default.bold("outlier --help")) + import_picocolors.default.dim(")"));
|
|
2557
2519
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rosh100yx/outlier",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.23",
|
|
4
4
|
"description": "AI Code Governance & Capability Auditing for the Terminal. Measures AI reliance, context waste, and enforces local CI/CD policies.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"outlier": "bin/outlier.js"
|
package/src/cli.ts
CHANGED
|
@@ -21,7 +21,6 @@ const ASCII_LOGO = `
|
|
|
21
21
|
let finalReceipt = '';
|
|
22
22
|
|
|
23
23
|
async function runOnboarding() {
|
|
24
|
-
console.clear();
|
|
25
24
|
console.log(pc.cyan(ASCII_LOGO));
|
|
26
25
|
intro(pc.inverse(' outlier: Welcome '));
|
|
27
26
|
|
|
@@ -79,7 +78,6 @@ async function main() {
|
|
|
79
78
|
action = 'status';
|
|
80
79
|
}
|
|
81
80
|
|
|
82
|
-
console.clear();
|
|
83
81
|
console.log(pc.cyan(ASCII_LOGO));
|
|
84
82
|
const pkg = require('../package.json');
|
|
85
83
|
console.log(pc.dim(` Outlier v${pkg.version} · AI Code Reliance & Telemetry Engine\n`));
|
|
@@ -278,29 +276,12 @@ Conservative Floor: ${color(nmPct + '%')}`,
|
|
|
278
276
|
try {
|
|
279
277
|
let authPct = '0%';
|
|
280
278
|
let ruleFailures = 0;
|
|
281
|
-
|
|
282
|
-
let wittyRemark = isStrict ? '' : 'No git history (・_・ヾ';
|
|
283
|
-
let mentorString = '';
|
|
284
|
-
|
|
279
|
+
|
|
285
280
|
if (gitStats) {
|
|
286
281
|
authPct = `${(gitStats.ratio * 100).toFixed(1)}%`;
|
|
287
|
-
|
|
288
|
-
if (!isStrict) {
|
|
289
|
-
if (gitStats.ratio < 0.1) wittyRemark = 'Artisan, hand-crafted code. Very 2019 of you (=^ ◡ ^=)';
|
|
290
|
-
else if (gitStats.ratio < 0.6) wittyRemark = 'A true centaur. Half human, half matrix (=`ω´=)';
|
|
291
|
-
else if (gitStats.ratio < 0.95) wittyRemark = 'Orchestrating the swarm. You are the manager now (ФДФ)';
|
|
292
|
-
else wittyRemark = '100% Cybernetic. Codebase goes brrrrr (=ಠᆽಠ=)';
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
if (gitStats.ratio > 0.7) {
|
|
296
|
-
authWarning = pc.red(isStrict ? `⚠ High Risk Surface: ${authPct} AI-generated. Human review required.` : `⚠ Mentoring Emergency: ${authPct} AI-generated. High risk of skill atrophy.`);
|
|
297
|
-
if (!isStrict) {
|
|
298
|
-
mentorString = `\n mentor: ${pc.blue('💡 Architecture Challenge Pending (See Git Hook)')}`;
|
|
299
|
-
}
|
|
300
|
-
ruleFailures++;
|
|
301
|
-
}
|
|
282
|
+
if (gitStats.ratio > 0.7) ruleFailures++;
|
|
302
283
|
}
|
|
303
|
-
|
|
284
|
+
|
|
304
285
|
let cachePct = '0';
|
|
305
286
|
let co2Str = '0.0kg';
|
|
306
287
|
let regionStr = 'Global Average';
|
|
@@ -312,26 +293,9 @@ Conservative Floor: ${color(nmPct + '%')}`,
|
|
|
312
293
|
regionStr = carbon.localRegion;
|
|
313
294
|
}
|
|
314
295
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
const costIcon = isStrict ? '' : '(O_O;) ';
|
|
319
|
-
const failIcon = isStrict ? '⚠' : '(=ಠᆽಠ=)';
|
|
320
|
-
const passIcon = isStrict ? '✓' : '(=^ ◡ ^=)';
|
|
321
|
-
|
|
322
|
-
note(
|
|
323
|
-
`${capIcon}${pc.dim('[1] Capability Engine')} ${pc.cyan('▰▰▰▰▰▰▱▱▱▱')} ${pc.bold('Active')}
|
|
324
|
-
status: ${pc.green('✓ Configured')}
|
|
325
|
-
${authIcon}${pc.dim('[2] AI Code Reliance')} ${pc.yellow('▰▰▰▰▰▰▰▰▱▱')} ${pc.bold(`${authPct} Reliance`)}${vibeRow}
|
|
326
|
-
gate: ${gitStats && gitStats.ratio <= 0.7 ? pc.green('✓ Human Mastery Sustained') : `${pc.red(`${failIcon} Deskilling Risk Detected`)} ${pc.red('⚠ Security Audit Required')}`}${mentorString}
|
|
327
|
-
${costIcon}${pc.dim('[3] Tokenomics & Cost')} ${pc.magenta('▰▰▰▰▰▰▰▰▰▱')} ${pc.bold(`${cachePct}% Cache Bloat`)}
|
|
328
|
-
waste: ${pc.yellow(`⚠ ${cachePct}% of tokens are redundant context reads`)}
|
|
329
|
-
carbon: ${pc.green(`✓ ${co2Str} (Est. ${regionStr} Grid)`)}
|
|
330
|
-
${pc.bold('Governance:')} ${ruleFailures > 0 ? pc.red(`${failIcon} ${ruleFailures + 1} policy failures`) : pc.green(`${passIcon} All clear`)}`,
|
|
331
|
-
`${pc.bold('[outlier]')} ${5 - (ruleFailures+1)}/5 policies • ${authWarning || pc.green(`${passIcon} safe surface`)} • ${co2Str}`
|
|
332
|
-
);
|
|
333
|
-
|
|
334
|
-
const timestamp = new Date().toISOString().split('T')[0];
|
|
296
|
+
// The thermal receipt below is the single canonical output for `status`.
|
|
297
|
+
// (The old @clack dashboard panel was removed: it duplicated the receipt's
|
|
298
|
+
// numbers in a second format, doubling the output on every run.)
|
|
335
299
|
const isDanger = gitStats && gitStats.ratio > 0.7;
|
|
336
300
|
const verdictZone = isDanger ? pc.red('DANGER ZONE') : pc.green('SAFE / SOVEREIGN');
|
|
337
301
|
const verdictText = isDanger
|
|
@@ -347,7 +311,12 @@ ${pc.bold('Governance:')} ${ruleFailures > 0 ? pc.red(`${failIcon} ${ruleFailure
|
|
|
347
311
|
const policyStatus = ruleFailures > 0 ? pc.red('BLOCKED 🛑 (Threshold Exceeded)') : pc.green('PASS ✅ (Within Threshold)');
|
|
348
312
|
const policyAction = ruleFailures > 0 ? 'Triggering Mandatory Mentoring Scenario.' : 'No intervention required.';
|
|
349
313
|
|
|
350
|
-
const
|
|
314
|
+
const fmtTokens = (n: number) =>
|
|
315
|
+
n >= 1_000_000_000 ? (n / 1_000_000_000).toFixed(1) + 'B'
|
|
316
|
+
: n >= 1_000_000 ? (n / 1_000_000).toFixed(1) + 'M'
|
|
317
|
+
: n >= 1_000 ? (n / 1_000).toFixed(1) + 'k'
|
|
318
|
+
: String(n);
|
|
319
|
+
const totalTokensStr = carbon ? fmtTokens(carbon.totalTokens) : '0';
|
|
351
320
|
const humanSov = gitStats ? ((1 - gitStats.ratio) * 100).toFixed(1) + '%' : '100%';
|
|
352
321
|
const authorshipStr = authPct + (isDanger ? pc.red(' (High Reliance)') : pc.green(' (Healthy)'));
|
|
353
322
|
|
|
@@ -619,10 +588,10 @@ Artifact: ${pc.cyan(reportPath)}`,
|
|
|
619
588
|
}
|
|
620
589
|
console.log('');
|
|
621
590
|
console.log(
|
|
622
|
-
pc.bold(pc.cyan(' └
|
|
591
|
+
pc.bold(pc.cyan(' └ Research: ')) + 'Contribute to the AI deskilling study ➔ ' + pc.bold('outlier participate')
|
|
623
592
|
);
|
|
624
593
|
console.log(
|
|
625
|
-
pc.bold(pc.green(' └
|
|
594
|
+
pc.bold(pc.green(' └ Share: ')) + pc.underline('https://x.com/intent/tweet?text=I+just+audited+my+codebase+with+%23Outlier')
|
|
626
595
|
);
|
|
627
596
|
console.log(
|
|
628
597
|
pc.dim('\n (To see all local governance modules, run: ') + pc.dim(pc.bold('outlier --help')) + pc.dim(')')
|