@agnostic-prompt/aps 1.1.1 → 1.1.3

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": "@agnostic-prompt/aps",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "CLI to install and manage the Agnostic Prompt Standard (APS) skill and platform templates.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -5,7 +5,7 @@ license: Apache-2.0
5
5
  metadata:
6
6
  authors: "Christopher Buckley; Juan Burckhardt; Anastasiya Smirnova"
7
7
  spec_version: "1.0"
8
- framework_revision: "1.1.1"
8
+ framework_revision: "1.1.3"
9
9
  last_updated: "2026-01-15"
10
10
  ---
11
11
 
package/src/cli.js CHANGED
@@ -65,6 +65,27 @@ async function runInit(options) {
65
65
  let installTemplates = Boolean(options.templates);
66
66
 
67
67
  if (!options.yes && isTTY()) {
68
+ // Platform selection (first, so platform choice can inform installation location)
69
+ if (!platformId) {
70
+ const platforms = await loadPlatforms(payloadSkillDir);
71
+ const choices = [
72
+ ...(detectedPlatform ? [{ name: `Auto-detected: ${detectedPlatform}`, value: detectedPlatform }] : []),
73
+ { name: 'None (skip platform templates)', value: null },
74
+ ...platforms
75
+ .filter((p) => p.platformId !== detectedPlatform)
76
+ .map((p) => ({
77
+ name: `${p.displayName} (${p.platformId})`,
78
+ value: p.platformId,
79
+ })),
80
+ ];
81
+
82
+ platformId = await select({
83
+ message: 'Select a platform adapter to apply:',
84
+ default: detectedPlatform ?? null,
85
+ choices,
86
+ });
87
+ }
88
+
68
89
  // Scope prompt
69
90
  if (!installScope) {
70
91
  installScope = await select({
@@ -83,6 +104,7 @@ async function runInit(options) {
83
104
  });
84
105
  }
85
106
 
107
+ // Workspace root (only needed for repo scope)
86
108
  if (installScope === 'repo' && !workspaceRoot) {
87
109
  const rootAnswer = await input({
88
110
  message: 'Workspace root path (the folder that contains .github/):',
@@ -91,26 +113,7 @@ async function runInit(options) {
91
113
  workspaceRoot = path.resolve(rootAnswer);
92
114
  }
93
115
 
94
- if (!platformId && workspaceRoot) {
95
- const platforms = await loadPlatforms(payloadSkillDir);
96
- const choices = [
97
- ...(detectedPlatform ? [{ name: `Auto-detected: ${detectedPlatform}`, value: detectedPlatform }] : []),
98
- { name: 'None (skip platform templates)', value: null },
99
- ...platforms
100
- .filter((p) => p.platformId !== detectedPlatform)
101
- .map((p) => ({
102
- name: `${p.displayName} (${p.platformId})`,
103
- value: p.platformId,
104
- })),
105
- ];
106
-
107
- platformId = await select({
108
- message: 'Select a platform adapter to apply:',
109
- default: detectedPlatform ?? null,
110
- choices,
111
- });
112
- }
113
-
116
+ // Extras (templates)
114
117
  if (platformId && workspaceRoot) {
115
118
  const extras = await checkbox({
116
119
  message: 'Extras to apply to the workspace:',
@@ -170,6 +173,16 @@ async function runInit(options) {
170
173
 
171
174
  // Execute
172
175
  for (const a of actions) {
176
+ // Templates use merge-copy, no overwrite check needed (copyTemplates handles individual files)
177
+ if (a.kind === 'templates') {
178
+ const summary = await copyTemplates(a.from, a.to, { force: options.force });
179
+ console.log(`Applied platform templates -> ${a.to}`);
180
+ if (summary.copied.length) console.log(` Copied: ${summary.copied.length} files`);
181
+ if (summary.skipped.length) console.log(` Skipped (existing): ${summary.skipped.length} files`);
182
+ continue;
183
+ }
184
+
185
+ // Skill overwrite logic
173
186
  const destExists = await pathExists(a.to);
174
187
  if (destExists && !options.force) {
175
188
  if (!options.yes && isTTY()) {
@@ -191,14 +204,8 @@ async function runInit(options) {
191
204
  }
192
205
 
193
206
  await ensureDir(path.dirname(a.to));
194
-
195
- if (a.kind === 'skill') {
196
- await copyDir(a.from, a.to);
197
- console.log(`Installed APS skill -> ${a.to}`);
198
- } else if (a.kind === 'templates') {
199
- await copyTemplates(a.from, a.to, { force: options.force });
200
- console.log(`Applied platform templates -> ${a.to}`);
201
- }
207
+ await copyDir(a.from, a.to);
208
+ console.log(`Installed APS skill -> ${a.to}`);
202
209
  }
203
210
 
204
211
  console.log('\nNext steps (VS Code):');