vigthoria-cli 1.13.29 → 1.13.30

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/README.md CHANGED
@@ -216,6 +216,18 @@ This generates a tower defense game from scratch with Agent Mode, validates it i
216
216
 
217
217
  ## Commands
218
218
 
219
+ ### Creative V2 planning
220
+
221
+ Use the guarded Creative V2 route for storyboards, videos, commercials,
222
+ avatars, music videos, and audio. The command creates a plan/preflight only;
223
+ it never approves paid rendering, credit debits, publishing, or identity
224
+ processing:
225
+
226
+ ```bash
227
+ vigthoria creative workflows
228
+ vigthoria creative plan --workflow storyboard --duration 30 --aspect-ratio 16:9 "Launch film for a privacy-first AI workspace"
229
+ ```
230
+
219
231
  ### Chat Mode
220
232
 
221
233
  ```bash
@@ -12,6 +12,7 @@ _vigthoria() {
12
12
  'chat-resume:Resume the latest chat session for the current or specified project'
13
13
  'commands:List every CLI command grouped by command family'
14
14
  'config:Configure Vigthoria CLI settings'
15
+ 'creative:Plan guarded media workflows with the native V2 Creative Agent'
15
16
  'deploy:Deploy and host your project on Vigthoria infrastructure'
16
17
  'device:Android Developer Bridge commands via local ADB'
17
18
  'devtools:DevTools Bridge commands for browser debugging'
@@ -1,6 +1,6 @@
1
1
  # Generated from contracts/phase-0/command-manifest.json; do not edit.
2
2
  _vigthoria_completions() {
3
3
  local cur="${COMP_WORDS[COMP_CWORD]}"
4
- COMPREPLY=( $(compgen -W 'agent auth background bridge cancel chat chat-resume commands config deploy device devtools doctor edit explain fix fork game generate history hub hyper-loop init legion login logout menu music operator preview replay repo review security status update v4 v4-menu wallet workflow' -- "$cur") )
4
+ COMPREPLY=( $(compgen -W 'agent auth background bridge cancel chat chat-resume commands config creative deploy device devtools doctor edit explain fix fork game generate history hub hyper-loop init legion login logout menu music operator preview replay repo review security status update v4 v4-menu wallet workflow' -- "$cur") )
5
5
  }
6
6
  complete -F _vigthoria_completions vigthoria vig vigthoria-chat
@@ -8,6 +8,7 @@ complete -c vigthoria -c vig -c vigthoria-chat -n '__fish_use_subcommand' -a 'ch
8
8
  complete -c vigthoria -c vig -c vigthoria-chat -n '__fish_use_subcommand' -a 'chat-resume' -d 'Resume the latest chat session for the current or specified project'
9
9
  complete -c vigthoria -c vig -c vigthoria-chat -n '__fish_use_subcommand' -a 'commands' -d 'List every CLI command grouped by command family'
10
10
  complete -c vigthoria -c vig -c vigthoria-chat -n '__fish_use_subcommand' -a 'config' -d 'Configure Vigthoria CLI settings'
11
+ complete -c vigthoria -c vig -c vigthoria-chat -n '__fish_use_subcommand' -a 'creative' -d 'Plan guarded media workflows with the native V2 Creative Agent'
11
12
  complete -c vigthoria -c vig -c vigthoria-chat -n '__fish_use_subcommand' -a 'deploy' -d 'Deploy and host your project on Vigthoria infrastructure'
12
13
  complete -c vigthoria -c vig -c vigthoria-chat -n '__fish_use_subcommand' -a 'device' -d 'Android Developer Bridge commands via local ADB'
13
14
  complete -c vigthoria -c vig -c vigthoria-chat -n '__fish_use_subcommand' -a 'devtools' -d 'DevTools Bridge commands for browser debugging'
@@ -0,0 +1,13 @@
1
+ import type { Command } from 'commander';
2
+ import type { Config } from '../utils/config.js';
3
+ import type { Logger } from '../utils/logger.js';
4
+ export type CreativeWorkflow = 'video' | 'storyboard' | 'commercial' | 'avatar' | 'music-video' | 'music-audio';
5
+ export declare function buildCreativePlanPrompt(options: {
6
+ workflow: CreativeWorkflow;
7
+ brief: string;
8
+ title?: string;
9
+ duration?: number;
10
+ aspectRatio?: string;
11
+ project?: string;
12
+ }): string;
13
+ export declare function registerCreativeCommands(program: Command, config: Config, logger: Logger): void;
@@ -0,0 +1,88 @@
1
+ import { ChatCommand } from './chat.js';
2
+ const CREATIVE_ROUTES = {
3
+ video: { taxonomy: 'v2_creative.video_project', runtime: 'v2-creative-studio-core' },
4
+ storyboard: { taxonomy: 'v2_creative.video_project', runtime: 'v2-creative-studio-core' },
5
+ commercial: { taxonomy: 'v2_creative.video_project', runtime: 'v2-creative-studio-core' },
6
+ avatar: { taxonomy: 'v2_creative.avatar_operator', runtime: 'v2-creative-avatar-operator' },
7
+ 'music-video': { taxonomy: 'v2_creative.video_project', runtime: 'v2-creative-studio-core' },
8
+ 'music-audio': { taxonomy: 'v2_creative.music_generation', runtime: 'vigthoria-music-ai' },
9
+ };
10
+ export function buildCreativePlanPrompt(options) {
11
+ const route = CREATIVE_ROUTES[options.workflow];
12
+ return [
13
+ 'Route this request through the native V2 Creative Agent workflow.',
14
+ 'Planning only: do not start paid/cloud rendering, debit credits, publish media, or process identity assets. Return the plan, preflight, quote, and explicit approval gates first.',
15
+ `@vigthoria-creative-v2:${JSON.stringify({
16
+ contract: 'vigthoria-cli-creative-v2.v1',
17
+ taxonomy: route.taxonomy,
18
+ target_runtime: route.runtime,
19
+ phase: 'plan_only',
20
+ workflow: options.workflow,
21
+ title: options.title?.trim() || undefined,
22
+ brief: options.brief.trim(),
23
+ duration_seconds: options.duration,
24
+ aspect_ratio: options.aspectRatio || '16:9',
25
+ workspace_root: options.project,
26
+ safety: {
27
+ paid_render_approved: false,
28
+ identity_processing_approved: false,
29
+ require_preflight_and_quote: true,
30
+ },
31
+ })}`,
32
+ ].join('\n');
33
+ }
34
+ export function registerCreativeCommands(program, config, logger) {
35
+ const creative = program
36
+ .command('creative')
37
+ .description('Plan guarded media workflows with the native V2 Creative Agent');
38
+ creative
39
+ .command('workflows')
40
+ .description('List supported Creative V2 workflow routes')
41
+ .action(() => {
42
+ for (const [name, route] of Object.entries(CREATIVE_ROUTES)) {
43
+ console.log(`${name}\t${route.taxonomy}\t${route.runtime}`);
44
+ }
45
+ });
46
+ creative
47
+ .command('plan <brief...>')
48
+ .description('Create a plan/preflight only; never approves rendering or billing')
49
+ .option('-w, --workflow <workflow>', 'video, storyboard, commercial, avatar, music-video, or music-audio', 'storyboard')
50
+ .option('-t, --title <title>', 'Project or campaign title')
51
+ .option('-d, --duration <seconds>', 'Target duration in seconds', (value) => Number.parseInt(value, 10), 30)
52
+ .option('-a, --aspect-ratio <ratio>', '16:9, 9:16, or 1:1', '16:9')
53
+ .option('-p, --project <path>', 'Workspace/project context', process.cwd())
54
+ .option('--json', 'Emit machine-readable direct-agent output', false)
55
+ .action(async (briefParts, options) => {
56
+ const workflow = String(options.workflow || '').trim();
57
+ if (!Object.prototype.hasOwnProperty.call(CREATIVE_ROUTES, workflow)) {
58
+ throw new Error(`Unsupported Creative V2 workflow: ${options.workflow}`);
59
+ }
60
+ const duration = Number(options.duration);
61
+ if (!Number.isFinite(duration) || duration < 5 || duration > 600) {
62
+ throw new Error('Creative duration must be between 5 and 600 seconds.');
63
+ }
64
+ const aspectRatio = String(options.aspectRatio || '16:9');
65
+ if (!['16:9', '9:16', '1:1'].includes(aspectRatio)) {
66
+ throw new Error('Creative aspect ratio must be 16:9, 9:16, or 1:1.');
67
+ }
68
+ const project = String(options.project || process.cwd());
69
+ const prompt = buildCreativePlanPrompt({
70
+ workflow,
71
+ brief: briefParts.join(' '),
72
+ title: options.title,
73
+ duration,
74
+ aspectRatio,
75
+ project,
76
+ });
77
+ await new ChatCommand(config, logger, program).run({
78
+ model: 'agent',
79
+ project,
80
+ projectProvided: Boolean(options.project),
81
+ agent: true,
82
+ autoApprove: false,
83
+ prompt,
84
+ json: Boolean(options.json),
85
+ });
86
+ });
87
+ creative.action(() => creative.outputHelp());
88
+ }
package/dist/index.js CHANGED
@@ -29,6 +29,7 @@ import { registerWorkflowCommands } from './commands/workflow.js';
29
29
  import { LegionCommand } from './commands/legion.js';
30
30
  import { WalletCommand } from './commands/wallet.js';
31
31
  import { registerV4Commands } from './commands/v4-registration.js';
32
+ import { registerCreativeCommands } from './commands/creative-registration.js';
32
33
  import { Config } from './utils/config.js';
33
34
  import { Logger, CH } from './utils/logger.js';
34
35
  import chalk from 'chalk';
@@ -419,6 +420,7 @@ export async function main(args) {
419
420
  registerPlatformCommands(program, config, logger);
420
421
  registerCodingCommands(program, config, logger);
421
422
  registerWorkflowCommands(program, config, logger);
423
+ registerCreativeCommands(program, config, logger);
422
424
  registerProductAndRunCommands(program, config, logger);
423
425
  // ==================== AUTH COMMANDS ====================
424
426
  // Auth commands
@@ -1,6 +1,7 @@
1
1
  const REQUIRED_SESSION_PATHS = new Set([
2
2
  'chat', 'chat-resume', 'agent', 'operator',
3
3
  'edit', 'generate', 'explain', 'fix', 'review',
4
+ 'creative plan',
4
5
  'workflow templates', 'workflow list', 'workflow use-template', 'workflow run', 'workflow status', 'workflow delete',
5
6
  'hub activate', 'hub active',
6
7
  'repo push', 'repo review', 'repo pull', 'repo list', 'repo status', 'repo share', 'repo delete', 'repo open-in',
@@ -16,6 +17,7 @@ const NO_SESSION_PATHS = new Set([
16
17
  'device', 'device status', 'device list', 'device screenshot', 'device install', 'device launch', 'device logs', 'device tcpip', 'device connect', 'device disconnect',
17
18
  'security', 'security scan', 'security score', 'security fix',
18
19
  'workflow',
20
+ 'creative', 'creative workflows',
19
21
  'hub', 'hub discover', 'hub list', 'hub search', 'hub info',
20
22
  'music', 'music generate', 'music status',
21
23
  'repo', 'repo clone',
@@ -163,12 +163,20 @@ export class Config {
163
163
  // canonical-file precedence.
164
164
  if (legacyConf && legacyMtime > canonicalMtime) {
165
165
  const legacyCredentials = normalizeConfigValue(legacyConf);
166
- merged.authToken = legacyCredentials.authToken;
167
- merged.refreshToken = legacyCredentials.refreshToken;
168
- merged.userId = legacyCredentials.userId;
169
- merged.email = legacyCredentials.email;
170
- merged.v3ServiceKey = legacyCredentials.v3ServiceKey;
171
- merged.subscription = legacyCredentials.subscription;
166
+ // Old `conf` releases could touch or recreate an empty
167
+ // AppData file during any command. That timestamp is not
168
+ // an explicit logout and must never erase a valid session
169
+ // already stored in the canonical ~/.vigthoria record.
170
+ // A token-bearing legacy bundle can still win by recency;
171
+ // current releases record logout atomically in canonical.
172
+ if (legacyCredentials.authToken || !merged.authToken) {
173
+ merged.authToken = legacyCredentials.authToken;
174
+ merged.refreshToken = legacyCredentials.refreshToken;
175
+ merged.userId = legacyCredentials.userId;
176
+ merged.email = legacyCredentials.email;
177
+ merged.v3ServiceKey = legacyCredentials.v3ServiceKey;
178
+ merged.subscription = legacyCredentials.subscription;
179
+ }
172
180
  }
173
181
  return merged;
174
182
  },
@@ -192,7 +192,12 @@ export class RuntimeTempManager {
192
192
  const markerPath = path.join(realRoot, ROOT_MARKER);
193
193
  if (this.source === 'explicit-override' && existed && !fs.existsSync(markerPath)) {
194
194
  const existingEntries = fs.readdirSync(realRoot);
195
- if (existingEntries.length > 0) {
195
+ // Another CLI process may have claimed this previously-empty root
196
+ // between our first marker check and directory listing. Re-check the
197
+ // ownership marker before rejecting its newly-created lease/lock as
198
+ // foreign data. The marker content is validated below, so this does
199
+ // not weaken the dedicated-root boundary.
200
+ if (existingEntries.length > 0 && !fs.existsSync(markerPath)) {
196
201
  throw new RuntimeTempError('Explicit temporary storage must be empty or already marked as Vigthoria-managed.', 'TEMP_ROOT_NOT_DEDICATED');
197
202
  }
198
203
  }
package/install.ps1 CHANGED
@@ -5,12 +5,12 @@
5
5
  $ErrorActionPreference = "Stop"
6
6
 
7
7
  # Configuration
8
- $CLI_VERSION = "1.13.20"
8
+ $CLI_VERSION = "1.13.30"
9
9
  $INSTALL_DIR = "$env:USERPROFILE\.vigthoria"
10
10
  $NPM_PACKAGE = "vigthoria-cli"
11
11
  $MANIFEST_URL = "https://extension.vigthoria.io/downloads/manifest.json"
12
12
  $HOSTED_TARBALL_URL = "https://extension.vigthoria.io/downloads/vigthoria-cli-$CLI_VERSION.tgz"
13
- $HOSTED_TARBALL_SHA256 = ""
13
+ $HOSTED_TARBALL_SHA256 = "1d125d37edb459a02ef3f38c0e8515622f3c6ea128199dbb1641d107c80020b9"
14
14
  $RELEASE_RESOLVER = Join-Path $PSScriptRoot "scripts\release\resolve-release-manifest.mjs"
15
15
  $RELEASE_INSTALLER = Join-Path $PSScriptRoot "scripts\release\install-release.mjs"
16
16
 
package/install.sh CHANGED
@@ -26,11 +26,11 @@ else
26
26
  fi
27
27
 
28
28
  # Configuration
29
- CLI_VERSION="1.13.20"
29
+ CLI_VERSION="1.13.30"
30
30
  INSTALL_DIR="$HOME/.vigthoria"
31
31
  MANIFEST_URL="${VIGTHORIA_UPDATE_MANIFEST_URL:-https://extension.vigthoria.io/downloads/manifest.json}"
32
32
  HOSTED_TARBALL_URL="https://extension.vigthoria.io/downloads/vigthoria-cli-${CLI_VERSION}.tgz"
33
- HOSTED_TARBALL_SHA256=""
33
+ HOSTED_TARBALL_SHA256="1d125d37edb459a02ef3f38c0e8515622f3c6ea128199dbb1641d107c80020b9"
34
34
  INSTALLER_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd || true)"
35
35
  RELEASE_RESOLVER="$INSTALLER_ROOT/scripts/release/resolve-release-manifest.mjs"
36
36
  RELEASE_INSTALLER="$INSTALLER_ROOT/scripts/release/install-release.mjs"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vigthoria-cli",
3
- "version": "1.13.29",
3
+ "version": "1.13.30",
4
4
  "description": "Vigthoria Coder CLI - AI-powered terminal coding assistant",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",