@postplus/cli 0.1.34 → 0.1.36

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.
@@ -0,0 +1,307 @@
1
+ // Generated from the PostPlus Cloud hosted catalog release gate.
2
+ // Keep keys in sync with apps/web hosted capability and collection catalogs.
3
+ export const RESEARCH_COLLECTION_HINTS = {
4
+ 'amazon-asins': {
5
+ asins: ['B0C1234567'],
6
+ country: 'US',
7
+ },
8
+ 'amazon-bestsellers': {
9
+ categoryUrl: 'https://www.amazon.com/Best-Sellers/zgbs',
10
+ maxItems: 5,
11
+ },
12
+ 'amazon-free-products': {
13
+ keyword: 'portable blender',
14
+ maxItems: 5,
15
+ },
16
+ 'amazon-products': {
17
+ country: 'US',
18
+ keyword: 'portable blender',
19
+ maxItems: 5,
20
+ },
21
+ 'amazon-reviews': {
22
+ asin: 'B0C1234567',
23
+ country: 'US',
24
+ maxReviews: 10,
25
+ },
26
+ 'amazon-reviews-v2': {
27
+ asin: 'B0C1234567',
28
+ domainCode: 'com',
29
+ maxReviews: 10,
30
+ },
31
+ 'google-trends-fast': {
32
+ queries: ['portable blender'],
33
+ },
34
+ 'instagram-comments': {
35
+ directUrls: ['https://www.instagram.com/p/example/'],
36
+ resultsLimit: 5,
37
+ },
38
+ 'instagram-email-search': {
39
+ Country: 'www',
40
+ Email_Type: '0',
41
+ Keyword: 'skincare creator',
42
+ Limit: '10',
43
+ social_network: 'instagram.com/',
44
+ },
45
+ 'instagram-hashtags': {
46
+ hashtags: ['desksetup'],
47
+ resultsLimit: 3,
48
+ },
49
+ 'instagram-posts': {
50
+ resultsLimit: 3,
51
+ username: ['openai'],
52
+ },
53
+ 'instagram-profiles': {
54
+ resultsLimit: 3,
55
+ usernames: ['instagram'],
56
+ },
57
+ 'instagram-search': {
58
+ searchLimit: 3,
59
+ searchTerms: ['skincare routine'],
60
+ searchType: 'user',
61
+ },
62
+ 'tiktok-ads-top': {
63
+ include_analytics: true,
64
+ limit: 1,
65
+ },
66
+ 'tiktok-comments': {
67
+ postURLs: ['https://www.tiktok.com/@example/video/1234567890'],
68
+ resultsPerPage: 5,
69
+ },
70
+ 'tiktok-profiles': {
71
+ usernames: ['tiktok'],
72
+ },
73
+ 'tiktok-related-videos': {
74
+ maxItems: 3,
75
+ postURLs: ['https://www.tiktok.com/@example/video/1234567890'],
76
+ },
77
+ 'tiktok-users': {
78
+ maxItems: 5,
79
+ searchQueries: ['skincare creator'],
80
+ },
81
+ 'tiktok-videos': {
82
+ maxItems: 3,
83
+ proxyCountryCode: 'US',
84
+ queries: ['portable blender'],
85
+ searchSection: '/video',
86
+ },
87
+ 'youtube-channel-summary': {
88
+ channels: ['@Google'],
89
+ includeChannelInfo: true,
90
+ includeVideos: false,
91
+ maxVideosPerChannel: 0,
92
+ },
93
+ 'youtube-comments': {
94
+ maxComments: 10,
95
+ startUrls: ['https://www.youtube.com/watch?v=dQw4w9WgXcQ'],
96
+ },
97
+ 'youtube-video-download': {
98
+ urls: ['https://www.youtube.com/watch?v=dQw4w9WgXcQ'],
99
+ },
100
+ 'x-posts': {
101
+ maxItems: 5,
102
+ searchTerms: ['product launch'],
103
+ },
104
+ 'x-profiles': {
105
+ handles: ['OpenAI'],
106
+ },
107
+ };
108
+ export const PUBLIC_CONTENT_SOURCE_HINTS = {
109
+ 'facebook-group-posts': [
110
+ {
111
+ url: 'https://www.facebook.com/groups/example',
112
+ },
113
+ ],
114
+ 'facebook-post-by-url': [
115
+ {
116
+ url: 'https://www.facebook.com/openai/posts/example',
117
+ },
118
+ ],
119
+ 'facebook-profile-posts': [
120
+ {
121
+ url: 'https://www.facebook.com/openai',
122
+ },
123
+ ],
124
+ 'youtube-videos': [
125
+ {
126
+ url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
127
+ },
128
+ ],
129
+ };
130
+ export const PUBLIC_CONTENT_DISCOVERY_TOOL_HINTS = {
131
+ 'web-search': {
132
+ limit: 5,
133
+ query: 'portable blender reviews',
134
+ },
135
+ };
136
+ export const MEDIA_ENDPOINT_HINTS = {
137
+ 'image-gpt-image-2-edit': {
138
+ inputUrls: ['https://example.com/reference-image.png'],
139
+ prompt: 'Edit the reference into a clean product-style vertical image.',
140
+ quality: 'medium',
141
+ size: '1024x1024',
142
+ },
143
+ 'image-gpt-image-2-text': {
144
+ aspect_ratio: '9:16',
145
+ prompt: 'A realistic vertical product image on a clean white desk.',
146
+ quality: 'medium',
147
+ size: '1024x1024',
148
+ },
149
+ 'image-nano-banana-2-edit': {
150
+ inputUrls: ['https://example.com/reference-image.png'],
151
+ prompt: 'Edit the reference into a clean product-style vertical image.',
152
+ quality: 'medium',
153
+ size: '1024x1024',
154
+ },
155
+ 'image-nano-banana-2-text': {
156
+ aspect_ratio: '9:16',
157
+ prompt: 'A realistic vertical product image on a clean white desk.',
158
+ quality: 'medium',
159
+ size: '1024x1024',
160
+ },
161
+ 'image-nano-banana-pro-edit-1k': {
162
+ inputUrls: ['https://example.com/reference-image.png'],
163
+ prompt: 'Edit the reference into a clean product-style vertical image.',
164
+ resolution: '1k',
165
+ },
166
+ 'image-nano-banana-pro-edit-2k': {
167
+ inputUrls: ['https://example.com/reference-image.png'],
168
+ prompt: 'Edit the reference into a clean product-style vertical image.',
169
+ resolution: '2k',
170
+ },
171
+ 'image-nano-banana-pro-edit-4k': {
172
+ inputUrls: ['https://example.com/reference-image.png'],
173
+ prompt: 'Edit the reference into a clean product-style vertical image.',
174
+ resolution: '4k',
175
+ },
176
+ 'image-nano-banana-pro-text-1k': {
177
+ aspect_ratio: '9:16',
178
+ prompt: 'A realistic vertical product image on a clean white desk.',
179
+ resolution: '1k',
180
+ },
181
+ 'image-nano-banana-pro-text-2k': {
182
+ aspect_ratio: '9:16',
183
+ prompt: 'A realistic vertical product image on a clean white desk.',
184
+ resolution: '2k',
185
+ },
186
+ 'image-nano-banana-pro-text-4k': {
187
+ aspect_ratio: '9:16',
188
+ prompt: 'A realistic vertical product image on a clean white desk.',
189
+ resolution: '4k',
190
+ },
191
+ 'image-seedream-v5-lite-edit': {
192
+ inputUrls: ['https://example.com/reference-image.png'],
193
+ prompt: 'Edit the reference into a clean product-style vertical image.',
194
+ size: '1024x1024',
195
+ },
196
+ 'image-seedream-v5-lite-edit-sequential': {
197
+ inputUrls: ['https://example.com/reference-image.png'],
198
+ prompt: 'Create a coherent sequence of edited product reference images.',
199
+ size: '1024x1024',
200
+ },
201
+ 'image-seedream-v5-lite-sequential': {
202
+ aspect_ratio: '9:16',
203
+ prompt: 'Create a coherent sequence of vertical product images.',
204
+ size: '1024x1024',
205
+ },
206
+ 'image-seedream-v5-lite-text': {
207
+ aspect_ratio: '9:16',
208
+ prompt: 'A realistic vertical product image on a clean white desk.',
209
+ size: '1024x1024',
210
+ },
211
+ 'transcription-whisper': {
212
+ audio: 'https://example.com/input-audio.mp3',
213
+ language: 'en',
214
+ response_format: 'verbose_json',
215
+ timestamp_granularities: ['segment'],
216
+ },
217
+ 'transcription-whisper-turbo': {
218
+ audio: 'https://example.com/input-audio.mp3',
219
+ language: 'en',
220
+ response_format: 'verbose_json',
221
+ timestamp_granularities: ['segment'],
222
+ },
223
+ 'transcription-whisper-with-video': {
224
+ language: 'en',
225
+ response_format: 'verbose_json',
226
+ timestamp_granularities: ['segment'],
227
+ video: 'https://example.com/input-video.mp4',
228
+ },
229
+ 'video-infinitetalk': {
230
+ audio: 'https://example.com/voiceover.wav',
231
+ image: 'https://example.com/persona.png',
232
+ prompt: 'Talking-head delivery in a natural vertical social ad style.',
233
+ },
234
+ 'video-kling-v2-6-pro-motion-control': {
235
+ character_orientation: 'image',
236
+ image: 'https://example.com/subject.png',
237
+ video: 'https://example.com/reference-motion.mp4',
238
+ },
239
+ 'video-kling-v3-0-pro-image': {
240
+ duration: 5,
241
+ image: 'https://example.com/start-frame.png',
242
+ prompt: 'Animate the product in a clean realistic vertical scene.',
243
+ sound: false,
244
+ },
245
+ 'video-kling-v3-0-pro-text': {
246
+ aspect_ratio: '9:16',
247
+ duration: 5,
248
+ prompt: 'A realistic vertical short-form product reveal.',
249
+ sound: false,
250
+ },
251
+ 'video-kling-v3-0-std-image': {
252
+ duration: 5,
253
+ image: 'https://example.com/start-frame.png',
254
+ prompt: 'Animate the product in a clean realistic vertical scene.',
255
+ sound: false,
256
+ },
257
+ 'video-kling-v3-0-std-text': {
258
+ aspect_ratio: '9:16',
259
+ duration: 5,
260
+ prompt: 'A realistic vertical short-form product reveal.',
261
+ sound: false,
262
+ },
263
+ 'video-seedance-2-image': {
264
+ duration: 5,
265
+ image: 'https://example.com/start-frame.png',
266
+ prompt: 'A realistic vertical short-form product reveal.',
267
+ resolution: '720p',
268
+ },
269
+ 'video-seedance-2-image-turbo': {
270
+ duration: 5,
271
+ image: 'https://example.com/start-frame.png',
272
+ prompt: 'A realistic vertical short-form product reveal.',
273
+ resolution: '720p',
274
+ },
275
+ 'video-seedance-2-text': {
276
+ duration: 5,
277
+ prompt: 'A realistic vertical short-form product reveal.',
278
+ resolution: '720p',
279
+ },
280
+ 'video-seedance-2-text-turbo': {
281
+ duration: 5,
282
+ prompt: 'A realistic vertical short-form product reveal.',
283
+ resolution: '720p',
284
+ },
285
+ 'voice-qwen3-clone': {
286
+ reference_audio: 'https://example.com/reference-voice.wav',
287
+ text: 'Short voiceover line to synthesize.',
288
+ },
289
+ 'voice-qwen3-design': {
290
+ language: 'en',
291
+ text: 'Short voiceover line to synthesize.',
292
+ voiceDescription: 'Warm, clear, natural creator voice.',
293
+ },
294
+ };
295
+ export const VIDEO_ANALYSIS_MODEL_HINTS = {
296
+ 'gemini-video-analysis': {
297
+ contents: [
298
+ {
299
+ parts: [
300
+ {
301
+ text: 'Analyze this short video and return concise creative observations.',
302
+ },
303
+ ],
304
+ },
305
+ ],
306
+ },
307
+ };
package/build/index.js CHANGED
@@ -7,6 +7,7 @@ import { formatAuthValidateReport, validateRemoteAuth, } from './auth-validate.j
7
7
  import { clearAuthState, formatAuthStatusReport, generateAuthStatusReport, } from './auth.js';
