induscode 0.1.0__py3-none-any.whl
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.
- induscode/__init__.py +56 -0
- induscode/addons/__init__.py +176 -0
- induscode/addons/contract.py +923 -0
- induscode/addons/dispatch/__init__.py +43 -0
- induscode/addons/dispatch/event_dispatcher.py +348 -0
- induscode/addons/dispatch/tool_interceptor.py +349 -0
- induscode/addons/host.py +469 -0
- induscode/addons/loader.py +314 -0
- induscode/addons/manifest.py +232 -0
- induscode/addons/surface.py +199 -0
- induscode/boot/__init__.py +108 -0
- induscode/boot/auth_vault.py +323 -0
- induscode/boot/boot.py +210 -0
- induscode/boot/contract.py +223 -0
- induscode/boot/invocation.py +117 -0
- induscode/boot/runners/__init__.py +42 -0
- induscode/boot/runners/link_runner.py +82 -0
- induscode/boot/runners/oneshot_runner.py +85 -0
- induscode/boot/runners/registry.py +46 -0
- induscode/boot/runners/repl_runner.py +340 -0
- induscode/boot/runners/session.py +549 -0
- induscode/boot/stages.py +198 -0
- induscode/boot/upgrade/__init__.py +36 -0
- induscode/boot/upgrade/apply.py +125 -0
- induscode/boot/upgrade/upgrades.py +136 -0
- induscode/briefing/__init__.py +115 -0
- induscode/briefing/compose.py +414 -0
- induscode/briefing/contract.py +528 -0
- induscode/briefing/macros.py +721 -0
- induscode/briefing/skills.py +417 -0
- induscode/capability_deck/__init__.py +233 -0
- induscode/capability_deck/bridge_ledger/__init__.py +66 -0
- induscode/capability_deck/bridge_ledger/key.py +181 -0
- induscode/capability_deck/bridge_ledger/ledger.py +276 -0
- induscode/capability_deck/bridge_ledger/network.py +336 -0
- induscode/capability_deck/builtin_bridge.py +358 -0
- induscode/capability_deck/cards/__init__.py +116 -0
- induscode/capability_deck/cards/bg_process.py +482 -0
- induscode/capability_deck/cards/memory.py +226 -0
- induscode/capability_deck/cards/saas.py +280 -0
- induscode/capability_deck/cards/task.py +256 -0
- induscode/capability_deck/cards/todo.py +312 -0
- induscode/capability_deck/contract.py +450 -0
- induscode/capability_deck/manifest.py +126 -0
- induscode/capability_deck/provision.py +217 -0
- induscode/channels/__init__.py +146 -0
- induscode/channels/contract.py +585 -0
- induscode/channels/framer.py +132 -0
- induscode/channels/link/__init__.py +50 -0
- induscode/channels/link/dialog.py +246 -0
- induscode/channels/link/driver.py +308 -0
- induscode/channels/link/server.py +217 -0
- induscode/channels/oneshot.py +178 -0
- induscode/channels/ops.py +140 -0
- induscode/channels/session_ops.py +172 -0
- induscode/conductor/__init__.py +240 -0
- induscode/conductor/catalog.py +309 -0
- induscode/conductor/conductor.py +1084 -0
- induscode/conductor/contract.py +1035 -0
- induscode/conductor/matcher.py +291 -0
- induscode/conductor/serialize.py +575 -0
- induscode/conductor/signal_hub.py +382 -0
- induscode/conductor/skill_parse.py +294 -0
- induscode/conductor/transcript_store.py +449 -0
- induscode/console/__init__.py +236 -0
- induscode/console/app.py +1677 -0
- induscode/console/components/__init__.py +62 -0
- induscode/console/components/banner.py +499 -0
- induscode/console/components/banner_sweep.py +188 -0
- induscode/console/components/emblem.py +181 -0
- induscode/console/components/status_bar.py +102 -0
- induscode/console/contract.py +836 -0
- induscode/console/input/__init__.py +107 -0
- induscode/console/input/chord.py +197 -0
- induscode/console/input/dir_reader.py +113 -0
- induscode/console/input/intents.py +258 -0
- induscode/console/input/providers.py +469 -0
- induscode/console/mount.py +137 -0
- induscode/console/overlays/__init__.py +94 -0
- induscode/console/overlays/auth.py +503 -0
- induscode/console/overlays/pickers.py +526 -0
- induscode/console/overlays/router.py +129 -0
- induscode/console/overlays/sessions.py +232 -0
- induscode/console/reducer.py +145 -0
- induscode/console/resume_picker.py +156 -0
- induscode/console/slash_commands/__init__.py +78 -0
- induscode/console/slash_commands/builtins.py +254 -0
- induscode/console/slash_commands/dynamic.py +217 -0
- induscode/console/slash_commands/integrations.py +949 -0
- induscode/console/slash_commands/transcript.py +404 -0
- induscode/console/slash_commands/workbench.py +430 -0
- induscode/console/startup.py +434 -0
- induscode/console/theme/__init__.py +44 -0
- induscode/console/theme/adapter.py +168 -0
- induscode/console/theme/palette.py +128 -0
- induscode/console/theme/resolve.py +123 -0
- induscode/console/theme/tokens.py +185 -0
- induscode/console_slash/__init__.py +111 -0
- induscode/console_slash/contract.py +185 -0
- induscode/console_slash/registry.py +140 -0
- induscode/console_slash/resolve.py +194 -0
- induscode/console_slash/shared.py +172 -0
- induscode/entry.py +108 -0
- induscode/insight/__init__.py +153 -0
- induscode/insight/collector.py +73 -0
- induscode/insight/replay.py +305 -0
- induscode/insight/wrapper.py +1115 -0
- induscode/kit/__init__.py +82 -0
- induscode/kit/clipboard_image.py +215 -0
- induscode/kit/external_editor.py +120 -0
- induscode/kit/image.py +188 -0
- induscode/kit/shell.py +89 -0
- induscode/kit/tool_fetch.py +288 -0
- induscode/launch/__init__.py +224 -0
- induscode/launch/catalog.py +310 -0
- induscode/launch/contract.py +569 -0
- induscode/launch/credentials.py +852 -0
- induscode/launch/invocation/__init__.py +39 -0
- induscode/launch/invocation/attachments.py +281 -0
- induscode/launch/invocation/flags.py +210 -0
- induscode/launch/invocation/read.py +369 -0
- induscode/launch/invocation/usage.py +110 -0
- induscode/launch/oauth.py +808 -0
- induscode/launch/packages.py +299 -0
- induscode/launch/pickers.py +291 -0
- induscode/py.typed +0 -0
- induscode/runtime_bridge/__init__.py +166 -0
- induscode/runtime_bridge/bridges/__init__.py +66 -0
- induscode/runtime_bridge/bridges/_drive.py +268 -0
- induscode/runtime_bridge/bridges/builtins.py +177 -0
- induscode/runtime_bridge/bridges/claude_cli.py +198 -0
- induscode/runtime_bridge/bridges/codex_cli.py +203 -0
- induscode/runtime_bridge/bridges/indusagi_cli.py +217 -0
- induscode/runtime_bridge/broker.py +397 -0
- induscode/runtime_bridge/contract.py +734 -0
- induscode/runtime_bridge/sink.py +351 -0
- induscode/sessions/__init__.py +25 -0
- induscode/sessions/contract.py +119 -0
- induscode/sessions/library.py +350 -0
- induscode/settings/__init__.py +47 -0
- induscode/settings/contract.py +313 -0
- induscode/settings/manager.py +268 -0
- induscode/transcript_export/__init__.py +109 -0
- induscode/transcript_export/contract.py +522 -0
- induscode/transcript_export/publish.py +455 -0
- induscode/transcript_export/sgr.py +566 -0
- induscode/transcript_export/template.py +319 -0
- induscode/transcript_export/theme_bridge.py +325 -0
- induscode/window_budget/__init__.py +76 -0
- induscode/window_budget/budget/__init__.py +26 -0
- induscode/window_budget/budget/estimate.py +273 -0
- induscode/window_budget/budget/gate.py +60 -0
- induscode/window_budget/budget/slice.py +145 -0
- induscode/window_budget/condenser.py +170 -0
- induscode/window_budget/contract.py +329 -0
- induscode/window_budget/summarize/__init__.py +33 -0
- induscode/window_budget/summarize/condense.py +212 -0
- induscode/window_budget/summarize/prompt.py +241 -0
- induscode/workspace/__init__.py +30 -0
- induscode/workspace/brand.py +96 -0
- induscode/workspace/locator.py +269 -0
- induscode-0.1.0.dist-info/METADATA +97 -0
- induscode-0.1.0.dist-info/RECORD +167 -0
- induscode-0.1.0.dist-info/WHEEL +4 -0
- induscode-0.1.0.dist-info/entry_points.txt +3 -0
- induscode-0.1.0.dist-info/licenses/CREDITS.md +22 -0
- induscode-0.1.0.dist-info/licenses/NOTICE +7 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
"""Tool-fetch kit — a managed-binary provisioner stub for the native helpers
|
|
2
|
+
the agent shells out to (a fast file finder and a fast content grep, fd / rg).
|
|
3
|
+
|
|
4
|
+
The agent prefers native binaries when present and otherwise provisions them
|
|
5
|
+
from a project release page into a managed directory. This module owns the
|
|
6
|
+
*resolution and URL-building* half of that flow as a small, injectable stub:
|
|
7
|
+
|
|
8
|
+
- :func:`resolve_managed_binary_path` computes where a managed binary lives on
|
|
9
|
+
disk (the managed ``bin/`` directory + the platform-correct file name),
|
|
10
|
+
without touching the filesystem;
|
|
11
|
+
- :func:`pick_release_asset` selects the right release asset for the host by
|
|
12
|
+
matching a per-tool :class:`re.Pattern` against the asset names a release
|
|
13
|
+
exposes — a regex matcher rather than a per-tool string switch;
|
|
14
|
+
- :func:`build_download_request` renders the asset download URL plus the
|
|
15
|
+
outbound request headers, stamping this kit's own :data:`KIT_USER_AGENT`.
|
|
16
|
+
|
|
17
|
+
The network is *optional and injectable*: nothing here issues a request. A
|
|
18
|
+
caller supplies a :class:`ReleaseLookup` (e.g. backed by a release REST
|
|
19
|
+
endpoint, a fixture, or a cache) and this module turns its result into a
|
|
20
|
+
concrete request. That keeps the module pure, host-agnostic, and trivially
|
|
21
|
+
testable offline.
|
|
22
|
+
|
|
23
|
+
Port of TS ``src/kit/tool-fetch.ts`` (the platform tags — ``"darwin"`` /
|
|
24
|
+
``"linux"`` / ``"win32"`` — are shared between ``process.platform`` and
|
|
25
|
+
:data:`sys.platform`, so the win32 check ports verbatim).
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
from __future__ import annotations
|
|
29
|
+
|
|
30
|
+
import os
|
|
31
|
+
import re
|
|
32
|
+
import sys
|
|
33
|
+
from dataclasses import dataclass
|
|
34
|
+
from types import MappingProxyType
|
|
35
|
+
from typing import Awaitable, Final, Mapping, Protocol
|
|
36
|
+
|
|
37
|
+
__all__ = [
|
|
38
|
+
"DownloadRequest",
|
|
39
|
+
"KIT_USER_AGENT",
|
|
40
|
+
"ProvisionPlan",
|
|
41
|
+
"ReleaseAsset",
|
|
42
|
+
"ReleaseInfo",
|
|
43
|
+
"ReleaseLookup",
|
|
44
|
+
"ToolDescriptor",
|
|
45
|
+
"build_download_request",
|
|
46
|
+
"pick_release_asset",
|
|
47
|
+
"plan_provision",
|
|
48
|
+
"resolve_managed_binary_path",
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
# ---------------------------------------------------------------------------
|
|
52
|
+
# Identity
|
|
53
|
+
# ---------------------------------------------------------------------------
|
|
54
|
+
|
|
55
|
+
#: The ``User-Agent`` this kit stamps on every outbound provisioning request.
|
|
56
|
+
#:
|
|
57
|
+
#: A fresh, self-describing token owned by this module — release hosts expect
|
|
58
|
+
#: a non-empty agent string, and a distinctive one keeps the agent's traffic
|
|
59
|
+
#: identifiable in server logs. Versioned so the string can move with the kit.
|
|
60
|
+
#: Kept verbatim from the TS kit.
|
|
61
|
+
KIT_USER_AGENT: Final[str] = "indusagi-kit-provisioner/1.0"
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# ---------------------------------------------------------------------------
|
|
65
|
+
# Tool descriptors
|
|
66
|
+
# ---------------------------------------------------------------------------
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@dataclass(frozen=True, slots=True)
|
|
70
|
+
class ToolDescriptor:
|
|
71
|
+
"""A declarative description of one provisionable native helper.
|
|
72
|
+
|
|
73
|
+
The provisioner is driven entirely off a sequence of these: there is no
|
|
74
|
+
per-tool branch anywhere in the flow. :attr:`asset_matcher` is the
|
|
75
|
+
load-bearing field — a compiled :class:`re.Pattern` searched against each
|
|
76
|
+
candidate asset name to pick the host build, replacing the old
|
|
77
|
+
per-platform name templates.
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
# The bare binary name the agent invokes, e.g. ``"fd"`` / ``"rg"``.
|
|
81
|
+
bin: str
|
|
82
|
+
# The owner/repo coordinate the release is fetched from, e.g. ``"owner/tool"``.
|
|
83
|
+
repo: str
|
|
84
|
+
# A regex selecting this tool's asset for the *current host* from a
|
|
85
|
+
# release's asset list. The caller composes platform / arch fragments into
|
|
86
|
+
# the pattern; the matcher then does the selection, so adding a tool is
|
|
87
|
+
# data, not code. Searched (not anchored) to match the TS `RegExp.test`.
|
|
88
|
+
asset_matcher: re.Pattern[str]
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
# ---------------------------------------------------------------------------
|
|
92
|
+
# Path resolution
|
|
93
|
+
# ---------------------------------------------------------------------------
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def resolve_managed_binary_path(
|
|
97
|
+
bin_dir: str | os.PathLike[str],
|
|
98
|
+
bin: str,
|
|
99
|
+
platform: str = sys.platform,
|
|
100
|
+
) -> str:
|
|
101
|
+
"""Compute the on-disk path of a managed binary without touching the
|
|
102
|
+
filesystem.
|
|
103
|
+
|
|
104
|
+
Joins the managed binaries directory with the platform-correct executable
|
|
105
|
+
name — the bare ``bin`` name on POSIX, the same name with a ``.exe``
|
|
106
|
+
suffix on Windows. Pure: it builds a string and never stats the path, so a
|
|
107
|
+
caller can decide separately whether the binary is actually present.
|
|
108
|
+
|
|
109
|
+
:param bin_dir: the managed binaries directory (e.g. the workspace ``bin/``)
|
|
110
|
+
:param bin: the bare binary name, e.g. ``"fd"``
|
|
111
|
+
:param platform: the host platform tag (defaults to :data:`sys.platform`)
|
|
112
|
+
"""
|
|
113
|
+
file_name = f"{bin}.exe" if platform == "win32" else bin
|
|
114
|
+
return os.path.join(bin_dir, file_name)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
# ---------------------------------------------------------------------------
|
|
118
|
+
# Release lookup (injected network)
|
|
119
|
+
# ---------------------------------------------------------------------------
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
@dataclass(frozen=True, slots=True)
|
|
123
|
+
class ReleaseAsset:
|
|
124
|
+
"""One downloadable asset on a release, reduced to the two fields the
|
|
125
|
+
matcher and the request builder need.
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
# The asset file name matched against a :attr:`ToolDescriptor.asset_matcher`.
|
|
129
|
+
name: str
|
|
130
|
+
# The fully-qualified URL the asset bytes are fetched from.
|
|
131
|
+
url: str
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
@dataclass(frozen=True, slots=True)
|
|
135
|
+
class ReleaseInfo:
|
|
136
|
+
"""A resolved release: its tag and the assets it exposes.
|
|
137
|
+
|
|
138
|
+
Whatever produces this — a live REST call, a fixture, a cache — is the
|
|
139
|
+
caller's concern; this module only consumes the shape.
|
|
140
|
+
"""
|
|
141
|
+
|
|
142
|
+
# The release tag, e.g. ``"v1.2.3"``; surfaced for path / version templating.
|
|
143
|
+
tag: str
|
|
144
|
+
# Every downloadable asset on the release.
|
|
145
|
+
assets: tuple[ReleaseAsset, ...]
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
class ReleaseLookup(Protocol):
|
|
149
|
+
"""The injected, optional network boundary.
|
|
150
|
+
|
|
151
|
+
A caller supplies a callable that resolves an ``owner/repo`` coordinate to
|
|
152
|
+
its latest :class:`ReleaseInfo`. This module never imports an HTTP client;
|
|
153
|
+
the lookup is the single seam where real network access (or a stub) is
|
|
154
|
+
plugged in, keeping :func:`build_download_request` pure and
|
|
155
|
+
offline-testable. Any ``async def lookup(repo: str) -> ReleaseInfo``
|
|
156
|
+
satisfies it structurally.
|
|
157
|
+
"""
|
|
158
|
+
|
|
159
|
+
def __call__(self, repo: str, /) -> Awaitable[ReleaseInfo]: ...
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
# ---------------------------------------------------------------------------
|
|
163
|
+
# Asset selection
|
|
164
|
+
# ---------------------------------------------------------------------------
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def pick_release_asset(
|
|
168
|
+
descriptor: ToolDescriptor,
|
|
169
|
+
release: ReleaseInfo,
|
|
170
|
+
) -> ReleaseAsset | None:
|
|
171
|
+
"""Select the release asset matching a tool's
|
|
172
|
+
:attr:`ToolDescriptor.asset_matcher`.
|
|
173
|
+
|
|
174
|
+
Tests each asset name against the descriptor's regex and returns the first
|
|
175
|
+
match, or ``None`` when no asset fits the host (a release that lacks a
|
|
176
|
+
build for this platform / arch). Pure: it filters the supplied list and
|
|
177
|
+
performs no I/O.
|
|
178
|
+
|
|
179
|
+
:param descriptor: the tool whose asset is being located
|
|
180
|
+
:param release: the release whose assets are searched
|
|
181
|
+
"""
|
|
182
|
+
for asset in release.assets:
|
|
183
|
+
# `.search` (not `.match`): TS `RegExp.test` scans the whole string.
|
|
184
|
+
if descriptor.asset_matcher.search(asset.name):
|
|
185
|
+
return asset
|
|
186
|
+
return None
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
# ---------------------------------------------------------------------------
|
|
190
|
+
# Download request
|
|
191
|
+
# ---------------------------------------------------------------------------
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
@dataclass(frozen=True, slots=True)
|
|
195
|
+
class DownloadRequest:
|
|
196
|
+
"""A ready-to-issue download request: the URL plus the outbound headers.
|
|
197
|
+
|
|
198
|
+
The caller hands this to whatever HTTP client it owns; this module builds
|
|
199
|
+
it but never sends it (the network stays injectable).
|
|
200
|
+
"""
|
|
201
|
+
|
|
202
|
+
# The asset URL to fetch.
|
|
203
|
+
url: str
|
|
204
|
+
# The asset file name (useful for the unpack / install step).
|
|
205
|
+
asset_name: str
|
|
206
|
+
# The outbound request headers, including this kit's :data:`KIT_USER_AGENT`.
|
|
207
|
+
headers: Mapping[str, str]
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
def build_download_request(asset: ReleaseAsset) -> DownloadRequest:
|
|
211
|
+
"""Render the download request for a selected release asset.
|
|
212
|
+
|
|
213
|
+
Stamps the kit :data:`KIT_USER_AGENT` and an octet-stream ``Accept`` so
|
|
214
|
+
the release host returns the raw asset rather than a metadata document,
|
|
215
|
+
then carries through the asset URL and name. Pure string assembly —
|
|
216
|
+
issuing the request is the caller's job.
|
|
217
|
+
|
|
218
|
+
:param asset: the asset chosen by :func:`pick_release_asset`
|
|
219
|
+
"""
|
|
220
|
+
return DownloadRequest(
|
|
221
|
+
url=asset.url,
|
|
222
|
+
asset_name=asset.name,
|
|
223
|
+
headers=MappingProxyType(
|
|
224
|
+
{
|
|
225
|
+
"User-Agent": KIT_USER_AGENT,
|
|
226
|
+
"Accept": "application/octet-stream",
|
|
227
|
+
}
|
|
228
|
+
),
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
# ---------------------------------------------------------------------------
|
|
233
|
+
# Provisioning plan
|
|
234
|
+
# ---------------------------------------------------------------------------
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
@dataclass(frozen=True, slots=True)
|
|
238
|
+
class ProvisionPlan:
|
|
239
|
+
"""A computed provisioning plan for one tool: where the binary should land
|
|
240
|
+
and how to fetch its bytes.
|
|
241
|
+
|
|
242
|
+
This is the stub's terminal value — everything needed to perform the
|
|
243
|
+
install (download :attr:`DownloadRequest.url`, unpack, move to
|
|
244
|
+
:attr:`target_path`, mark executable) without this module performing any
|
|
245
|
+
of it.
|
|
246
|
+
"""
|
|
247
|
+
|
|
248
|
+
# The bare binary name being provisioned.
|
|
249
|
+
bin: str
|
|
250
|
+
# Where the installed binary should live (from :func:`resolve_managed_binary_path`).
|
|
251
|
+
target_path: str
|
|
252
|
+
# The release tag the plan was built against.
|
|
253
|
+
tag: str
|
|
254
|
+
# The request that fetches the matching asset for the host.
|
|
255
|
+
download: DownloadRequest
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
async def plan_provision(
|
|
259
|
+
descriptor: ToolDescriptor,
|
|
260
|
+
bin_dir: str | os.PathLike[str],
|
|
261
|
+
lookup: ReleaseLookup,
|
|
262
|
+
platform: str = sys.platform,
|
|
263
|
+
) -> ProvisionPlan | None:
|
|
264
|
+
"""Build a :class:`ProvisionPlan` for a tool by looking up its latest
|
|
265
|
+
release and selecting the host asset.
|
|
266
|
+
|
|
267
|
+
Resolves the release through the injected :class:`ReleaseLookup`, picks
|
|
268
|
+
the asset via :func:`pick_release_asset`, and assembles the on-disk target
|
|
269
|
+
path and the download request. The network touch is entirely the
|
|
270
|
+
caller-supplied ``lookup``; this function adds no I/O of its own. Returns
|
|
271
|
+
``None`` when the release exposes no asset for the host, so a caller can
|
|
272
|
+
fall back to a system-installed binary.
|
|
273
|
+
|
|
274
|
+
:param descriptor: the tool to provision
|
|
275
|
+
:param bin_dir: the managed binaries directory the binary installs into
|
|
276
|
+
:param lookup: the injected release resolver (the only network seam)
|
|
277
|
+
:param platform: the host platform tag (defaults to :data:`sys.platform`)
|
|
278
|
+
"""
|
|
279
|
+
release = await lookup(descriptor.repo)
|
|
280
|
+
asset = pick_release_asset(descriptor, release)
|
|
281
|
+
if asset is None:
|
|
282
|
+
return None
|
|
283
|
+
return ProvisionPlan(
|
|
284
|
+
bin=descriptor.bin,
|
|
285
|
+
target_path=resolve_managed_binary_path(bin_dir, descriptor.bin, platform),
|
|
286
|
+
tag=release.tag,
|
|
287
|
+
download=build_download_request(asset),
|
|
288
|
+
)
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
"""Launch subsystem — public barrel.
|
|
2
|
+
|
|
3
|
+
Re-exports the frozen contract surface: the parsed
|
|
4
|
+
:class:`~.contract.Invocation` and its :data:`~.contract.OutputMode` /
|
|
5
|
+
:data:`~.contract.ThinkingEffort` / :data:`~.contract.ToolName` vocabularies,
|
|
6
|
+
the declarative flag table types, the gathered :class:`~.contract.Attachments`
|
|
7
|
+
shape, the typed :class:`~.contract.CredentialFault` union and its
|
|
8
|
+
:class:`~.contract.AuthVault` Protocol seam, the model-catalog filter, and the
|
|
9
|
+
resume / settings-browser option shapes. Behavior modules (the reader, the
|
|
10
|
+
usage renderer, the credential command, the attachment gatherer, the OAuth
|
|
11
|
+
adapter, the package command, the catalog printer, the resume picker, the
|
|
12
|
+
settings browser) attach their exports here, so consumers import the launch
|
|
13
|
+
surface from ``induscode.launch`` rather than reaching into individual
|
|
14
|
+
modules.
|
|
15
|
+
|
|
16
|
+
NOTE: importing this barrel has **no side effects** — in particular the OAuth
|
|
17
|
+
adapter registry is *not* primed here (the TS barrel primed it on import; the
|
|
18
|
+
port plan forbids import-time registration). Boot primes it explicitly via
|
|
19
|
+
:func:`register_built_in_oauth_providers`.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
from __future__ import annotations
|
|
23
|
+
|
|
24
|
+
from .catalog import (
|
|
25
|
+
CatalogIo,
|
|
26
|
+
CatalogModelSource,
|
|
27
|
+
catalog_source,
|
|
28
|
+
default_catalog_io,
|
|
29
|
+
print_model_catalog,
|
|
30
|
+
)
|
|
31
|
+
from .contract import (
|
|
32
|
+
THINKING_EFFORTS,
|
|
33
|
+
TOOL_NAMES,
|
|
34
|
+
AttachmentOptions,
|
|
35
|
+
Attachments,
|
|
36
|
+
AuthVault,
|
|
37
|
+
CatalogFilter,
|
|
38
|
+
CredentialFault,
|
|
39
|
+
CredentialFaultKind,
|
|
40
|
+
CredentialVerb,
|
|
41
|
+
FlagDefault,
|
|
42
|
+
FlagKind,
|
|
43
|
+
FlagSpec,
|
|
44
|
+
FlagValue,
|
|
45
|
+
ImageContent,
|
|
46
|
+
Invocation,
|
|
47
|
+
OAuthCredentials,
|
|
48
|
+
OutputMode,
|
|
49
|
+
ProviderEntry,
|
|
50
|
+
ResumeFault,
|
|
51
|
+
ResumeRef,
|
|
52
|
+
SessionLoader,
|
|
53
|
+
Settings,
|
|
54
|
+
SettingsBrowseOptions,
|
|
55
|
+
ThinkingEffort,
|
|
56
|
+
ThinkingLevel,
|
|
57
|
+
ToolName,
|
|
58
|
+
credential_fault,
|
|
59
|
+
is_output_mode,
|
|
60
|
+
is_thinking_effort,
|
|
61
|
+
is_tool_name,
|
|
62
|
+
)
|
|
63
|
+
from .credentials import (
|
|
64
|
+
PROVIDER_DIRECTORY,
|
|
65
|
+
CredentialIo,
|
|
66
|
+
CredentialResult,
|
|
67
|
+
SigninMethod,
|
|
68
|
+
as_signin_method,
|
|
69
|
+
default_credential_io,
|
|
70
|
+
find_provider,
|
|
71
|
+
format_credential_fault,
|
|
72
|
+
is_oauth_capable,
|
|
73
|
+
run_credential_command,
|
|
74
|
+
validate_account_name,
|
|
75
|
+
validate_api_key,
|
|
76
|
+
)
|
|
77
|
+
from .invocation import (
|
|
78
|
+
FLAG_GROUPS,
|
|
79
|
+
FLAG_SPECS,
|
|
80
|
+
AttachmentError,
|
|
81
|
+
AttachmentErrorKind,
|
|
82
|
+
FlagGroup,
|
|
83
|
+
FlagGroupEntry,
|
|
84
|
+
GroupedFlagSpec,
|
|
85
|
+
gather_attachments,
|
|
86
|
+
read_file_references,
|
|
87
|
+
read_invocation,
|
|
88
|
+
render_usage,
|
|
89
|
+
)
|
|
90
|
+
from .oauth import (
|
|
91
|
+
AuthKind,
|
|
92
|
+
LoginDriver,
|
|
93
|
+
LoginProvider,
|
|
94
|
+
OAuthAuthorization,
|
|
95
|
+
OAuthLoginCallbacks,
|
|
96
|
+
OAuthLoginError,
|
|
97
|
+
OAuthLoginResult,
|
|
98
|
+
OAuthPrompt,
|
|
99
|
+
OAuthProviderAdapter,
|
|
100
|
+
RefreshDriver,
|
|
101
|
+
get_oauth_provider,
|
|
102
|
+
get_oauth_providers,
|
|
103
|
+
github_copilot_adapter,
|
|
104
|
+
list_login_providers,
|
|
105
|
+
open_login_url,
|
|
106
|
+
refresh_oauth_credentials,
|
|
107
|
+
register_built_in_oauth_providers,
|
|
108
|
+
register_oauth_provider,
|
|
109
|
+
start_oauth_login,
|
|
110
|
+
)
|
|
111
|
+
from .packages import (
|
|
112
|
+
PACKAGE_COMMANDS,
|
|
113
|
+
PackageCommand,
|
|
114
|
+
PackageIo,
|
|
115
|
+
PackageResult,
|
|
116
|
+
default_package_io,
|
|
117
|
+
run_package_command,
|
|
118
|
+
)
|
|
119
|
+
from .pickers import (
|
|
120
|
+
ResumeDeps,
|
|
121
|
+
ResumeOutcome,
|
|
122
|
+
SettingsBrowseIo,
|
|
123
|
+
browse_settings,
|
|
124
|
+
default_resume_deps,
|
|
125
|
+
default_settings_browse_io,
|
|
126
|
+
merge_sessions,
|
|
127
|
+
pick_resume_target,
|
|
128
|
+
render_settings_listing,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
__all__ = [
|
|
132
|
+
"AttachmentError",
|
|
133
|
+
"AttachmentErrorKind",
|
|
134
|
+
"AttachmentOptions",
|
|
135
|
+
"Attachments",
|
|
136
|
+
"AuthKind",
|
|
137
|
+
"AuthVault",
|
|
138
|
+
"CatalogFilter",
|
|
139
|
+
"CatalogIo",
|
|
140
|
+
"CatalogModelSource",
|
|
141
|
+
"CredentialFault",
|
|
142
|
+
"CredentialFaultKind",
|
|
143
|
+
"CredentialIo",
|
|
144
|
+
"CredentialResult",
|
|
145
|
+
"CredentialVerb",
|
|
146
|
+
"FLAG_GROUPS",
|
|
147
|
+
"FLAG_SPECS",
|
|
148
|
+
"FlagDefault",
|
|
149
|
+
"FlagGroup",
|
|
150
|
+
"FlagGroupEntry",
|
|
151
|
+
"FlagKind",
|
|
152
|
+
"FlagSpec",
|
|
153
|
+
"FlagValue",
|
|
154
|
+
"GroupedFlagSpec",
|
|
155
|
+
"ImageContent",
|
|
156
|
+
"Invocation",
|
|
157
|
+
"LoginDriver",
|
|
158
|
+
"LoginProvider",
|
|
159
|
+
"OAuthAuthorization",
|
|
160
|
+
"OAuthCredentials",
|
|
161
|
+
"OAuthLoginCallbacks",
|
|
162
|
+
"OAuthLoginError",
|
|
163
|
+
"OAuthLoginResult",
|
|
164
|
+
"OAuthPrompt",
|
|
165
|
+
"OAuthProviderAdapter",
|
|
166
|
+
"OutputMode",
|
|
167
|
+
"PACKAGE_COMMANDS",
|
|
168
|
+
"PROVIDER_DIRECTORY",
|
|
169
|
+
"PackageCommand",
|
|
170
|
+
"PackageIo",
|
|
171
|
+
"PackageResult",
|
|
172
|
+
"ProviderEntry",
|
|
173
|
+
"RefreshDriver",
|
|
174
|
+
"ResumeDeps",
|
|
175
|
+
"ResumeFault",
|
|
176
|
+
"ResumeOutcome",
|
|
177
|
+
"ResumeRef",
|
|
178
|
+
"SessionLoader",
|
|
179
|
+
"Settings",
|
|
180
|
+
"SettingsBrowseIo",
|
|
181
|
+
"SettingsBrowseOptions",
|
|
182
|
+
"SigninMethod",
|
|
183
|
+
"THINKING_EFFORTS",
|
|
184
|
+
"TOOL_NAMES",
|
|
185
|
+
"ThinkingEffort",
|
|
186
|
+
"ThinkingLevel",
|
|
187
|
+
"ToolName",
|
|
188
|
+
"as_signin_method",
|
|
189
|
+
"browse_settings",
|
|
190
|
+
"catalog_source",
|
|
191
|
+
"credential_fault",
|
|
192
|
+
"default_catalog_io",
|
|
193
|
+
"default_credential_io",
|
|
194
|
+
"default_package_io",
|
|
195
|
+
"default_resume_deps",
|
|
196
|
+
"default_settings_browse_io",
|
|
197
|
+
"find_provider",
|
|
198
|
+
"format_credential_fault",
|
|
199
|
+
"gather_attachments",
|
|
200
|
+
"get_oauth_provider",
|
|
201
|
+
"get_oauth_providers",
|
|
202
|
+
"github_copilot_adapter",
|
|
203
|
+
"is_oauth_capable",
|
|
204
|
+
"is_output_mode",
|
|
205
|
+
"is_thinking_effort",
|
|
206
|
+
"is_tool_name",
|
|
207
|
+
"list_login_providers",
|
|
208
|
+
"merge_sessions",
|
|
209
|
+
"open_login_url",
|
|
210
|
+
"pick_resume_target",
|
|
211
|
+
"print_model_catalog",
|
|
212
|
+
"read_file_references",
|
|
213
|
+
"read_invocation",
|
|
214
|
+
"refresh_oauth_credentials",
|
|
215
|
+
"register_built_in_oauth_providers",
|
|
216
|
+
"register_oauth_provider",
|
|
217
|
+
"render_settings_listing",
|
|
218
|
+
"render_usage",
|
|
219
|
+
"run_credential_command",
|
|
220
|
+
"run_package_command",
|
|
221
|
+
"start_oauth_login",
|
|
222
|
+
"validate_account_name",
|
|
223
|
+
"validate_api_key",
|
|
224
|
+
]
|