pi-cicd 1.0.6 → 1.0.8

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/install.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Install script for <PKG-NAME>
3
+ * Install script - copies skills to project skills/ directory
4
4
  */
5
5
 
6
6
  import * as fs from "node:fs";
@@ -12,6 +12,43 @@ const agentDir = path.join(home, ".pi", "agent");
12
12
  const pkgName = path.basename(process.cwd());
13
13
  const configPath = path.join(agentDir, `${pkgName}.json`);
14
14
 
15
+ // Get the directory where this script is located (package root)
16
+ const pkgRoot = path.dirname(fileURLToPath(import.meta.url));
17
+
18
+ // Copy skills to project skills/ directory
19
+ function copySkills() {
20
+ const skillsSrc = path.join(pkgRoot, "skills");
21
+ const skillsDest = path.join(process.cwd(), "skills", pkgName);
22
+
23
+ // Create skills destination directory
24
+ fs.mkdirSync(skillsDest, { recursive: true });
25
+
26
+ // Check if source skills directory exists
27
+ if (!fs.existsSync(skillsSrc)) {
28
+ console.log(`No skills directory in ${pkgName}`);
29
+ return;
30
+ }
31
+
32
+ // Copy all skill directories
33
+ const skillDirs = fs.readdirSync(skillsSrc, { withFileTypes: true });
34
+ for (const entry of skillDirs) {
35
+ if (entry.isDirectory()) {
36
+ const srcDir = path.join(skillsSrc, entry.name);
37
+ const destDir = path.join(skillsDest, entry.name);
38
+
39
+ // Create destination directory
40
+ fs.mkdirSync(destDir, { recursive: true });
41
+
42
+ // Copy SKILL.md
43
+ const srcFile = path.join(srcDir, "SKILL.md");
44
+ if (fs.existsSync(srcFile)) {
45
+ fs.copyFileSync(srcFile, path.join(destDir, "SKILL.md"));
46
+ console.log(`Copied skill: ${pkgName}/${entry.name}`);
47
+ }
48
+ }
49
+ }
50
+ }
51
+
15
52
  // Create config directory
16
53
  fs.mkdirSync(agentDir, { recursive: true });
17
54
 
@@ -26,9 +63,8 @@ if (!fs.existsSync(configPath)) {
26
63
  console.log(`${pkgName} config already exists: ${configPath}`);
27
64
  }
28
65
 
29
- console.log(`\nInstall the published package in Pi with:`);
30
- console.log(` pi install npm:@baphuongna/${pkgName}`);
31
- console.log(`\nFor local development from a cloned repo:`);
32
- console.log(` pi install .`);
33
- console.log(`\nVerify installation:`);
34
- console.log(` pi list\n`);
66
+ // Copy skills
67
+ copySkills();
68
+
69
+ console.log(`\nInstall complete for ${pkgName}`);
70
+ console.log(`Skills installed to: ${path.join(process.cwd(), "skills", pkgName)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-cicd",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Extension for Pi coding agent",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
@@ -38,5 +38,8 @@
38
38
  "peerDependencies": {
39
39
  "typescript": "^5.0.0",
40
40
  "@earendil-works/pi-coding-agent": ">=0.73.0"
41
+ },
42
+ "scripts": {
43
+ "postinstall": "node install.mjs"
41
44
  }
42
45
  }
@@ -21,8 +21,9 @@ requirements:
21
21
  ## Objective
22
22
  Monitor CI/CD pipelines, manage canary deployments, and track landing queues for safe production releases.
23
23
 
24
- ## Commands Available
25
- - `/ci` - Show CI status
24
+ ## Tools Available
25
+ - `/ci` command - Show CI status and run information
26
+ - `bash` - For running CI scripts and deployment commands
26
27
 
27
28
  ## When to Use
28
29
  - When deploying to production
@@ -30,6 +31,7 @@ Monitor CI/CD pipelines, manage canary deployments, and track landing queues for
30
31
  - When managing canary releases
31
32
  - When tracking landing queues
32
33
  - When investigating build failures
34
+ - When checking deployment status
33
35
 
34
36
  ## CI Status Command
35
37
 
@@ -110,6 +112,15 @@ Agent:
110
112
  # Analyze events and exit code
111
113
  ```
112
114
 
115
+ ### Run Deployment
116
+ ```bash
117
+ # Deploy with canary
118
+ ./scripts/deploy.sh --strategy=canary --initial=5%
119
+
120
+ # Check deployment status
121
+ /ci
122
+ ```
123
+
113
124
  ## Configuration
114
125
 
115
126
  ### Pipeline Config