8
8
  import { readCurrentCliVersion } from './client-compatibility.js';
9
9
  import { formatDoctorReport, generateDoctorReport } from './doctor.js';
10
+ import { runHostedDomainCommand } from './hosted-domain-commands.js';
10
11
  import { assertConfigFilePermissions } from './local-state.js';
11
12
  import { readLargeCreditQuoteConfirmationChallenge, resolveLargeCreditQuoteConfirmation, } from './quote-confirmation.js';
12
13
  import { POSTPLUS_SKILLS_CURRENT_DIRECTORY_INSTALL_COMMAND, POSTPLUS_SKILLS_INSTALL_COMMAND, formatPostPlusSkillsInstallCommand, loadPublicSkillCatalog, } from './skill-catalog.js';
@@ -42,6 +43,14 @@ Usage:
42
43
  postplus auth validate [--json]
43
44
  postplus auth logout [--json]
44
45
  postplus doctor [--skill <skill-id>] [--json]
46
+ postplus research schema [--collection-key <key>] [--json]
47
+ postplus research collect --skill <skill-id> --collection-key <key> --input <hosted-envelope.json> [--output <result.json>]
48
+ postplus media schema [--endpoint <endpoint-key>] [--json]
49
+ postplus media capability --request <hosted-capability-request.json> [--output <result.json>]
50
+ postplus publish schema [--json]
51
+ postplus publish capability --request <hosted-capability-request.json> [--output <result.json>]
52
+ postplus mobile schema [--json]
53
+ postplus mobile capability --request <hosted-capability-request.json> [--output <result.json>]
45
54
  postplus quote confirm --json --challenge-file <path>
