bisos.vscodeClaude 0.1__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.
- bisos_vscodeclaude-0.1/PKG-INFO +508 -0
- bisos_vscodeclaude-0.1/README.rst +474 -0
- bisos_vscodeclaude-0.1/_description.org +295 -0
- bisos_vscodeclaude-0.1/bin/vscode-sbom.pcs +266 -0
- bisos_vscodeclaude-0.1/bin/vscode.cs +201 -0
- bisos_vscodeclaude-0.1/bin/vscodeClaude-assemble.cs +473 -0
- bisos_vscodeclaude-0.1/bin/vscodeClaude-cbs.pcs +29 -0
- bisos_vscodeclaude-0.1/bin/vscodeClaude.cs +201 -0
- bisos_vscodeclaude-0.1/bisos/__init__.py +1 -0
- bisos_vscodeclaude-0.1/bisos/vscodeClaude/__init__.py +0 -0
- bisos_vscodeclaude-0.1/bisos/vscodeClaude/vscodeClaude_csu.py +817 -0
- bisos_vscodeclaude-0.1/bisos/vscodeClaude/vscodeEmacs_csu.py +601 -0
- bisos_vscodeclaude-0.1/bisos/vscodeClaude/vscode_csu.py +1006 -0
- bisos_vscodeclaude-0.1/bisos.vscodeClaude.egg-info/PKG-INFO +508 -0
- bisos_vscodeclaude-0.1/bisos.vscodeClaude.egg-info/SOURCES.txt +21 -0
- bisos_vscodeclaude-0.1/bisos.vscodeClaude.egg-info/dependency_links.txt +1 -0
- bisos_vscodeclaude-0.1/bisos.vscodeClaude.egg-info/not-zip-safe +1 -0
- bisos_vscodeclaude-0.1/bisos.vscodeClaude.egg-info/requires.txt +8 -0
- bisos_vscodeclaude-0.1/bisos.vscodeClaude.egg-info/top_level.txt +1 -0
- bisos_vscodeclaude-0.1/lh-agpl3-LICENSE.txt +679 -0
- bisos_vscodeclaude-0.1/pyproject.toml +8 -0
- bisos_vscodeclaude-0.1/setup.cfg +4 -0
- bisos_vscodeclaude-0.1/setup.py +117 -0
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: bisos.vscodeClaude
|
|
3
|
+
Version: 0.1
|
|
4
|
+
Summary: bisos.vscodeClaude: Command-Line Interfaces to VS Code and Its Claude Extension
|
|
5
|
+
Author: Mohsen Banan
|
|
6
|
+
Author-email: libre@mohsen.1.banan.byname.net
|
|
7
|
+
Maintainer: Mohsen Banan
|
|
8
|
+
Maintainer-email: libre@mohsen.1.banan.byname.net
|
|
9
|
+
License: AGPL
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
13
|
+
Classifier: Operating System :: POSIX
|
|
14
|
+
Classifier: Programming Language :: Python
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
16
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
17
|
+
Requires-Dist: bisos
|
|
18
|
+
Requires-Dist: bisos.b
|
|
19
|
+
Requires-Dist: bisos.capability
|
|
20
|
+
Requires-Dist: bisos.common
|
|
21
|
+
Requires-Dist: bisos.csPlayer
|
|
22
|
+
Requires-Dist: bisos.sbom
|
|
23
|
+
Requires-Dist: setuptools==75.8.0
|
|
24
|
+
Requires-Dist: wheel==0.38.4
|
|
25
|
+
Dynamic: author
|
|
26
|
+
Dynamic: author-email
|
|
27
|
+
Dynamic: classifier
|
|
28
|
+
Dynamic: description
|
|
29
|
+
Dynamic: license
|
|
30
|
+
Dynamic: maintainer
|
|
31
|
+
Dynamic: maintainer-email
|
|
32
|
+
Dynamic: requires-dist
|
|
33
|
+
Dynamic: summary
|
|
34
|
+
|
|
35
|
+
===============================================================================
|
|
36
|
+
bisos.vscodeClaude: Command-Line Interfaces to VS Code and Its Claude Extension
|
|
37
|
+
===============================================================================
|
|
38
|
+
|
|
39
|
+
.. contents::
|
|
40
|
+
:depth: 3
|
|
41
|
+
..
|
|
42
|
+
|
|
43
|
+
Overview
|
|
44
|
+
========
|
|
45
|
+
|
|
46
|
+
*bisos.vscodeClaude* drives the local (desktop) VS Code and its Claude
|
|
47
|
+
Code extension from the command line: open a file at a line, a folder, a
|
|
48
|
+
diff or a URI in VS Code; list the running Claude sessions; hand a
|
|
49
|
+
session a prompt, and optionally submit it. A shell, a script, Claude
|
|
50
|
+
itself, a VS Code task or an editor (Emacs) uses it the same way.
|
|
51
|
+
|
|
52
|
+
It is layer 2 of the AI-Activity layers (below): VS Code, with its
|
|
53
|
+
Claude extension. It also holds the Python of layers 3 and 4, as
|
|
54
|
+
separate modules, so that every command-line interface to VS Code is in
|
|
55
|
+
one package. It needs no editor: an AI-Activity conducted purely in VS
|
|
56
|
+
Code uses it from a shell. The Emacs side, layers 3 to 5, is the Blee
|
|
57
|
+
package `vscode-claude <https://github.com/bx-blee/vscode-claude>`__.
|
|
58
|
+
|
|
59
|
+
*For the local (desktop) VS Code; the remote VS Code server is not a
|
|
60
|
+
target.*
|
|
61
|
+
|
|
62
|
+
.. _table-of-contents:
|
|
63
|
+
|
|
64
|
+
Table of Contents TOC
|
|
65
|
+
=====================
|
|
66
|
+
|
|
67
|
+
- `Overview <#overview>`__
|
|
68
|
+
- `Its Place in the Layers <#its-place-in-the-layers>`__
|
|
69
|
+
- `Part of BISOS — ByStar Internet Services Operating
|
|
70
|
+
System <#part-of-bisos--bystar-internet-services-operating-system>`__
|
|
71
|
+
- `bisos.vscodeClaude is a Command-Only PyCS
|
|
72
|
+
Facility <#bisosvscodeclaude-is-a-command-only-pycs-facility>`__
|
|
73
|
+
- `Installation <#installation>`__
|
|
74
|
+
|
|
75
|
+
- `Installation With pip <#installation-with-pip>`__
|
|
76
|
+
- `Installation With pipx <#installation-with-pipx>`__
|
|
77
|
+
- `Installing VS Code and Its Extensions:
|
|
78
|
+
``vscode-sbom.pcs`` <#installing-vs-code-and-its-extensions-vscode-sbompcs>`__
|
|
79
|
+
- `All at Once: the vscodeClaude Capability (CBS and
|
|
80
|
+
CBM) <#all-at-once-the-vscodeclaude-capability-cbs-and-cbm>`__
|
|
81
|
+
|
|
82
|
+
- `Usage <#usage>`__
|
|
83
|
+
|
|
84
|
+
- `VS Code Itself: ``vscode.cs`` <#vs-code-itself-vscodecs>`__
|
|
85
|
+
- `VS Code and Its Partner Emacs:
|
|
86
|
+
``vscode.cs`` <#vs-code-and-its-partner-emacs-vscodecs>`__
|
|
87
|
+
- `Its Claude Sessions:
|
|
88
|
+
``vscodeClaude.cs`` <#its-claude-sessions-vscodeclaudecs>`__
|
|
89
|
+
- `The Emacs Layer:
|
|
90
|
+
vscode-claude <#the-emacs-layer-vscode-claude>`__
|
|
91
|
+
|
|
92
|
+
- `Key Files <#key-files>`__
|
|
93
|
+
- `Documentation and Blee-Panels <#documentation-and-blee-panels>`__
|
|
94
|
+
- `Testing <#testing>`__
|
|
95
|
+
- `Support <#support>`__
|
|
96
|
+
- `Planned Improvements <#planned-improvements>`__
|
|
97
|
+
|
|
98
|
+
Its Place in the Layers
|
|
99
|
+
=======================
|
|
100
|
+
|
|
101
|
+
AI-Activity, VS Code and Emacs are layered; each layer is usable without
|
|
102
|
+
those above it, and a lower layer never names an upper one. The figure
|
|
103
|
+
of the layers and their three uses (VS Code only; Blee and VS Code
|
|
104
|
+
Claude; Blee, VS Code Claude and AI-Activity) is in the README of
|
|
105
|
+
`vscode-claude <https://github.com/bx-blee/vscode-claude>`__.
|
|
106
|
+
|
|
107
|
+
+---+--------------------+--------------------+--------------------+
|
|
108
|
+
| # | Layer | Package | Modules |
|
|
109
|
+
+===+====================+====================+====================+
|
|
110
|
+
| 0 | Templates | ``aiTem | assembled into a |
|
|
111
|
+
| | | plates-workFlow``, | base |
|
|
112
|
+
| | | ``aiTemplates-DE`` | |
|
|
113
|
+
+---+--------------------+--------------------+--------------------+
|
|
114
|
+
| 1 | AI-Activity | `` | ``aiActivity.cs`` |
|
|
115
|
+
| | | bisos.aiActivity`` | |
|
|
116
|
+
+---+--------------------+--------------------+--------------------+
|
|
117
|
+
| 2 | VS Code (+ Claude) | **bi | ``vscode_csu`` |
|
|
118
|
+
| | | sos.vscodeClaude** | |
|
|
119
|
+
+---+--------------------+--------------------+--------------------+
|
|
120
|
+
| 3 | Emacs <-> VS Code | **bis | ` |
|
|
121
|
+
| | | os.vscodeClaude**, | `vscodeEmacs_csu`` |
|
|
122
|
+
| | | Blee | |
|
|
123
|
+
| | | ``vscode-claude`` | |
|
|
124
|
+
+---+--------------------+--------------------+--------------------+
|
|
125
|
+
| 4 | Emacs <-> VS Code | **bis | `` |
|
|
126
|
+
| | Claude | os.vscodeClaude**, | vscodeClaude_csu`` |
|
|
127
|
+
| | | Blee | |
|
|
128
|
+
| | | ``vscode-claude`` | |
|
|
129
|
+
+---+--------------------+--------------------+--------------------+
|
|
130
|
+
| 5 | + AI-Activity | Blee | (elisp only) |
|
|
131
|
+
| | | ``vscode-claude`` | |
|
|
132
|
+
+---+--------------------+--------------------+--------------------+
|
|
133
|
+
|
|
134
|
+
Layers 3 and 4 are each a Python half here and an elisp half in Blee.
|
|
135
|
+
Within this package the same rule holds: ``vscode_csu`` names neither
|
|
136
|
+
Emacs nor Claude, ``vscodeEmacs_csu`` names no Claude, and
|
|
137
|
+
``vscodeClaude_csu`` imports the two below it.
|
|
138
|
+
|
|
139
|
+
Part of BISOS — ByStar Internet Services Operating System
|
|
140
|
+
=========================================================
|
|
141
|
+
|
|
142
|
+
Layered on top of Debian, **BISOS** (By\* Internet Services Operating
|
|
143
|
+
System) is a unified and universal framework for developing both
|
|
144
|
+
internet services and software-service continuums that use internet
|
|
145
|
+
services. See `Bootstrapping ByStar, BISOS and
|
|
146
|
+
Blee <https://github.com/bxGenesis/start>`__ for information about
|
|
147
|
+
getting started with BISOS.
|
|
148
|
+
|
|
149
|
+
**BISOS** is a foundation for **The Libre-Halaal ByStar Digital
|
|
150
|
+
Ecosystem** which is described as a cure for losses of autonomy and
|
|
151
|
+
privacy in a book titled: `Nature of
|
|
152
|
+
Polyexistentials <https://github.com/bxplpc/120033>`__
|
|
153
|
+
|
|
154
|
+
*bisos.vscodeClaude* is part of BISOS. It is a standalone package that
|
|
155
|
+
can be used independently of the full BISOS environment.
|
|
156
|
+
|
|
157
|
+
bisos.vscodeClaude is a Command-Only PyCS Facility
|
|
158
|
+
==================================================
|
|
159
|
+
|
|
160
|
+
bisos.vscodeClaude is a command-line tool. It is a PyCS single-unit
|
|
161
|
+
command service. PyCS is a framework that converges development of CLI
|
|
162
|
+
tools and services. PyCS is an alternative to FastAPI, Typer and Click.
|
|
163
|
+
|
|
164
|
+
bisos.vscodeClaude uses the PyCS-Framework to:
|
|
165
|
+
|
|
166
|
+
#. inspect the local VS Code and open things in it (``vscode.cs``);
|
|
167
|
+
#. join VS Code with a partner Emacs, in both directions
|
|
168
|
+
(``vscode.cs``);
|
|
169
|
+
#. list the VS Code Claude sessions and prompt them
|
|
170
|
+
(``vscodeClaude.cs``);
|
|
171
|
+
#. install VS Code and its extensions at pinned versions
|
|
172
|
+
(``vscode-sbom.pcs``);
|
|
173
|
+
#. bring it all together as one BISOS capability
|
|
174
|
+
(``vscodeClaude-cbs.pcs``, a CBM leaf).
|
|
175
|
+
|
|
176
|
+
The core of PyCS-Framework is the *bisos.b* package (the
|
|
177
|
+
PyCS-Foundation). See `bisos.b <https://github.com/bisos-pip/b>`__ for
|
|
178
|
+
an overview.
|
|
179
|
+
|
|
180
|
+
Installation
|
|
181
|
+
============
|
|
182
|
+
|
|
183
|
+
The sources for the bisos.vscodeClaude pip package are maintained at:
|
|
184
|
+
https://github.com/bisos-pip/vscodeClaude.
|
|
185
|
+
|
|
186
|
+
Installation With pip
|
|
187
|
+
---------------------
|
|
188
|
+
|
|
189
|
+
.. code:: bash
|
|
190
|
+
|
|
191
|
+
pip install bisos.vscodeClaude
|
|
192
|
+
|
|
193
|
+
On a BISOS host, install it editable from its source, in ``py3/``:
|
|
194
|
+
|
|
195
|
+
.. code:: bash
|
|
196
|
+
|
|
197
|
+
./pypiProc.sh -v -n showRun -i pkgReInstall edit /bisos/venv/bisos3
|
|
198
|
+
|
|
199
|
+
Installation With pipx
|
|
200
|
+
----------------------
|
|
201
|
+
|
|
202
|
+
.. code:: bash
|
|
203
|
+
|
|
204
|
+
pipx install bisos.vscodeClaude
|
|
205
|
+
|
|
206
|
+
The following commands are made available:
|
|
207
|
+
|
|
208
|
+
- ``vscode.cs``
|
|
209
|
+
- ``vscodeClaude.cs``
|
|
210
|
+
- ``vscode-sbom.pcs``
|
|
211
|
+
- ``vscodeClaude-cbs.pcs``, ``vscodeClaude-assemble.cs``
|
|
212
|
+
|
|
213
|
+
Installing VS Code and Its Extensions: ``vscode-sbom.pcs``
|
|
214
|
+
----------------------------------------------------------
|
|
215
|
+
|
|
216
|
+
``vscode-sbom.pcs`` installs VS Code itself from Microsoft's apt
|
|
217
|
+
repository, and the extensions of the local VS Code, per user, at pinned
|
|
218
|
+
versions: among them ``anthropic.claude-code`` (the Claude panel, whose
|
|
219
|
+
``/open`` URI is the prompt channel) and the Emacs keymap and org-mode
|
|
220
|
+
extensions.
|
|
221
|
+
|
|
222
|
+
::
|
|
223
|
+
|
|
224
|
+
vscode-sbom.pcs -i aptPkgs_update all # VS Code (code) from packages.microsoft.com
|
|
225
|
+
vscode-sbom.pcs -i extsReport # the pinned versions against the installed ones
|
|
226
|
+
vscode-sbom.pcs -i extsInstallPinned # install at the pinned versions (as the VS Code user)
|
|
227
|
+
vscode-sbom.pcs -i extsInstallLatest # install, or upgrade, to the latest versions
|
|
228
|
+
|
|
229
|
+
All at Once: the vscodeClaude Capability (CBS and CBM)
|
|
230
|
+
------------------------------------------------------
|
|
231
|
+
|
|
232
|
+
``vscodeClaude-cbs.pcs`` is the Capability Bundle Specification of the
|
|
233
|
+
whole setup, of type ``induct`` (an install, no service): its sbom is
|
|
234
|
+
``vscode-sbom.pcs`` (VS Code, through sudo), and its assemble,
|
|
235
|
+
``vscodeClaude-assemble.cs``, sets up the invoking user: the extensions
|
|
236
|
+
at their pinned versions (``extensions``), the VS Code to Blee link
|
|
237
|
+
(``bleeLink``, ``vscodeBleeLinkInstall``) and the Claude Code hooks to
|
|
238
|
+
Blee (``hooks``, ``hooksInstall``). The assemble steps are per user and
|
|
239
|
+
refuse to run as root.
|
|
240
|
+
|
|
241
|
+
::
|
|
242
|
+
|
|
243
|
+
vscodeClaude-assemble.cs -i fullCheck # read-only: extensions, the Blee link, the hooks
|
|
244
|
+
vscodeClaude-cbs.pcs -i cbs_materialize # the sbom, then fullUpdate (as the VS Code user)
|
|
245
|
+
|
|
246
|
+
Its CBM leaf, a pointer to this CBS gated by ``cbmProc.control``
|
|
247
|
+
(planted ``available``), is
|
|
248
|
+
``/bisos/platform/sys/cbm/collective/induct/vscodeClaude/cbmProc.spcs``:
|
|
249
|
+
|
|
250
|
+
::
|
|
251
|
+
|
|
252
|
+
cbmProc.spcs -i cbm_enable && cbmProc.spcs -i cbm_materialize
|
|
253
|
+
|
|
254
|
+
The Blee side, the vscode-claude Blee package, comes with Blee.
|
|
255
|
+
|
|
256
|
+
Usage
|
|
257
|
+
=====
|
|
258
|
+
|
|
259
|
+
Each command program is a small CSXU over its CSUs, whose examples it
|
|
260
|
+
shows: ``vscode.cs`` with no arguments lists its examples, and so does
|
|
261
|
+
``vscodeClaude.cs``.
|
|
262
|
+
|
|
263
|
+
VS Code Itself: ``vscode.cs``
|
|
264
|
+
-----------------------------
|
|
265
|
+
|
|
266
|
+
Layer 2, ``vscode_csu``: no Emacs, no Claude.
|
|
267
|
+
|
|
268
|
+
+----------------------------+----------------------------------------+
|
|
269
|
+
| Command | What it does |
|
|
270
|
+
+============================+========================================+
|
|
271
|
+
| ``vscodeVersion`` | version, commit, architecture |
|
|
272
|
+
+----------------------------+----------------------------------------+
|
|
273
|
+
| ``vscodeTopology`` | can this shell reach a desktop VS |
|
|
274
|
+
| | Code, on which ``DISPLAY`` |
|
|
275
|
+
+----------------------------+----------------------------------------+
|
|
276
|
+
| ``vscodeWorkspaces`` | the folders VS Code has state for, |
|
|
277
|
+
| | newest first (a history) |
|
|
278
|
+
+----------------------------+----------------------------------------+
|
|
279
|
+
| ``vscodeExtensions`` | the installed extensions (installing |
|
|
280
|
+
| | them: ``vscode-sbom.pcs``) |
|
|
281
|
+
+----------------------------+----------------------------------------+
|
|
282
|
+
| ``vscodeExtensionVersion`` | one extension's version, e.g. |
|
|
283
|
+
| | ``anthropic.claude-code`` |
|
|
284
|
+
+----------------------------+----------------------------------------+
|
|
285
|
+
| ``vscodeFocus`` | bring a window to the front, by its |
|
|
286
|
+
| | folder's name |
|
|
287
|
+
+----------------------------+----------------------------------------+
|
|
288
|
+
| ``vscodeOpenFile`` | a file, at a line and column |
|
|
289
|
+
+----------------------------+----------------------------------------+
|
|
290
|
+
| ``vscodeOpenFolder`` | a folder, in the last active window or |
|
|
291
|
+
| | a new one (``--window=``) |
|
|
292
|
+
+----------------------------+----------------------------------------+
|
|
293
|
+
| ``vscodeAddFolder`` | add a folder to the current window's |
|
|
294
|
+
| | workspace |
|
|
295
|
+
+----------------------------+----------------------------------------+
|
|
296
|
+
| ``vscodeDiff`` | the diff view of two files |
|
|
297
|
+
+----------------------------+----------------------------------------+
|
|
298
|
+
| ``vscodeOpenUri`` | hand a URI to the desktop VS Code |
|
|
299
|
+
| | (``code --open-url``) |
|
|
300
|
+
+----------------------------+----------------------------------------+
|
|
301
|
+
|
|
302
|
+
::
|
|
303
|
+
|
|
304
|
+
vscode.cs -i vscodeTopology
|
|
305
|
+
vscode.cs -i vscodeOpenFile README.org 40 1
|
|
306
|
+
|
|
307
|
+
VS Code and Its Partner Emacs: ``vscode.cs``
|
|
308
|
+
--------------------------------------------
|
|
309
|
+
|
|
310
|
+
Layer 3, ``vscodeEmacs_csu``, in the same command program: no Claude.
|
|
311
|
+
|
|
312
|
+
+---------------------------+-----------------------------------------+
|
|
313
|
+
| Command | What it does |
|
|
314
|
+
+===========================+=========================================+
|
|
315
|
+
| ``vscodePartner`` | the partner Emacs (Blee), or why there |
|
|
316
|
+
| | is none |
|
|
317
|
+
+---------------------------+-----------------------------------------+
|
|
318
|
+
| ``bleeOpenFile`` | a file in the partner Emacs, at a line |
|
|
319
|
+
| | (VS Code to Emacs) |
|
|
320
|
+
+---------------------------+-----------------------------------------+
|
|
321
|
+
| ``vscodeBleeLinkSnippet`` | the VS Code task and key that run |
|
|
322
|
+
| | ``bleeOpenFile``, to paste |
|
|
323
|
+
+---------------------------+-----------------------------------------+
|
|
324
|
+
| ``vscodeBleeLinkCheck`` | read-only: are the task, key and |
|
|
325
|
+
| | setting in VS Code's files |
|
|
326
|
+
+---------------------------+-----------------------------------------+
|
|
327
|
+
| ``vscodeBleeLinkInstall`` | merge them into VS Code's user files |
|
|
328
|
+
| | (idempotent, backups) |
|
|
329
|
+
+---------------------------+-----------------------------------------+
|
|
330
|
+
| ``bleeMagit`` | a repo's magit status in the partner |
|
|
331
|
+
| | Emacs (a commit walk) |
|
|
332
|
+
+---------------------------+-----------------------------------------+
|
|
333
|
+
|
|
334
|
+
**The partner Emacs is optional.** These commands, and ``hookToEmacs``
|
|
335
|
+
below, read the partner file that Blee's ``b:vscode/init`` writes
|
|
336
|
+
(``/bisos/var/blee/vscode/partner-<user>.json``): one Emacs partners
|
|
337
|
+
with one VS Code. A partner is live only if its pid is a running Emacs
|
|
338
|
+
and its socket exists.
|
|
339
|
+
|
|
340
|
+
**Per-user setup, after ``vscode-sbom.pcs``.** The VS Code to Emacs key
|
|
341
|
+
is set up by ``vscode.cs -i vscodeBleeLinkInstall`` (and the hooks below
|
|
342
|
+
by ``vscodeClaude.cs -i hooksInstall``). They merge into the user's own
|
|
343
|
+
files, keep everything else, back each file up, and change nothing when
|
|
344
|
+
run again. VS Code's files may hold comments: a comment block before the
|
|
345
|
+
JSON is kept; a file with comments inside is refused, and its piece is
|
|
346
|
+
added by hand (``...Snippet`` prints it).
|
|
347
|
+
|
|
348
|
+
For ``/bx-git-commit-walk`` to open each repo in Blee, set aiActivity's
|
|
349
|
+
``gitOpener``:
|
|
350
|
+
|
|
351
|
+
::
|
|
352
|
+
|
|
353
|
+
aiActivity.cs -i userConfig_set --parName=gitOpener --parValue='vscode.cs -i bleeMagit'
|
|
354
|
+
|
|
355
|
+
Its Claude Sessions: ``vscodeClaude.cs``
|
|
356
|
+
----------------------------------------
|
|
357
|
+
|
|
358
|
+
Layer 4, ``vscodeClaude_csu``, over the two above.
|
|
359
|
+
|
|
360
|
+
+--------------------------+------------------------------------------+
|
|
361
|
+
| Command | What it does |
|
|
362
|
+
+==========================+==========================================+
|
|
363
|
+
| ``claudeSessionsList`` | the running sessions, one line each, |
|
|
364
|
+
| | newest first |
|
|
365
|
+
+--------------------------+------------------------------------------+
|
|
366
|
+
| ``claudeSessionsLatest`` | the sessionId of the most recently |
|
|
367
|
+
| | active local session |
|
|
368
|
+
+--------------------------+------------------------------------------+
|
|
369
|
+
| ``claudePromptUri`` | the URI ``claudePrompt`` would use; |
|
|
370
|
+
| | sends nothing |
|
|
371
|
+
+--------------------------+------------------------------------------+
|
|
372
|
+
| ``claudePrompt`` | the prompt into the latest session, a |
|
|
373
|
+
| | given one, or a new one |
|
|
374
|
+
+--------------------------+------------------------------------------+
|
|
375
|
+
| ``hookToEmacs`` | a Claude Code hook: the event to the |
|
|
376
|
+
| | partner Emacs, if any |
|
|
377
|
+
+--------------------------+------------------------------------------+
|
|
378
|
+
| ``hooksSnippet`` | the ``~/.claude/settings.json`` hooks |
|
|
379
|
+
| | entry for ``hookToEmacs`` |
|
|
380
|
+
+--------------------------+------------------------------------------+
|
|
381
|
+
| ``hooksCheck`` | read-only: are those hooks in |
|
|
382
|
+
| | ``~/.claude/settings.json`` |
|
|
383
|
+
+--------------------------+------------------------------------------+
|
|
384
|
+
| ``hooksInstall`` | merge them into it (idempotent, a backup |
|
|
385
|
+
| | first) |
|
|
386
|
+
+--------------------------+------------------------------------------+
|
|
387
|
+
|
|
388
|
+
``claudeSessionsList`` takes ``--mode`` (local, remote, all) and
|
|
389
|
+
``--cwd``; ``claudePrompt`` takes ``--session`` (an id, or ``new``),
|
|
390
|
+
``--cwd``, and ``--submit=yes`` to press Enter as well (default: you
|
|
391
|
+
do).
|
|
392
|
+
|
|
393
|
+
::
|
|
394
|
+
|
|
395
|
+
vscodeClaude.cs -i claudeSessionsList
|
|
396
|
+
DISPLAY=:1 vscodeClaude.cs -i claudePrompt "/bx-git-commit-msg ."
|
|
397
|
+
|
|
398
|
+
``claudePrompt`` opens the session through the Claude extension's URI
|
|
399
|
+
handler (``code --open-url``), so it needs the ``DISPLAY`` of the
|
|
400
|
+
desktop VS Code. A session that is already open only comes to the front
|
|
401
|
+
that way, so for a running session the text goes on the X clipboard
|
|
402
|
+
(``xclip``) and is pasted with ``xdotool``. Each command it runs is
|
|
403
|
+
shown on stderr.
|
|
404
|
+
|
|
405
|
+
With no live partner, ``hookToEmacs`` does nothing, at once and
|
|
406
|
+
silently, so installing the hooks does not affect pure VS Code use.
|
|
407
|
+
|
|
408
|
+
Both the session list (Claude Code's ``~/.claude/sessions/``) and the
|
|
409
|
+
URI handler are undocumented Claude Code internals, read as they are in
|
|
410
|
+
Claude Code 2.1.311; an upgrade may change them.
|
|
411
|
+
|
|
412
|
+
The Emacs Layer: vscode-claude
|
|
413
|
+
------------------------------
|
|
414
|
+
|
|
415
|
+
For those who work in Emacs, the Blee package
|
|
416
|
+
`vscode-claude <https://github.com/bx-blee/vscode-claude>`__ is layered
|
|
417
|
+
over this one: ``b:vscode.el`` over ``vscode.cs``,
|
|
418
|
+
``b:vscode:claude.el`` (prompts, sessions, hooks) over
|
|
419
|
+
``vscodeClaude.cs``, and ``b:vscode:claude:aiActivity.el`` (root and
|
|
420
|
+
here, the commit cycle, the commit walk) over that. It is optional and
|
|
421
|
+
does not interfere with pure VS Code use. Its README has the design: the
|
|
422
|
+
partnership, the sessions and their AI-Activities, the channels in both
|
|
423
|
+
directions, and the figure of the layers.
|
|
424
|
+
|
|
425
|
+
Key Files
|
|
426
|
+
=========
|
|
427
|
+
|
|
428
|
+
+----------------------------------+----------------------------------+
|
|
429
|
+
| File, in ``py3/`` | What |
|
|
430
|
+
+==================================+==================================+
|
|
431
|
+
| ``bin/vscode.cs`` | CSXU over ``vscode_csu`` and |
|
|
432
|
+
| | ``vscodeEmacs_csu`` |
|
|
433
|
+
+----------------------------------+----------------------------------+
|
|
434
|
+
| ``bin/vscodeClaude.cs`` | CSXU over ``vscodeClaude_csu`` |
|
|
435
|
+
| | (was ``claudeSessions.cs``) |
|
|
436
|
+
+----------------------------------+----------------------------------+
|
|
437
|
+
| ``bin/vscode-sbom.pcs`` | VS Code and its extensions, |
|
|
438
|
+
| | pinned |
|
|
439
|
+
+----------------------------------+----------------------------------+
|
|
440
|
+
| ``bin/vscodeClaude-cbs.pcs`` | the capability: the sbom, then |
|
|
441
|
+
| | the assemble |
|
|
442
|
+
+----------------------------------+----------------------------------+
|
|
443
|
+
| ``bin/vscodeClaude-assemble.cs`` | per user: extensions, the Blee |
|
|
444
|
+
| | link, the hooks |
|
|
445
|
+
+----------------------------------+----------------------------------+
|
|
446
|
+
| ``bi | layer 2: VS Code itself; the |
|
|
447
|
+
| sos/vscodeClaude/vscode_csu.py`` | ``xclip`` and ``xdotool`` |
|
|
448
|
+
| | helpers |
|
|
449
|
+
+----------------------------------+----------------------------------+
|
|
450
|
+
| ``bisos/v | layer 3: the partner file, |
|
|
451
|
+
| scodeClaude/vscodeEmacs_csu.py`` | ``emacsclient`` |
|
|
452
|
+
+----------------------------------+----------------------------------+
|
|
453
|
+
| ``bisos/vs | layer 4: the session registry, |
|
|
454
|
+
| codeClaude/vscodeClaude_csu.py`` | the ``/open`` URI, hooks |
|
|
455
|
+
+----------------------------------+----------------------------------+
|
|
456
|
+
|
|
457
|
+
- ``vscode_csu.py`` inspects the local VS Code (its processes and
|
|
458
|
+
``DISPLAY``, the workspaces it keeps state for in its undocumented
|
|
459
|
+
``workspaceStorage/``, its extensions) and opens things in it.
|
|
460
|
+
- ``vscodeEmacs_csu.py`` reads the partner file and evaluates in the
|
|
461
|
+
partner Emacs.
|
|
462
|
+
- ``vscodeClaude_csu.py`` reads the session registry, builds the
|
|
463
|
+
extension's ``/open`` URI, prompts, and relays hook events.
|
|
464
|
+
|
|
465
|
+
All bisos-pip repos in the https://github.com/bisos-pip github
|
|
466
|
+
organization follow the same structure. They all have
|
|
467
|
+
`setup.py <./setup.py>`__ files driven by
|
|
468
|
+
`pypiProc.sh <./pypiProc.sh>`__.
|
|
469
|
+
|
|
470
|
+
Documentation and Blee-Panels
|
|
471
|
+
=============================
|
|
472
|
+
|
|
473
|
+
bisos.vscodeClaude is part of ByStar Digital Ecosystem
|
|
474
|
+
http://www.by-star.net.
|
|
475
|
+
|
|
476
|
+
Its Blee-Panel is
|
|
477
|
+
`file:./panels/bisos.vscodeClaude/_nodeBase_/fullUsagePanel-en.org <./panels/bisos.vscodeClaude/_nodeBase_/fullUsagePanel-en.org>`__;
|
|
478
|
+
in Blee it is under
|
|
479
|
+
``/bisos/panels/bisos-core/bisos-pip/bisos.vscodeClaude``. It has a
|
|
480
|
+
section per command program and layer, with the read-only commands'
|
|
481
|
+
output and buttons for the actions.
|
|
482
|
+
|
|
483
|
+
Testing
|
|
484
|
+
=======
|
|
485
|
+
|
|
486
|
+
``py3/tests/verify.sh`` runs every read-only command from PATH. It
|
|
487
|
+
opens, focuses or prompts nothing in VS Code, and reaches no partner
|
|
488
|
+
Emacs: ``hookToEmacs`` runs as a made-up user, with a missing and then a
|
|
489
|
+
stale partner file.
|
|
490
|
+
|
|
491
|
+
::
|
|
492
|
+
|
|
493
|
+
cd py3/tests && bash -i ./verify.sh
|
|
494
|
+
|
|
495
|
+
Support
|
|
496
|
+
=======
|
|
497
|
+
|
|
498
|
+
| For support, criticism, comments and questions; please contact the
|
|
499
|
+
author/maintainer
|
|
500
|
+
| `Mohsen Banan <http://mohsen.1.banan.byname.net>`__ at:
|
|
501
|
+
http://mohsen.1.banan.byname.net/contact
|
|
502
|
+
|
|
503
|
+
Planned Improvements
|
|
504
|
+
====================
|
|
505
|
+
|
|
506
|
+
- vscode-sbom.pcs: its apt package is named ``vscode``, but the Debian
|
|
507
|
+
package is ``code``.
|
|
508
|
+
- Upload to PyPI and test as pipx install.
|