@vladimir-ks/aigile 0.2.5 → 0.2.7

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/dist/index.cjs CHANGED
@@ -62,7 +62,7 @@ var BaseEntity = class {
62
62
  };
63
63
 
64
64
  // src/index.ts
65
- var VERSION = true ? "0.2.5" : "0.0.0-dev";
65
+ var VERSION = true ? "0.2.7" : "0.0.0-dev";
66
66
  // Annotate the CommonJS export names for ESM import in node:
67
67
  0 && (module.exports = {
68
68
  BaseEntity,
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ var BaseEntity = class {
35
35
  };
36
36
 
37
37
  // src/index.ts
38
- var VERSION = true ? "0.2.5" : "0.0.0-dev";
38
+ var VERSION = true ? "0.2.7" : "0.0.0-dev";
39
39
  export {
40
40
  BaseEntity,
41
41
  VERSION
@@ -0,0 +1,109 @@
1
+ #!/usr/bin/env node
2
+
3
+ // scripts/install-artifacts.js
4
+ import { existsSync, mkdirSync, cpSync, readFileSync, writeFileSync } from "fs";
5
+ import { join, dirname } from "path";
6
+ import { homedir } from "os";
7
+ import { fileURLToPath } from "url";
8
+ var __filename = fileURLToPath(import.meta.url);
9
+ var __dirname = dirname(__filename);
10
+ var HOME = homedir();
11
+ var CLAUDE_DIR = join(HOME, ".claude");
12
+ var CCM_CONFIG = join(HOME, ".claude-context-manager", "config.json");
13
+ var SKILLS_TARGET = join(CLAUDE_DIR, "skills", "aigile");
14
+ var COMMANDS_TARGET = join(CLAUDE_DIR, "commands", "aigile");
15
+ var ARTIFACTS_DIR = join(__dirname, "..", "artifacts");
16
+ var SKILLS_SOURCE = join(ARTIFACTS_DIR, "skills", "aigile");
17
+ var COMMANDS_SOURCE = join(ARTIFACTS_DIR, "commands", "aigile");
18
+ var PACKAGE_JSON = join(__dirname, "..", "package.json");
19
+ function log(msg) {
20
+ console.log(`[aigile] ${msg}`);
21
+ }
22
+ function warn(msg) {
23
+ console.warn(`[aigile] \u26A0\uFE0F ${msg}`);
24
+ }
25
+ function getPackageVersion() {
26
+ try {
27
+ const pkg = JSON.parse(readFileSync(PACKAGE_JSON, "utf-8"));
28
+ return pkg.version || "0.0.0";
29
+ } catch {
30
+ return "0.0.0";
31
+ }
32
+ }
33
+ function getInstalledVersion() {
34
+ const skillMd = join(SKILLS_TARGET, "SKILL.md");
35
+ if (!existsSync(skillMd)) return null;
36
+ try {
37
+ const content = readFileSync(skillMd, "utf-8");
38
+ const match = content.match(/version:\s*["']?(\d+\.\d+\.\d+)["']?/);
39
+ return match ? match[1] : null;
40
+ } catch {
41
+ return null;
42
+ }
43
+ }
44
+ function hasActiveSubscription() {
45
+ if (!existsSync(CCM_CONFIG)) return false;
46
+ try {
47
+ const config = JSON.parse(readFileSync(CCM_CONFIG, "utf-8"));
48
+ return config.subscription?.active === true;
49
+ } catch {
50
+ return false;
51
+ }
52
+ }
53
+ function compareVersions(v1, v2) {
54
+ const parts1 = v1.split(".").map(Number);
55
+ const parts2 = v2.split(".").map(Number);
56
+ for (let i = 0; i < 3; i++) {
57
+ if (parts1[i] > parts2[i]) return 1;
58
+ if (parts1[i] < parts2[i]) return -1;
59
+ }
60
+ return 0;
61
+ }
62
+ function copyArtifacts() {
63
+ mkdirSync(join(CLAUDE_DIR, "skills"), { recursive: true });
64
+ mkdirSync(join(CLAUDE_DIR, "commands"), { recursive: true });
65
+ if (existsSync(SKILLS_SOURCE)) {
66
+ cpSync(SKILLS_SOURCE, SKILLS_TARGET, { recursive: true });
67
+ log(`Installed skill to ${SKILLS_TARGET}`);
68
+ }
69
+ if (existsSync(COMMANDS_SOURCE)) {
70
+ cpSync(COMMANDS_SOURCE, COMMANDS_TARGET, { recursive: true });
71
+ log(`Installed commands to ${COMMANDS_TARGET}`);
72
+ }
73
+ }
74
+ function main() {
75
+ const packageVersion = getPackageVersion();
76
+ if (!existsSync(SKILLS_SOURCE) && !existsSync(COMMANDS_SOURCE)) {
77
+ return;
78
+ }
79
+ if (!existsSync(CLAUDE_DIR)) {
80
+ log("Creating ~/.claude/ directory...");
81
+ mkdirSync(CLAUDE_DIR, { recursive: true });
82
+ copyArtifacts();
83
+ log("\u2705 AIGILE artifacts installed successfully!");
84
+ return;
85
+ }
86
+ const installedVersion = getInstalledVersion();
87
+ if (!installedVersion) {
88
+ copyArtifacts();
89
+ log("\u2705 AIGILE artifacts installed successfully!");
90
+ return;
91
+ }
92
+ const comparison = compareVersions(packageVersion, installedVersion);
93
+ if (comparison <= 0) {
94
+ log(`Artifacts already up to date (v${installedVersion})`);
95
+ return;
96
+ }
97
+ if (hasActiveSubscription()) {
98
+ copyArtifacts();
99
+ log(`\u2705 AIGILE artifacts updated to v${packageVersion}`);
100
+ } else {
101
+ warn(`Update available (v${packageVersion}), but requires active CCM subscription`);
102
+ warn('Run "ccm install aigile -g" with an active subscription to update');
103
+ }
104
+ }
105
+ try {
106
+ main();
107
+ } catch (err) {
108
+ warn(`Installation skipped: ${err.message}`);
109
+ }
package/package.json CHANGED
@@ -1,16 +1,18 @@
1
1
  {
2
2
  "name": "@vladimir-ks/aigile",
3
- "version": "0.2.5",
4
- "description": "JIRA-compatible Agile project management CLI for AI-assisted development",
3
+ "version": "0.2.7",
4
+ "description": "AI-first agile system for autonomous product development and project management",
5
5
  "keywords": [
6
6
  "aigile",
7
7
  "agile",
8
- "jira",
8
+ "ai-first",
9
+ "autonomous",
9
10
  "project-management",
10
- "cli",
11
- "typescript",
11
+ "product-development",
12
+ "ai-agents",
12
13
  "claude-code",
13
- "ai-development"
14
+ "context-management",
15
+ "session-tracking"
14
16
  ],
15
17
  "author": {
16
18
  "name": "Vladimir K.S.",
@@ -39,12 +41,14 @@
39
41
  "files": [
40
42
  "dist",
41
43
  "types",
44
+ "artifacts",
42
45
  "LICENSE"
43
46
  ],
44
47
  "engines": {
45
48
  "node": ">=18.0.0"
46
49
  },
47
50
  "scripts": {
51
+ "postinstall": "node dist/scripts/install-artifacts.js || true",
48
52
  "build": "tsup",
49
53
  "dev": "tsup --watch",
50
54
  "test": "vitest run --passWithNoTests",
@@ -67,6 +71,7 @@
67
71
  },
68
72
  "devDependencies": {
69
73
  "@types/node": "^20.11.0",
74
+ "@types/picomatch": "^4.0.2",
70
75
  "tsup": "^8.0.1",
71
76
  "typescript": "^5.3.0",
72
77
  "vitest": "^1.2.0"