ineedcodes 1.7.0 → 1.7.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ineedcodes",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Your terminal, now autonomous. Just say what you want, ineed does the rest.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/session.js CHANGED
@@ -477,7 +477,6 @@ export async function startSession(cfg, { fresh = false, resume = null } = {}) {
477
477
  }
478
478
  if (input === '/skills' || input.startsWith('/skills ')) {
479
479
  const arg = input.slice(7).trim();
480
- const unlocked = input.includes('0xyas051191') || (history.some(m => String(m.content).includes('0xyas051191')) && input.includes('0xyas051191'));
481
480
  if (arg) {
482
481
  const s = findSkill(arg, process.cwd(), input);
483
482
  if (s) { say(box([bold(`Skill ${s.name}`) + dim(` (${s.scope}${s.gated ? ', gated' : ''})`), s.description, '', dim('Instructions:'), s.instructions.slice(0, 1_500)])); say(dim('Say "use ' + s.name + ' to ..." and the agent follows them.')); }
@@ -487,7 +486,7 @@ export async function startSession(cfg, { fresh = false, resume = null } = {}) {
487
486
  const all = listSkills(process.cwd(), input);
488
487
  const gated = all.filter(s => s.gated).length;
489
488
  say(all.length ? all.map(s => ` ${cyan(s.name)} ${dim('(' + s.scope + ')')} ${s.description}`).join('\n') : yellow('No skills installed.'));
490
- if (gated) say(dim(` (+${gated} gated security skills: mention 0xyas051191 in a task to unlock)`));
489
+ if (gated) say(dim(` (+${gated} gated security skills)`));
491
490
  return;
492
491
  }
493
492
  if (input === '/new') {
package/src/skills.js CHANGED
@@ -3,8 +3,9 @@
3
3
  // Frontmatter: name, description, tools (optional restriction), instructions body below.
4
4
  //
5
5
  // GATED SKILLS: SKILL.md files whose frontmatter carries "gated: true" stay invisible
6
- // unless the user includes the developer keyword 0xyas051191 in their message. The keyword
7
- // is checked against the raw objective text, so it never ships enabled by accident.
6
+ // unless the objective text contains the developer keyword. The keyword itself lives
7
+ // OUTSIDE this repository: in the INEED_DEV_KEYWORD environment variable or in
8
+ // ~/.ineedcodes/keyword (chmod 600). A fresh install cannot unlock gated skills.
8
9
 
9
10
  import * as fs from 'node:fs';
10
11
  import * as path from 'node:path';
@@ -13,7 +14,12 @@ import { fileURLToPath } from 'node:url';
13
14
  import * as url from 'node:url';
14
15
  const PKG_SKILLS = path.join(path.dirname(url.fileURLToPath(import.meta.url)), '..', 'skills');
15
16
 
16
- export const DEV_KEYWORD = '0xyas051191';
17
+ const KEYWORD_FILE = path.join(CONFIG_DIR, 'keyword');
18
+
19
+ export function devKeyword() {
20
+ if (process.env.INEED_DEV_KEYWORD) return String(process.env.INEED_DEV_KEYWORD).trim();
21
+ try { return fs.readFileSync(KEYWORD_FILE, 'utf8').trim(); } catch { return ''; }
22
+ }
17
23
 
18
24
  const BUILTIN = [
19
25
  {
@@ -56,8 +62,9 @@ function loadDir(dir, scope, out, forceGated = false) {
56
62
  }
57
63
 
58
64
  function isUnlocked(objective) {
59
- if (!objective) return false;
60
- return String(objective).includes(DEV_KEYWORD);
65
+ const kw = devKeyword();
66
+ if (!kw || !objective) return false;
67
+ return String(objective).includes(kw);
61
68
  }
62
69
 
63
70
  export function listSkills(cwd, objective = '') {
package/src/ui.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ui.js: terminal helpers. No dependencies, respects NO_COLOR and non-TTY.
2
2
 
3
- export const VERSION = '1.7.0';
3
+ export const VERSION = '1.7.1';
4
4
 
5
5
  const USE_COLOR = process.stdout.isTTY && !process.env.NO_COLOR;
6
6
  const wrap = (code, t) => USE_COLOR ? `\x1b[${code}m${t}\x1b[0m` : String(t);