@postplus/cli 0.1.41 → 0.1.42

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/build/doctor.js CHANGED
@@ -389,8 +389,15 @@ function collectHostedRequirementKeys(requirements) {
389
389
  ...requirements.sourceKeys,
390
390
  ]);
391
391
  }
392
+ // Capability families whose sub-keys are intentionally NOT expressible as catalog
393
+ // requirement keys: a skill requires the bare family capability, and any released
394
+ // sub-key readiness row satisfies it. social-publishing operations and
395
+ // public-content-discovery tools (e.g. web-search) both have no requirement-key
396
+ // binding, so requiring the family must match the whole family. Without this,
397
+ // `public-content-discovery:web-search` readiness is filtered out for skills that
398
+ // require `public-content-discovery`, producing a false "readiness check missing".
392
399
  function isWholeFamilyHostedCapability(prefix) {
393
- return prefix === 'social-publishing';
400
+ return prefix === 'public-content-discovery' || prefix === 'social-publishing';
394
401
  }
395
402
  function requiresSocialPublishingPlan(requirements) {
396
403
  return requirements.hostedCapabilities.includes('social-publishing');
@@ -441,6 +441,10 @@ export const HOSTED_EXECUTION_MANIFESTS = {
441
441
  "class": "default",
442
442
  "flag": "--output-format",
443
443
  "type": "string",
444
+ "enumValues": [
445
+ "png",
446
+ "jpeg"
447
+ ],
444
448
  "default": "png",
445
449
  "required": false
446
450
  },
@@ -518,6 +522,10 @@ export const HOSTED_EXECUTION_MANIFESTS = {
518
522
  "class": "default",
519
523
  "flag": "--output-format",
520
524
  "type": "string",
525
+ "enumValues": [
526
+ "png",
527
+ "jpeg"
528
+ ],
521
529
  "default": "png",
522
530
  "required": false
523
531
  },
@@ -576,6 +584,10 @@ export const HOSTED_EXECUTION_MANIFESTS = {
576
584
  "class": "default",
577
585
  "flag": "--output-format",
578
586
  "type": "string",
587
+ "enumValues": [
588
+ "png",
589
+ "jpeg"
590
+ ],
579
591
  "default": "png",
580
592
  "required": false
581
593
  },
@@ -634,6 +646,10 @@ export const HOSTED_EXECUTION_MANIFESTS = {
634
646
  "class": "default",
635
647
  "flag": "--output-format",
636
648
  "type": "string",
649
+ "enumValues": [
650
+ "png",
651
+ "jpeg"
652
+ ],
637
653
  "default": "png",
638
654
  "required": false
639
655
  },
@@ -692,6 +708,10 @@ export const HOSTED_EXECUTION_MANIFESTS = {
692
708
  "class": "default",
693
709
  "flag": "--output-format",
694
710
  "type": "string",
711
+ "enumValues": [
712
+ "png",
713
+ "jpeg"
714
+ ],
695
715
  "default": "png",
696
716
  "required": false
697
717
  },
@@ -758,6 +778,10 @@ export const HOSTED_EXECUTION_MANIFESTS = {
758
778
  "class": "default",
759
779
  "flag": "--output-format",
760
780
  "type": "string",
781
+ "enumValues": [
782
+ "png",
783
+ "jpeg"
784
+ ],
761
785
  "default": "png",
762
786
  "required": false
763
787
  },
@@ -824,6 +848,10 @@ export const HOSTED_EXECUTION_MANIFESTS = {
824
848
  "class": "default",
825
849
  "flag": "--output-format",
826
850
  "type": "string",
851
+ "enumValues": [
852
+ "png",
853
+ "jpeg"
854
+ ],
827
855
  "default": "png",
828
856
  "required": false
829
857
  },
@@ -890,6 +918,10 @@ export const HOSTED_EXECUTION_MANIFESTS = {
890
918
  "class": "default",
891
919
  "flag": "--output-format",
892
920
  "type": "string",
921
+ "enumValues": [
922
+ "png",
923
+ "jpeg"
924
+ ],
893
925
  "default": "png",
894
926
  "required": false
895
927
  },
@@ -1308,7 +1340,6 @@ export const HOSTED_EXECUTION_MANIFESTS = {
1308
1340
  "flag": null,
1309
1341
  "type": "string",
1310
1342
  "enumValues": [
1311
- "480p",
1312
1343
  "720p",
1313
1344
  "1080p"
1314
1345
  ],
@@ -1467,7 +1498,6 @@ export const HOSTED_EXECUTION_MANIFESTS = {
1467
1498
  "flag": null,
1468
1499
  "type": "string",
1469
1500
  "enumValues": [
1470
- "480p",
1471
1501
  "720p",
1472
1502
  "1080p"
1473
1503
  ],
@@ -2388,6 +2418,19 @@ export const HOSTED_EXECUTION_MANIFESTS = {
2388
2418
  "class": "default",
2389
2419
  "flag": null,
2390
2420
  "type": "string",
2421
+ "enumValues": [
2422
+ "auto",
2423
+ "Chinese",
2424
+ "English",
2425
+ "German",
2426
+ "Italian",
2427
+ "Portuguese",
2428
+ "Spanish",
2429
+ "Japanese",
2430
+ "Korean",
2431
+ "French",
2432
+ "Russian"
2433
+ ],
2391
2434
  "default": "auto",
2392
2435
  "required": false
2393
2436
  },
@@ -2448,6 +2491,19 @@ export const HOSTED_EXECUTION_MANIFESTS = {
2448
2491
  "class": "default",
2449
2492
  "flag": null,
2450
2493
  "type": "string",
2494
+ "enumValues": [
2495
+ "auto",
2496
+ "Chinese",
2497
+ "English",
2498
+ "German",
2499
+ "Italian",
2500
+ "Portuguese",
2501
+ "Spanish",
2502
+ "Japanese",
2503
+ "Korean",
2504
+ "French",
2505
+ "Russian"
2506
+ ],
2451
2507
  "default": "auto",
2452
2508
  "required": false
2453
2509
  },
@@ -244,8 +244,11 @@ function requireResolvedEndpoint(resolved, verb, endpointKey) {
244
244
  // video-analysis verb (request-json surface). The agent authors an opaque Gemini
245
245
  // request object (contents + generationConfig) in `--request <file>`; capability,
246
246
  // operation, and modelKey come from the verb + positional, so the body posts
247
- // EXACTLY the locked Web contract. There is no field classification and no
248
- // estimatedUsage — the payload is forwarded verbatim as the Gemini request.
247
+ // EXACTLY the locked Web contract. There is no field classification; the payload
248
+ // is forwarded verbatim as the Gemini request. The optional `--video-seconds`
249
+ // flag is the one runner-supplied hint: when provided it is sent as
250
+ // `estimatedUsage.videoSeconds` so the Web boundary can route eligible short
251
+ // videos through its preflight/routing path (omit it to use the default route).
249
252
  async function runVideoAnalysisVerb(args) {
250
253
  const { modelKey, resolved, verb } = args;
251
254
  const flags = parseFlags(args.args, new Set(['json']));
@@ -256,6 +259,7 @@ async function runVideoAnalysisVerb(args) {
256
259
  'quote-confirmation-token',
257
260
  'request',
258
261
  'skill',
262
+ 'video-seconds',
259
263
  ]);
260
264
  for (const key of [...flags.values.keys(), ...flags.booleans]) {
261
265
  if (!allowedKeys.has(key)) {
@@ -269,11 +273,26 @@ async function runVideoAnalysisVerb(args) {
269
273
  throw new Error(`media ${verb} ${modelKey} --request must be a JSON object of Gemini request payload.`);
270
274
  }
271
275
  const payload = raw;
276
+ // Optional runner-supplied hint: the source video duration. When provided it is
277
+ // forwarded as estimatedUsage.videoSeconds so the Web boundary's video-analysis
278
+ // routing/preflight can consider eligible short videos; omitting it leaves the
279
+ // request on the default route. The CLI does not probe the media itself (no
280
+ // ffprobe in the open-source runner) — it only passes a value the caller knows.
281
+ const videoSecondsFlag = flags.values.get('video-seconds') ?? null;
282
+ let estimatedUsage;
283
+ if (videoSecondsFlag !== null) {
284
+ const parsed = Number(videoSecondsFlag);
285
+ if (!Number.isFinite(parsed) || parsed <= 0) {
286
+ throw new Error(`media ${verb} --video-seconds must be a positive number of seconds.`);
287
+ }
288
+ estimatedUsage = { videoSeconds: parsed };
289
+ }
272
290
  const body = {
273
291
  capability: 'video-analysis',
274
292
  operation: 'analyze',
275
293
  modelKey,
276
294
  payload,
295
+ ...(estimatedUsage ? { estimatedUsage } : {}),
277
296
  operationId: flags.values.get('hosted-operation-id') ??
278
297
  `postplus-cli:media:video-analysis:analyze:${randomUUID()}`,
279
298
  quoteConfirmationToken: flags.values.get('quote-confirmation-token') ?? undefined,
@@ -1028,10 +1047,13 @@ function printMediaEndpointHelp(domain, verb, targetKey, resolved) {
1028
1047
 
1029
1048
  Surface: request-json (opaque Gemini request payload)
1030
1049
  Usage:
1031
- postplus ${domain} ${verb} ${targetKey} --request <input.json> [--json] [--output <result.json>]
1050
+ postplus ${domain} ${verb} ${targetKey} --request <input.json> [--video-seconds <n>] [--json] [--output <result.json>]
1032
1051
 
1033
1052
  --request <file> A JSON object authored verbatim as the Gemini request
1034
1053
  (contents + optional generationConfig) under "payload".
1054
+ --video-seconds <n> Optional source video duration in seconds. Supplying it
1055
+ lets the hosted boundary route eligible short videos through
1056
+ its preflight path; omit it to use the default route.
1035
1057
  Runner-managed (minted by the CLI; never in the body): operationId, quoteConfirmationToken
1036
1058
  `);
1037
1059
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postplus/cli",
3
- "version": "0.1.41",
3
+ "version": "0.1.42",
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.",