deepvista-cli 0.3.0__tar.gz → 0.5.0__tar.gz

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.
Files changed (93) hide show
  1. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/.github/workflows/ci.yml +26 -0
  2. deepvista_cli-0.5.0/.release-please-manifest.json +3 -0
  3. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/CHANGELOG.md +15 -0
  4. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/PKG-INFO +39 -1
  5. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/README.md +38 -0
  6. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/commands/auth.py +33 -0
  7. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/commands/skill.py +108 -1
  8. deepvista_cli-0.5.0/deepvista_cli/commands/task_queue.py +524 -0
  9. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/main.py +3 -0
  10. deepvista_cli-0.5.0/install.ps1 +401 -0
  11. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/plugins/claude-code/.claude-plugin/plugin.json +1 -1
  12. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/pyproject.toml +1 -1
  13. deepvista_cli-0.5.0/tests/test_task_queue_commands.py +519 -0
  14. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/uv.lock +1 -1
  15. deepvista_cli-0.3.0/.release-please-manifest.json +0 -3
  16. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/.claude-plugin/marketplace.json +0 -0
  17. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/.github/workflows/publish.yml +0 -0
  18. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/.github/workflows/release-please.yml +0 -0
  19. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/.gitignore +0 -0
  20. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/.pre-commit-config.yaml +0 -0
  21. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/CLAUDE.md +0 -0
  22. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/CONTRIBUTING.md +0 -0
  23. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/LICENSE +0 -0
  24. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/__init__.py +0 -0
  25. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/agent_catalog.py +0 -0
  26. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/auth/__init__.py +0 -0
  27. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/auth/callback_server.py +0 -0
  28. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/auth/login.py +0 -0
  29. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/auth/tokens.py +0 -0
  30. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/client/__init__.py +0 -0
  31. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/client/http.py +0 -0
  32. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/client/origin.py +0 -0
  33. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/commands/__init__.py +0 -0
  34. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/commands/agents.py +0 -0
  35. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/commands/card.py +0 -0
  36. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/commands/chat.py +0 -0
  37. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/commands/config.py +0 -0
  38. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/commands/lint.py +0 -0
  39. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/commands/memory.py +0 -0
  40. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/commands/notes.py +0 -0
  41. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/commands/schedule.py +0 -0
  42. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/commands/session.py +0 -0
  43. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/commands/upgrade.py +0 -0
  44. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/commands/vistabase.py +0 -0
  45. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/config.py +0 -0
  46. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/output/__init__.py +0 -0
  47. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/output/formatter.py +0 -0
  48. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/resources/__init__.py +0 -0
  49. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/resources/workflow_host_runtime.md +0 -0
  50. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/session_note.py +0 -0
  51. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/skill_catalog.py +0 -0
  52. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/tui/__init__.py +0 -0
  53. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/tui/app.py +0 -0
  54. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/deepvista_cli/workflow_doc.py +0 -0
  55. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/docs/assets/deepvista-banner.png +0 -0
  56. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/install.sh +0 -0
  57. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/plugins/README.md +0 -0
  58. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/plugins/claude-code/README.md +0 -0
  59. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/plugins/claude-code/agents/.gitignore +0 -0
  60. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/plugins/claude-code/commands/deepvista.md +0 -0
  61. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/plugins/claude-code/commands/refresh-skills.md +0 -0
  62. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/plugins/claude-code/hooks/hooks.json +0 -0
  63. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/plugins/claude-code/scripts/deepvista-session-end.sh +0 -0
  64. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/plugins/claude-code/scripts/deepvista-session-start.sh +0 -0
  65. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/plugins/claude-code/scripts/deepvista-session-turn.sh +0 -0
  66. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/plugins/claude-code/scripts/deepvista-skill-url.py +0 -0
  67. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/plugins/claude-code/scripts/deepvista-sync.sh +0 -0
  68. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/plugins/claude-code/skills/.gitignore +0 -0
  69. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/plugins/claude-code/skills/install-deepvista-cli/SKILL.md +0 -0
  70. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/release-please-config.json +0 -0
  71. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/scripts/check_plugin_version.py +0 -0
  72. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/deepvista/SKILL.md +0 -0
  73. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/deepvista/reference/chat.md +0 -0
  74. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/deepvista/reference/lint.md +0 -0
  75. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/deepvista/reference/memory.md +0 -0
  76. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/deepvista/reference/notes.md +0 -0
  77. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/deepvista/reference/openclaw.md +0 -0
  78. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/deepvista/reference/session.md +0 -0
  79. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/deepvista/reference/shared.md +0 -0
  80. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/deepvista/reference/skill-analyze-notes.md +0 -0
  81. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/deepvista/reference/skill-create-from-note.md +0 -0
  82. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/deepvista/reference/skill-import-files.md +0 -0
  83. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/deepvista/reference/skill-research-to-skill.md +0 -0
  84. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/deepvista/reference/skill.md +0 -0
  85. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/deepvista/reference/vistabase-card.md +0 -0
  86. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/deepvista/reference/vistabase.md +0 -0
  87. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/skills/dv-workflow/SKILL.md +0 -0
  88. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/tests/__init__.py +0 -0
  89. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/tests/test_agent_id_tagging.py +0 -0
  90. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/tests/test_session_note_format.py +0 -0
  91. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/tests/test_skill_catalog.py +0 -0
  92. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/tests/test_skill_commands.py +0 -0
  93. {deepvista_cli-0.3.0 → deepvista_cli-0.5.0}/uninstall.sh +0 -0
