ppcos 0.4.1 → 0.4.2

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.
@@ -10,8 +10,9 @@ import { join, dirname } from 'node:path';
10
10
  import { fileURLToPath } from 'node:url';
11
11
  import { validateConfig } from '../utils/validation.js';
12
12
  import { calculateChecksum } from '../utils/checksum.js';
13
- import { createManifest, writeManifest, manifestExists } from '../utils/manifest.js';
14
- import { getAllFiles, copyFileWithDirs, ensureDir } from '../utils/fs-helpers.js';
13
+ import { createManifest, writeManifest, manifestExists, getManagedType } from '../utils/manifest.js';
14
+ import { getAllFiles } from '../utils/fs-helpers.js';
15
+ import { fetchSkills } from '../utils/skills-fetcher.js';
15
16
  import logger from '../utils/logger.js';
16
17
 
17
18
  // Get package root directory
@@ -29,14 +30,6 @@ function getPackageVersion() {
29
30
  return pkg.version;
30
31
  }
31
32
 
32
- /**
33
- * Get path to .claude-base template directory
34
- * @returns {string}
35
- */
36
- function getBaseTemplatePath() {
37
- return join(PACKAGE_ROOT, '.claude-base');
38
- }
39
-
40
33
  /**
41
34
  * Get config file path
42
35
  * @returns {string}
@@ -116,7 +109,6 @@ async function backupClient(clientDir) {
116
109
  */
117
110
  async function initializeClient(clientName, clientsDir, options = {}) {
118
111
  const clientDir = join(clientsDir, clientName);
119
- const basePath = getBaseTemplatePath();
120
112
  const version = getPackageVersion();
121
113
 
122
114
  // Check if exists
@@ -134,20 +126,21 @@ async function initializeClient(clientName, clientsDir, options = {}) {
134
126
  }
135
127
 
136
128
  try {
137
- // Copy files and calculate checksums
138
- const baseFiles = await getAllFiles(basePath);
139
- const managedFiles = {};
129
+ // Fetch skills from API
130
+ await fetchSkills(clientDir);
140
131
 
141
- for (const relativePath of baseFiles) {
142
- const srcPath = join(basePath, relativePath);
143
- const destPath = join(clientDir, relativePath);
144
-
145
- await copyFileWithDirs(srcPath, destPath);
132
+ // Calculate checksums for all files in client dir
133
+ const allFiles = await getAllFiles(clientDir);
134
+ const managedFiles = {};
146
135
 
147
- const checksum = await calculateChecksum(destPath);
136
+ for (const relativePath of allFiles) {
137
+ const filePath = join(clientDir, relativePath);
138
+ const checksum = await calculateChecksum(filePath);
139
+ const managedType = getManagedType(relativePath);
148
140
  managedFiles[relativePath] = {
149
141
  checksum,
150
- version
142
+ version,
143
+ managedType
151
144
  };
152
145
  }
153
146
 
@@ -238,7 +231,6 @@ export default async function initAll(options = {}) {
238
231
  // Export helpers for testing
239
232
  export {
240
233
  getPackageVersion,
241
- getBaseTemplatePath,
242
234
  getConfigPath,
243
235
  getClientsDir,
244
236
  loadConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ppcos",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "CLI tool to manage Google Ads AI workflow skills and agents for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {