--- install scripts ---
### postinstall
node scripts/postinstall.js
### prepack
node -e "require('fs').copyFileSync('package.json','package.json.bak');const f='package.json',j=JSON.parse(require('fs').readFileSync(f));delete j.workspaces;require('fs').writeFileSync(f,JSON.stringify(j,null,2)+'\n')"
### prepublishOnly
npm run build && npm test
--- package/skills/vds-skill/install-deps.mjs (excerpt) ---
#!/usr/bin/env node
/**
* VDS Skill Pack — dependency installer
*
* Cross-platform (Windows, Linux, macOS).
*
* Usage:
* node install-deps.mjs <projectPath> <packDir> [--force]
*
* What it does:
* 1. Checks Python >= 3.12
* 2. Ensures uv is installed
* 3. Copies runtime to ~/.claude/vds-scripts/
* 4. Runs uv sync
* 5. Provisions .env template at ~/.vds/.env
*/
import { execSync } from 'child_process';
import { existsSync, cpSync, mkdirSync, writeFileSync, rmSync, readFileSync } from 'fs';
import { join } from 'path';
import { homedir } from 'os';
const IS_WIN = process.platform === 'win32';
const IS_MAC = process.platform === 'darwin';
let _resolvedPython;
function resolvePython() {
if (_resolvedPython) return _resolvedPython;
const candidates = IS_WIN
? ['python3', 'python', 'py']
: ['python3', 'python'];
for (const cmd of candidates) {
try {
const out = execSync(`${cmd} --version`, { encoding: 'utf-8', stdio: 'pipe' });
if (out.includes('Python')) { _resolvedPython = cmd; return cmd; }
} catch { /* not available */ }
}
_resolvedPython = IS_WIN ? 'python' : 'python3';
return _resolvedPython;
}
const PYTHON = resolvePython();
const VDS_DIR = join(homedir(), '.claude', 'vds-scripts');
const ENV_DIR = join(homedir(), '.vds');
const ENV_FILE = join(ENV_DIR, '.env');
const [, , projectPath, packDir] = process.argv;
const force = process.argv.includes('--force');
// ── Helpers ──
function log(icon, msg) {
--- package/skills/vds-skill/runtime/vidp_orchestrator/src/vds_vidp_orchestrator/workflows.py (excerpt) ---
"""Workflow alias registry — map friendly names to VIDP workflow UUIDs.
Two layers, merged at lookup time:
1. **Package-shipped defaults** at ``<pkg>/workflows.json`` — curated by the
maintainer, distributed with the npm package, read-only at runtime.
2. **User overrides** at ``~/.vds/vidp-workflows.json`` (or
``$VDS_VIDP_WORKFLOWS_FILE``) — optional, user-editable, takes precedence
over package defaults. CLI ``add``/``remove`` only touch this file.
``resolve_workflow_id()`` accepts a UUID or an alias and returns the canonical
UUID. Alias lookup is case-insensitive.
"""
from __future__ import annotations
import json
import os
import re
from pathlib import Path
UUID_RE = re.compile(r"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
def package_workflows_file() -> Path:
"""Path to the package-shipped alias registry (read-only)."""
return Path(__file__).resolve().parent / "workflows.json"
def user_workflows_file() -> Path:
"""Path to the user-override alias registry (mutable; CLI writes here)."""
override = os.environ.get("VDS_VIDP_WORKFLOWS_FILE", "").strip()
if override:
return Path(override).expanduser()
return Path.home() / ".vds" / "vidp-workflows.json"
# Backwards-compatible name used by the CLI before the split.
def workflows_file() -> Path:
"""Deprecated alias for :func:`user_workflows_file`."""
return user_workflows_file()
def _read_json(path: Path) -> dict[str, str]:
if no
--- package/skills/vds-skill/runtime/vds_cli_common/src/vds_cli_common/context.py (excerpt) ---
"""CLI Context for unified state management across VDS CLIs.
This module provides CLIContext, a dataclass that handles:
- TTY detection for adaptive output
- Color control (flags, env vars, TTY detection)
- Quiet mode for suppressing non-essential output
- JSON-only mode for machine-readable output
Usage:
@app.callback()
def callback(
ctx: typer.Context,
json_only: bool = typer.Option(False, "--json-only", "-j"),
quiet: bool = typer.Option(False, "--quiet", "-q"),
no_color: bool = typer.Option(False, "--no-color"),
color: bool = typer.Option(False, "--color"),
):
cli_ctx = CLIContext.from_options(
json_only=json_only,
quiet=quiet,
no_color=no_color,
force_color=color,
)
ctx.obj = {"cli_ctx": cli_ctx}
"""
from __future__ import annotations
import os
import sys
from dataclasses import dataclass, field
from typing import TYPE_CHECKING
if TYPE_CHECKING:
import typer
from rich.console import Console
@dataclass
class CLIContext:
"""Unified CLI context for all VDS orchestrator CLIs.
Handles TTY detection, color preferences, output mode, and quiet mode
consistently across all CLIs.
Attributes:
json_only: Output clean JSON only (existing behavior)
structured_logs: Emit JSON logs to stderr
is_tty: Whether stdout is an interactive terminal
no_color: Disable colors explicitly
force_color: Force#!/usr/bin/env node
/**
* VDS Skill Pack — dependency installer
*
* Cross-platform (Windows, Linux, macOS).
*
* Usage:
* node install-deps.mjs <projectPath> <packDir> [--force]
*
* What it does:
* 1. Checks Python >= 3.12
* 2. Ensures uv is installed
* 3. Copies runtime to ~/.claude/vds-scripts/
* 4. Runs uv sync
* 5. Provisions .env template at ~/.vds/.env
*/
import { execSync } from 'child_process';
import { existsSync, cpSync, mkdirSync, writeFileSync, rmSync, readFileSync } from 'fs';
import { join } from 'path';
import { homedir } from 'os';
const IS_WIN = process.platform === 'win32';
const IS_MAC = process.platform === 'darwin';
let _resolvedPython;
function resolvePython() {
if (_resolvedPython) return _resolvedPython;
const candidates = IS_WIN
? ['python3', 'python', 'py']
: ['python3', 'python'];
for (const cmd of candidates) {
try {
const out = execSync(`${cmd} --version`, { encoding: 'utf-8', stdio: 'pipe' });
if (out.includes('Python')) { _resolvedPython = cmd; return cmd; }
} catch { /* not available */ }
}
_resolvedPython = IS_WIN ? 'python' : 'python3';
return _resolvedPython;
}
const PYTHON = resolvePython();
const VDS_DIR = join(homedir(), '.claude', 'vds-scripts');
const ENV_DIR = join(homedir(), '.vds');
const ENV_FILE = join(ENV_DIR, '.env');
const [, , projectPath, packDir] = process.argv;
const force = process.argv.includes('--force');
// ── Helpers ──
function log(icon, msg) {
"""CLI Context for unified state management across VDS CLIs.
This module provides CLIContext, a dataclass that handles:
- TTY detection for adaptive output
- Color control (flags, env vars, TTY detection)
- Quiet mode for suppressing non-essential output
- JSON-only mode for machine-readable output
Usage:
@app.callback()
def callback(
ctx: typer.Context,
json_only: bool = typer.Option(False, "--json-only", "-j"),
quiet: bool = typer.Option(False, "--quiet", "-q"),
no_color: bool = typer.Option(False, "--no-color"),
color: bool = typer.Option(False, "--color"),
):
cli_ctx = CLIContext.from_options(
json_only=json_only,
quiet=quiet,
no_color=no_color,
force_color=color,
)
ctx.obj = {"cli_ctx": cli_ctx}
"""
from __future__ import annotations
import os
import sys
from dataclasses import dataclass, field
from typing import TYPE_CHECKING
if TYPE_CHECKING:
import typer
from rich.console import Console
@dataclass
class CLIContext:
"""Unified CLI context for all VDS orchestrator CLIs.
Handles TTY detection, color preferences, output mode, and quiet mode
consistently across all CLIs.
Attributes:
json_only: Output clean JSON only (existing behavior)
structured_logs: Emit JSON logs to stderr
is_tty: Whether stdout is an interactive terminal
no_color: Disable colors explicitly
force_color: Force