mystyk 2026.7.0 → 2026.9.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.
@@ -29,6 +29,9 @@
29
29
  "Bash(curl *)",
30
30
  "Bash(wget *)",
31
31
  "Bash(gh *)",
32
+ "Bash(sleep *)",
33
+ "Bash(kill *)",
34
+ "Bash(MYSTYK_UPDATED_FROM=*)",
32
35
  "Read",
33
36
  "Edit",
34
37
  "Write",
@@ -37,16 +40,7 @@
37
40
  "WebFetch",
38
41
  "WebSearch",
39
42
  "Task",
40
- "NotebookEdit",
41
- "Bash(npx . *)",
42
- "Bash(node -e *)",
43
- "Bash(sleep *)",
44
- "Bash(kill *)",
45
- "Bash(node bin/mystyk.js:*)",
46
- "Bash(npm publish:*)",
47
- "Bash(NPM_TOKEN=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 npm publish --registry https://registry.npmjs.org/)",
48
- "Bash(npm whoami:*)",
49
- "Bash(npm owner:*)"
43
+ "NotebookEdit"
50
44
  ],
51
45
  "deny": [
52
46
  "Bash(rm *)",
@@ -58,14 +52,6 @@
58
52
  "Bash(git push --force *)",
59
53
  "Bash(git push -f *)",
60
54
  "Bash(truncate *)"
61
- ],
62
- "ask": [
63
- "Bash(git push *)",
64
- "Bash(git push)",
65
- "Bash(npm publish *)",
66
- "Bash(npm publish)",
67
- "Write(./package.json)",
68
- "Edit(./package.json)"
69
55
  ]
70
56
  }
71
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mystyk",
3
- "version": "2026.7.0",
3
+ "version": "2026.9.0",
4
4
  "description": "Cognitive primer for AI agents - calibrates frequency before work",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -3,7 +3,7 @@ import * as readline from 'readline';
3
3
  import { createRequire } from 'module';
4
4
  import colors from './ui/colors.js';
5
5
  import { getGradientLogo, version, symbol, particles, tagline } from './ui/ascii-art.js';
6
- import checkVersionAndUpdate from './utils/version-check.js';
6
+ import checkVersionAndUpdate, { getUpdateInfo } from './utils/version-check.js';
7
7
 
8
8
  const require = createRequire(import.meta.url);
9
9
  const pkg = require('../package.json');
@@ -67,10 +67,15 @@ function clear() {
67
67
 
68
68
  // Show interactive menu
69
69
  function showInteractiveMenu() {
70
+ const updateInfo = getUpdateInfo();
71
+ const versionLine = updateInfo.updated
72
+ ? ` ${version} ${colors.cyan('↑')} ${colors.success(`updated from ${updateInfo.from}`)}`
73
+ : ` ${version}`;
74
+
70
75
  console.log();
71
76
  console.log(getGradientLogo());
72
77
  console.log(colors.dim(` ${tagline}`));
73
- console.log(colors.dim(` ${version}`));
78
+ console.log(colors.dim(versionLine));
74
79
  console.log();
75
80
 
76
81
  console.log(colors.dim(' ' + particles));
@@ -1,5 +1,4 @@
1
1
  import { spawn } from 'child_process';
2
- import chalk from 'chalk';
3
2
 
4
3
  const PACKAGE_NAME = 'mystyk';
5
4
 
@@ -19,7 +18,6 @@ async function getLatestVersion() {
19
18
 
20
19
  /**
21
20
  * Compare semver versions
22
- * Returns: 1 if a > b, -1 if a < b, 0 if equal
23
21
  */
24
22
  function compareVersions(a, b) {
25
23
  const partsA = a.split('.').map(Number);
@@ -35,33 +33,28 @@ function compareVersions(a, b) {
35
33
  }
36
34
 
37
35
  /**
38
- * Check version and auto-update if needed
39
- * Returns true if should continue, false if updating
36
+ * Check if we just updated
40
37
  */
41
- export async function checkVersionAndUpdate(currentVersion) {
42
- // Check if we just updated (env flag from previous run)
43
- if (process.env.MYSTYK_JUST_UPDATED) {
44
- const fromVersion = process.env.MYSTYK_UPDATED_FROM || '?';
45
- console.log();
46
- console.log(chalk.bgGreen.black(' ✓ ACTUALIZADO ') + chalk.green(` ${fromVersion} → ${currentVersion}`));
47
- console.log();
48
- return true;
38
+ export function getUpdateInfo() {
39
+ if (process.env.MYSTYK_UPDATED_FROM) {
40
+ return {
41
+ updated: true,
42
+ from: process.env.MYSTYK_UPDATED_FROM
43
+ };
49
44
  }
45
+ return { updated: false };
46
+ }
50
47
 
48
+ /**
49
+ * Check version and auto-update if needed
50
+ */
51
+ export async function checkVersionAndUpdate(currentVersion) {
51
52
  try {
52
53
  const latestVersion = await getLatestVersion();
53
54
 
54
- if (!latestVersion) {
55
- return true;
56
- }
55
+ if (!latestVersion) return true;
57
56
 
58
57
  if (compareVersions(latestVersion, currentVersion) > 0) {
59
- // Show update banner
60
- console.log();
61
- console.log(chalk.bgYellow.black(' ↻ UPDATE ') + chalk.yellow(` Descargando v${latestVersion}...`));
62
- console.log(chalk.gray(` (tienes v${currentVersion})`));
63
- console.log();
64
-
65
58
  const args = process.argv.slice(2);
66
59
 
67
60
  return new Promise((resolve) => {
@@ -70,19 +63,12 @@ export async function checkVersionAndUpdate(currentVersion) {
70
63
  shell: true,
71
64
  env: {
72
65
  ...process.env,
73
- MYSTYK_JUST_UPDATED: '1',
74
66
  MYSTYK_UPDATED_FROM: currentVersion
75
67
  }
76
68
  });
77
69
 
78
- child.on('error', () => {
79
- console.log(chalk.red(` ✗ Error. Ejecuta: npx ${PACKAGE_NAME}@latest`));
80
- resolve(true);
81
- });
82
-
83
- child.on('close', (code) => {
84
- process.exit(code || 0);
85
- });
70
+ child.on('error', () => resolve(true));
71
+ child.on('close', (code) => process.exit(code || 0));
86
72
  });
87
73
  }
88
74