@@ -47,3 +47,29 @@ jobs:
47
47
  env:
48
48
  GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49
49
  run: gh skill publish --dry-run
50
+
51
+ windows-smoke:
52
+ runs-on: windows-latest
53
+ steps:
54
+ - uses: actions/checkout@v4
55
+
56
+ - name: Parse install.ps1 (syntax check)
57
+ shell: pwsh
58
+ run: |
59
+ $errors = $null
60
+ [System.Management.Automation.Language.Parser]::ParseFile("$PWD/install.ps1", [ref]$null, [ref]$errors) | Out-Null
61
+ if ($errors.Count -gt 0) {
62
+ $errors | ForEach-Object { Write-Error $_.Message }
63
+ exit 1
64
+ }
65
+ Write-Host "install.ps1 parses cleanly"
66
+
67
+ - uses: astral-sh/setup-uv@v6
68
+ with:
69
+ enable-cache: true
70
+
71
+ - name: Install deepvista CLI from checkout
72
+ run: uv tool install ".[ui]"
73
+
74
+ - name: Smoke test - deepvista --help
75
+ run: deepvista --help
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.5.0"
3
+ }
@@ -37,6 +37,21 @@ users what's new between the version they have installed and the latest release.
37
37
  adopts a pre-existing server-side row instead of failing when the local
38
38
  file is missing.
39
39
 