46
55
  postplus skills verify [--json]
47
56
  postplus studio init|open|status Open bundled Local Studio
@@ -229,6 +238,9 @@ function parseQuoteConfirmOptions(args) {
229
238
  function writeJson(value) {
230
239
  process.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
231
240
  }
241
+ function isHelpArg(value) {
242
+ return value === 'help' || value === '--help' || value === '-h';
243
+ }
232
244
  function parseDiagnosticOptions(args) {
233
245
  const options = {
234
246
  json: false,
@@ -351,6 +363,18 @@ async function main() {
351
363
  case 'doctor':
352
364
  process.exitCode = await runDoctor(parseDiagnosticOptions(rest));
353
365
  return;
366
+ case 'research':
367
+ process.exitCode = await runHostedDomainCommand('research', rest);
368
+ return;
369
+ case 'media':
370
+ process.exitCode = await runHostedDomainCommand('media', rest);
371
+ return;
372
+ case 'publish':
373
+ process.exitCode = await runHostedDomainCommand('publish', rest);
374
+ return;
375
+ case 'mobile':
376
+ process.exitCode = await runHostedDomainCommand('mobile', rest);
377
+ return;
354
378
  case 'quote':
355
379
  process.exitCode = await runQuoteCommand(rest);
356
380
  return;
@@ -380,6 +404,17 @@ async function main() {
380
404
  const [subcommand, ...authRest] = rest;
381
405
  switch (subcommand) {
382
406
  case 'login':
407
+ if (authRest.some(isHelpArg)) {
408
+ printAuthHelp();
409
+ process.exitCode = 0;
410
+ return;
411
+ }
412
+ if (authRest.length > 0) {
413
+ process.stderr.write(`Unknown auth login option: ${authRest[0]}\n\n`);
414
+ printAuthHelp();
415
+ process.exitCode = 1;
416
+ return;
417
+ }
383
418
  process.exitCode = await runAuthLogin();
384
419
  return;
385
420
  case 'refresh':
@@ -16,7 +16,6 @@ const POSTPLUS_SKILLS_AGENT_ARGS = POSTPLUS_SKILLS_AGENT_TARGETS.join(' ');
16
16
  export const POSTPLUS_SKILLS_INSTALL_COMMAND = formatPostPlusSkillsInstallCommand();
17
17
  export const POSTPLUS_SKILLS_CURRENT_DIRECTORY_INSTALL_COMMAND = formatPostPlusSkillsInstallCommand(POSTPLUS_SKILLS_REPO, 'current-directory');
18
18
  export const POSTPLUS_SKILLS_LIST_COMMAND = formatPostPlusSkillsListCommand();
19
- const POSTPLUS_SKILLS_INDEX_URL = 'https://raw.githubusercontent.com/PostPlusAI/postplus-skills/main/skills/INDEX.md';
20
19
  const POSTPLUS_SKILLS_CATALOG_URL = 'https://raw.githubusercontent.com/PostPlusAI/postplus-skills/main/skills/catalog.json';
21
20
  export const PUBLIC_SKILL_REQUIREMENT_KEYS = [
22
21
  'accountConnections',
@@ -45,7 +44,6 @@ export async function loadPublicSkillCatalog(fetchFn = fetch, env = process.env)
45
44
  return {
46
45
  ...catalog,
47
46
  catalogUrl,
48
- indexUrl: POSTPLUS_SKILLS_INDEX_URL,
49
47
  installCommand: formatPostPlusSkillsInstallCommand(skillsSource),
50
48
  listCommand: formatPostPlusSkillsListCommand(skillsSource),
51
49
  source: skillsSource,
@@ -59,7 +57,7 @@ export function resolvePostPlusSkillsCatalogUrl(env = process.env) {
59
57
  }
60
58
  export function formatPostPlusSkillsInstallCommand(source = POSTPLUS_SKILLS_REPO, scope = 'global') {
61
59
  const scopeArgs = scope === 'global' ? ' --global' : '';
62
- return `npx -y skills add ${source}${scopeArgs} --full-depth --skill '*' --agent ${POSTPLUS_SKILLS_AGENT_ARGS} --yes`;
60
+ return `for agent in ${POSTPLUS_SKILLS_AGENT_ARGS}; do npx -y skills add ${source}${scopeArgs} --full-depth --skill '*' --agent "$agent" --yes; done`;
63
61
  }
64
62
  export function formatPostPlusSkillsListCommand(source = POSTPLUS_SKILLS_REPO) {
65
63
  return `npx -y skills add ${source} --list --full-depth`;
@@ -17,14 +17,18 @@ export async function runPostPlusSkillUpdate(dependencies = {
17
17
  if (skillNames.length === 0) {
18
18
  throw new Error('PostPlus public skill catalog has no released skills.');
19
19
  }
20
- const updateExitCode = await dependencies.runInteractiveCommand('npx', buildPostPlusSkillUpdateArgs(skillNames, options.scope));
21
- if (updateExitCode !== 0) {
22
- return updateExitCode;
20
+ for (const agentTarget of POSTPLUS_SKILLS_AGENT_TARGETS) {
21
+ const updateExitCode = await dependencies.runInteractiveCommand('npx', buildPostPlusSkillUpdateArgs(skillNames, options.scope, agentTarget));
22
+ if (updateExitCode !== 0) {
23
+ return updateExitCode;
24
+ }
23
25
  }
24
26
  if (retiredSkillNames.length > 0) {
25
- const removeExitCode = await dependencies.runInteractiveCommand('npx', buildPostPlusSkillUninstallArgs(retiredSkillNames, options.scope));
26
- if (removeExitCode !== 0) {
27
- return removeExitCode;
27
+ for (const agentTarget of POSTPLUS_SKILLS_AGENT_TARGETS) {
28
+ const removeExitCode = await dependencies.runInteractiveCommand('npx', buildPostPlusSkillUninstallArgs(retiredSkillNames, options.scope, agentTarget));
29
+ if (removeExitCode !== 0) {
30
+ return removeExitCode;
31
+ }
28
32
  }
29
33
  }
30
34
  await writeManagedSkillBaseline({
@@ -45,12 +49,15 @@ export async function runPostPlusSkillUninstall(dependencies = {
45
49
  if (allKnownSkillNames.length === 0) {
46
50
  throw new Error('PostPlus public skill catalog has no released skills.');
47
51
  }
48
- const exitCode = await dependencies.runInteractiveCommand('npx', buildPostPlusSkillUninstallArgs(allKnownSkillNames, options.scope));
49
- if (exitCode === 0) {
50
- await clearManagedSkillBaseline();
51
- await clearUpdateCheckCache();
52
+ for (const agentTarget of POSTPLUS_SKILLS_AGENT_TARGETS) {
53
+ const exitCode = await dependencies.runInteractiveCommand('npx', buildPostPlusSkillUninstallArgs(allKnownSkillNames, options.scope, agentTarget));
54
+ if (exitCode !== 0) {
55
+ return exitCode;
56
+ }
52
57
  }
53
- return exitCode;
58
+ await clearManagedSkillBaseline();
59
+ await clearUpdateCheckCache();
60
+ return 0;
54
61
  }
55
62
  export async function generateSkillInstallStatusReport(dependencies = {
56
63
  runCommand,
@@ -210,7 +217,7 @@ export function formatSkillBaselineVerifyReport(report) {
210
217
  }
211
218
  return lines.join('\n');
212
219
  }
213
- export function buildPostPlusSkillUpdateArgs(skillNames, scope = 'global') {
220
+ export function buildPostPlusSkillUpdateArgs(skillNames, scope = 'global', agentTarget) {
214
221
  if (skillNames.length === 0) {
215
222
  throw new Error('PostPlus public skill catalog has no released skills.');
216
223
  }
@@ -224,18 +231,18 @@ export function buildPostPlusSkillUpdateArgs(skillNames, scope = 'global') {
224
231
  '--skill',
225
232
  '*',
226
233
  '--agent',
227
- ...POSTPLUS_SKILLS_AGENT_TARGETS,
234
+ ...(agentTarget ? [agentTarget] : POSTPLUS_SKILLS_AGENT_TARGETS),
228
235
  '--yes',
229
236
  ];
230
237
  }
231
- export function buildPostPlusSkillUninstallArgs(skillNames, scope = 'global') {
238
+ export function buildPostPlusSkillUninstallArgs(skillNames, scope = 'global', agentTarget) {
232
239
  return [
233
240
  ...NPX_SKILLS,
234
241
  'remove',
235
242
  ...skillNames,
236
243
  ...buildSkillScopeArgs(scope),
237
244
  '--agent',
238
- ...POSTPLUS_SKILLS_AGENT_TARGETS,
245
+ ...(agentTarget ? [agentTarget] : POSTPLUS_SKILLS_AGENT_TARGETS),
239
246
  '--yes',
240
247
  ];
241
248
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postplus/cli",
3
- "version": "0.1.34",
3
+ "version": "0.1.36",
4
4
  "packageManager": "pnpm@10.30.3+sha512.c961d1e0a2d8e354ecaa5166b822516668b7f44cb5bd95122d590dd81922f606f5473b6d23ec4a5be05e7fcd18e8488d47d978bbe981872f1145d06e9a740017",
5
5
  "type": "module",
6
6
  "description": "PostPlus CLI for PostPlus Cloud auth, status, and diagnostics.",
@@ -15,7 +15,10 @@
15
15
  "build/client-compatibility.js",
16
16
  "build/command-runner.js",
17
17
  "build/doctor.js",
18
+ "build/hosted-domain-commands.js",
18
19
  "build/hosted-release.js",
20
+ "build/hosted-schema-catalog.js",
21
+ "build/hosted-request-schemas.js",
19
22
  "build/index.js",
20
23
  "build/local-dependencies.js",
21
24
  "build/local-state.js",
@@ -42,7 +45,7 @@
42
45
  "postplus": "build/index.js"
43
46
  },
44
47
  "scripts": {
45
- "build": "node ./scripts/clean-build.mjs && tsc",
48
+ "build": "node ./scripts/clean-build.mjs && tsc && node ./scripts/finalize-build.mjs",
46
49
  "clean": "rm -rf .turbo node_modules build",
47
50
  "release:package": "node ./scripts/package-release.mjs",
48
51
  "start": "tsx src/index.ts",