40
+ ## [0.5.0](https://github.com/DeepVista-AI/deepvista-cli/compare/v0.4.0...v0.5.0) (2026-06-04)
41
+
42
+
43
+ ### Features
44
+
45
+ * **DV-936:** task_queue run/list/setup commands ([#155](https://github.com/DeepVista-AI/deepvista-cli/issues/155)) ([0d90691](https://github.com/DeepVista-AI/deepvista-cli/commit/0d9069106d14068d657e16415be80dec95f12085))
46
+
47
+ ## [0.4.0](https://github.com/DeepVista-AI/deepvista-cli/compare/v0.3.0...v0.4.0) (2026-06-03)
48
+
49
+
50
+ ### Features
51
+
52
+ * **DV-941:** add windows install script and trampoline troubleshooting docs ([#156](https://github.com/DeepVista-AI/deepvista-cli/issues/156)) ([eed7335](https://github.com/DeepVista-AI/deepvista-cli/commit/eed7335ffdc1dfcfd84523ed0e77be066b7fe9c3))
53
+ * **DV-942:** print next-step hints after auth login ([#157](https://github.com/DeepVista-AI/deepvista-cli/issues/157)) ([0fca6c9](https://github.com/DeepVista-AI/deepvista-cli/commit/0fca6c9309623ee690c2c9e16870d528b558fd80))
54
+
40
55
  ## [0.3.0](https://github.com/DeepVista-AI/deepvista-cli/compare/v0.2.0...v0.3.0) (2026-05-31)
41
56
 
42
57
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepvista-cli
3
- Version: 0.3.0
3
+ Version: 0.5.0
4
4
  Summary: CLI for DeepVista — chat, notes, skills, and memory from your terminal.
5
5
  Project-URL: Homepage, https://deepvista.ai
6
6
  Project-URL: Repository, https://github.com/DeepVista-AI/deepvista-cli
@@ -164,14 +164,52 @@ then `deepvista auth login`).
164
164
 
165
165
  ### For non-Claude-Code agents (Cursor, OpenCode, OpenClaw, …)
166
166
 
167
+ **macOS / Linux (bash):**
168
+
167
169
  ```bash
168
170
  curl -sSL https://raw.githubusercontent.com/DeepVista-AI/deepvista-cli/main/install.sh | bash
169
171
  ```
170
172
 
173
+ **Windows (PowerShell):**
174
+
175
+ ```powershell
176
+ powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/DeepVista-AI/deepvista-cli/main/install.ps1 | iex"
177
+ ```
178
+
171
179
  The script auto-detects your package manager (`uv`, `pipx`, or `pip`) and copies the consolidated `deepvista` skill into your agent's skill directory (Cursor, OpenCode, OpenClaw, and Claude Code as a fallback). If you upgraded from an earlier release, it also sweeps out the 12 legacy `deepvista-*` skills so you don't end up with both.
172
180
 
173
181
  Prefer GitHub's CLI? `gh skill install DeepVista-AI/deepvista-cli` works too (GitHub CLI ≥ 2.90, preview).
174
182
 
183
+ #### Windows troubleshooting: `uv trampoline failed to canonicalize script path`
184
+
185
+ On Windows, running `deepvista` may fail with:
186
+
187
+ ```
188
+ error: uv trampoline failed to canonicalize script path
189
+ ```
190
+
191
+ This is a [known uv-on-Windows issue](https://github.com/astral-sh/uv/issues): the launcher (trampoline) that `uv tool install` creates can fail to resolve its own path. It is aggravated by working directories that contain **spaces** (e.g. `C:\Users\you\Claude Folder`) or are inside **OneDrive**-synced folders.
192
+
193
+ Fixes, in order of preference:
194
+
195
+ 1. **Update uv and reinstall the launcher:**
196
+
197
+ ```powershell
198
+ uv self update
199
+ uv tool install --reinstall "deepvista-cli[ui]"
200
+ ```
201
+
202
+ 2. **Run via `uv tool run` as a fallback** (bypasses the broken trampoline entirely):
203
+
204
+ ```powershell
205
+ uv tool run deepvista auth login
206
+ uv tool run deepvista notes +quick "My first note"
207
+ ```
208
+
209
+ 3. **Avoid spaces / OneDrive in your working directory.** Run from a path without spaces, e.g. `C:\dev`, rather than `C:\Users\you\Claude Folder`.
210
+
211
+ The `install.ps1` script performs this check automatically: after installing it runs `deepvista --version`, and if it hits the trampoline error it falls back to `uv tool run deepvista` and prints the guidance above. It also adds `%USERPROFILE%\.local\bin` (uv's tool bin directory) to your user PATH if it isn't already there — restart your shell afterward so new terminals pick it up.
212
+
175
213
  ### Get Started
176
214
 
177
215
  Open your agent and paste:
@@ -135,14 +135,52 @@ then `deepvista auth login`).
135
135
 
136
136
  ### For non-Claude-Code agents (Cursor, OpenCode, OpenClaw, …)
137
137
 
138
+ **macOS / Linux (bash):**
139
+
138
140
  ```bash
139
141
  curl -sSL https://raw.githubusercontent.com/DeepVista-AI/deepvista-cli/main/install.sh | bash
140
142
  ```
141
143
 
144
+ **Windows (PowerShell):**
145
+
146
+ ```powershell
147
+ powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/DeepVista-AI/deepvista-cli/main/install.ps1 | iex"
148
+ ```
149
+
142
150
  The script auto-detects your package manager (`uv`, `pipx`, or `pip`) and copies the consolidated `deepvista` skill into your agent's skill directory (Cursor, OpenCode, OpenClaw, and Claude Code as a fallback). If you upgraded from an earlier release, it also sweeps out the 12 legacy `deepvista-*` skills so you don't end up with both.
143
151
 
144
152
  Prefer GitHub's CLI? `gh skill install DeepVista-AI/deepvista-cli` works too (GitHub CLI ≥ 2.90, preview).
145
153
 
154
+ #### Windows troubleshooting: `uv trampoline failed to canonicalize script path`
155
+
156
+ On Windows, running `deepvista` may fail with:
157
+
158
+ ```
159
+ error: uv trampoline failed to canonicalize script path
160
+ ```
161
+
162
+ This is a [known uv-on-Windows issue](https://github.com/astral-sh/uv/issues): the launcher (trampoline) that `uv tool install` creates can fail to resolve its own path. It is aggravated by working directories that contain **spaces** (e.g. `C:\Users\you\Claude Folder`) or are inside **OneDrive**-synced folders.
163
+
164
+ Fixes, in order of preference:
165
+
166
+ 1. **Update uv and reinstall the launcher:**
167
+
168
+ ```powershell
169
+ uv self update
170
+ uv tool install --reinstall "deepvista-cli[ui]"
171
+ ```
172
+
173
+ 2. **Run via `uv tool run` as a fallback** (bypasses the broken trampoline entirely):
174
+
175
+ ```powershell
176
+ uv tool run deepvista auth login
177
+ uv tool run deepvista notes +quick "My first note"
178
+ ```
179
+
180
+ 3. **Avoid spaces / OneDrive in your working directory.** Run from a path without spaces, e.g. `C:\dev`, rather than `C:\Users\you\Claude Folder`.
181
+
182
+ The `install.ps1` script performs this check automatically: after installing it runs `deepvista --version`, and if it hits the trampoline error it falls back to `uv tool run deepvista` and prints the guidance above. It also adds `%USERPROFILE%\.local\bin` (uv's tool bin directory) to your user PATH if it isn't already there — restart your shell afterward so new terminals pick it up.
183
+
146
184
  ### Get Started
147
185
 
148
186
  Open your agent and paste:
@@ -14,6 +14,7 @@ from deepvista_cli.auth.tokens import (
14
14
  remove_account,
15
15
  switch_active_account,
16
16
  )
17
+ from deepvista_cli.client.origin import detect_agent_tool
17
18
  from deepvista_cli.config import credentials_path
18
19
  from deepvista_cli.output.formatter import format_output, output_error
19
20
 
@@ -23,6 +24,37 @@ def auth_group() -> None:
23
24
  """Authenticate with DeepVista."""
24
25
 
25
26
 
27
+ def _print_next_steps() -> None:
28
+ """Print actionable next-step options after a successful login (DV-942).
29
+
30
+ Written to stderr so the JSON result on stdout stays machine-parseable.
31
+ Suggestions adapt to whoever is driving the CLI (agent vs. terminal).
32
+ """
33
+ tool, _version = detect_agent_tool()
34
+ if tool == "claude-code":
35
+ steps = [
36
+ "/refresh-skills — sync the DeepVista skill catalog",
37
+ 'say "Help me get started with DeepVista."',
38
+ 'deepvista notes +quick "<fact>" — capture your first note',
39
+ ]
40
+ elif tool == "deepvista-cli": # direct terminal usage
41
+ steps = [
42
+ 'deepvista notes +quick "My first note" — capture a note',
43
+ "deepvista skill list — browse your workflow skills",
44
+ "deepvista ui — launch the terminal UI",
45
+ "deepvista chat — talk to your DeepVista agent",
46
+ ]
47
+ else: # some other AI agent is driving us
48
+ steps = [
49
+ 'deepvista notes +quick "<fact>" — capture a note for the user',
50
+ "deepvista skill list — discover available workflow skills",
51
+ 'deepvista vistabase +search "<topic>" — recall the user\'s stored context',
52
+ ]
53
+ click.echo("\n What's next? Pick one:", err=True)
54
+ for step in steps:
55
+ click.echo(f" - {step}", err=True)
56
+
57
+
26
58
  @auth_group.command("login")
27
59
  @click.option("--code", default=None, help="One-time auth code from the browser.")
28
60
  @click.option("--dry-run", is_flag=True, default=False, help="Preview what would happen without making any changes.")
@@ -64,6 +96,7 @@ def auth_login(ctx: click.Context, code: str | None, dry_run: bool) -> None:
64
96
  }
65
97
  format_output(result, ctx.obj.output_format)
66
98
  click.echo(f" Logged in as {tokens.email or tokens.user_id}", err=True)
99
+ _print_next_steps()
67
100
 
68
101
 
69
102
  @auth_group.command("status")
@@ -133,9 +133,37 @@ def skill_get(ctx: click.Context, skill_id: str) -> None:
133
133
  "tool_plan."
134
134
  ),
135
135
  )
136
+ @click.option(
137
+ "--webhook",
138
+ is_flag=True,
139
+ default=False,
140
+ help=(
141
+ "Mark this as a webhook-queued run (DV-955). Appends the task-queue "
142
+ "completion contract so the host agent reports the queue task after "
143
+ "`skill complete`. Set automatically on commands the webhook enqueues."
144
+ ),
145
+ )
146
+ @click.option(
147
+ "--best-effort",
148
+ is_flag=True,
149
+ default=False,
150
+ help=(
151
+ "Unattended run: instruct the host agent to answer open questions "
152
+ "from the vistabase instead of stalling, note assumptions, and only "
153
+ "pause on hard blockers (DV-955)."
154
+ ),
155
+ )
136
156
  @click.option("--dry-run", is_flag=True, default=False, help="Preview what would happen without making any changes.")
137
157
  @click.pass_context
138
- def skill_run(ctx: click.Context, skill_id: str, user_input: str | None, mode: str, dry_run: bool) -> None:
158
+ def skill_run(
159
+ ctx: click.Context,
160
+ skill_id: str,
161
+ user_input: str | None,
162
+ mode: str,
163
+ webhook: bool,
164
+ best_effort: bool,
165
+ dry_run: bool,
166
+ ) -> None:
139
167
  """Run a Skill — host mode by default; ``--mode deepvista`` delegates the whole run server-side.
140
168
 
141
169
  > [!CAUTION] This is a write command — host mode acquires the parent
@@ -160,6 +188,36 @@ def skill_run(ctx: click.Context, skill_id: str, user_input: str | None, mode: s
160
188
  _skill_run_deepvista(ctx, skill_id, user_input, dry_run=dry_run)
161
189
  return
162
190
 
191
+ emit_host_run_packet(
192
+ ctx,
193
+ skill_id,
194
+ user_input,
195
+ mode,
196
+ dry_run=dry_run,
197
+ webhook=webhook,
198
+ best_effort=best_effort,
199
+ )
200
+
201
+
202
+ def emit_host_run_packet(
203
+ ctx: click.Context,
204
+ skill_id: str,
205
+ user_input: str | None,
206
+ mode: str = "host",
207
+ *,
208
+ dry_run: bool = False,
209
+ webhook: bool = False,
210
+ best_effort: bool = False,
211
+ task_id: str | None = None,
212
+ ) -> None:
213
+ """Fetch the skill, acquire the run lock, and print the host run packet.
214
+
215
+ Shared by ``skill run`` (host / auto modes) and ``task_queue run --host``
216
+ (DV-955), which emits packets for webhook-queued workflow tasks instead
217
+ of subprocess-executing them — a queued workflow needs the surrounding
218
+ host agent to drive it. ``task_id`` (only known on the task-queue path)
219
+ threads the queue entry into the completion contract.
220
+ """
163
221
  # host / auto: fetch the card, optionally acquire the lock, and emit a
164
222
  # run packet the host agent drives.
165
223
  card = _client(ctx).post("/get_context_card", {"card_id": skill_id, "card_type": "skill"})
@@ -196,7 +254,11 @@ def skill_run(ctx: click.Context, skill_id: str, user_input: str | None, mode: s
196
254
  "phase_routes": phase_routes,
197
255
  "user_input": user_input or "",
198
256
  "skill_status": card.get("status", ""),
257
+ "webhook": webhook,
258
+ "best_effort": best_effort,
199
259
  }
260
+ if task_id:
261
+ run_header["task_id"] = task_id
200
262
 
201
263
  if dry_run:
202
264
  format_output(
@@ -222,6 +284,12 @@ def skill_run(ctx: click.Context, skill_id: str, user_input: str | None, mode: s
222
284
  click.echo("---")
223
285
  click.echo()
224
286
  click.echo(_load_host_runtime_contract())
287
+ if best_effort:
288
+ click.echo()
289
+ click.echo(_BEST_EFFORT_STANZA)
290
+ if webhook:
291
+ click.echo()
292
+ click.echo(_webhook_task_stanza(task_id))
225
293
 
226
294
 
227
295
  def _skill_run_deepvista(
@@ -258,6 +326,45 @@ def _load_host_runtime_contract() -> str:
258
326
  return resources.files("deepvista_cli.resources").joinpath("workflow_host_runtime.md").read_text(encoding="utf-8")
259
327
 
260
328
 
329
+ # Appended to the runtime contract for unattended runs (DV-955). The run was
330
+ # triggered by a webhook — there is no human in the loop to answer questions.
331
+ _BEST_EFFORT_STANZA = """\
332
+ ## Best-effort mode (unattended run)
333
+
334
+ This run was triggered without a human in the loop. Do NOT stall waiting
335
+ for answers:
336
+
337
+ - When a step needs information, search the vistabase first:
338
+ `deepvista card +search "…"`, `deepvista vistabase +search "…"`,
339
+ `deepvista notes list`. Prefer an answer found there over asking.
340
+ - When nothing answers, make the most reasonable assumption, state it in
341
+ the phase's artifact note, and move to the next step.
342
+ - Reserve `deepvista skill phase pause` for hard blockers only (missing
343
+ credentials, unavailable tools) — never for open questions.
344
+ - Anything that would normally be sent externally (emails, invites) must
345
+ be left as a DRAFT for human review, never dispatched."""
346
+
347
+
348
+ def _webhook_task_stanza(task_id: str | None) -> str:
349
+ """Completion contract for webhook-queued runs (DV-955).
350
+
351
+ The queue entry stays ``running`` until the host agent reports it —
352
+ nothing else will, so skipping this leaves a permanently stuck task.
353
+ """
354
+ task_ref = task_id or "<task_id from `deepvista task_queue list`>"
355
+ return f"""\
356
+ ## Webhook task completion
357
+
358
+ This run came off the agent task queue. The queue entry stays `running`
359
+ until YOU report it — after `deepvista skill complete` (or on failure):
360
+
361
+ ```
362
+ deepvista task_queue complete {task_ref} --status completed
363
+ # or, when the run could not finish:
364
+ deepvista task_queue complete {task_ref} --status failed --note "<one short sentence>"
365
+ ```"""
366
+
367
+
261
368
  # ---------------------------------------------------------------------------
262
369
  # Phase mutators — used by host agents driving the workflow themselves
263
370
  # ---------------------------------------------------------------------------