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
induscode/__init__.py
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"""induscode — terminal-first AI coding agent on the indusagi framework.
|
|
2
|
+
|
|
3
|
+
Python rebuild of the TS ``indusagi-coding-agent`` (lineage v0.1.62). This is
|
|
4
|
+
the namespace barrel — the analogue of the TS ``src/index.ts``, which
|
|
5
|
+
``export * as <subsystem>``-s every subsystem package plus ``VERSION``.
|
|
6
|
+
|
|
7
|
+
Each subsystem is exposed as a *lazy* namespace attribute via PEP 562 module
|
|
8
|
+
``__getattr__`` (mirroring the framework's ``indusagi/__init__.py``): ``import
|
|
9
|
+
induscode`` stays cheap and side-effect-free, and the Textual-heavy console
|
|
10
|
+
shell is only imported when ``induscode.console`` is first touched. The
|
|
11
|
+
terminal binary is ``entry.py`` (the ``indus`` / ``indusagi`` bin); this barrel
|
|
12
|
+
exists for embedding and testing.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from induscode.workspace import VERSION
|
|
16
|
+
|
|
17
|
+
#: Single-sourced from package metadata (see ``workspace/brand.py``).
|
|
18
|
+
__version__ = VERSION
|
|
19
|
+
|
|
20
|
+
#: Lazy namespace re-exports — the Python analogue of the TS ``src/index.ts``
|
|
21
|
+
#: ``export * as <name> from "./<dir>"`` block. Keyed by the public attribute
|
|
22
|
+
#: name (snake_case), valued by the subsystem package name under ``induscode``.
|
|
23
|
+
#: Lazy so ``import induscode`` does not eagerly pull the Textual console.
|
|
24
|
+
_SUBSYSTEMS = {
|
|
25
|
+
"workspace": "workspace",
|
|
26
|
+
"conductor": "conductor",
|
|
27
|
+
"runtime_bridge": "runtime_bridge",
|
|
28
|
+
"capability_deck": "capability_deck",
|
|
29
|
+
"addons": "addons",
|
|
30
|
+
"briefing": "briefing",
|
|
31
|
+
"insight": "insight",
|
|
32
|
+
"window_budget": "window_budget",
|
|
33
|
+
"transcript_export": "transcript_export",
|
|
34
|
+
"boot": "boot",
|
|
35
|
+
"launch": "launch",
|
|
36
|
+
"settings": "settings",
|
|
37
|
+
"sessions": "sessions",
|
|
38
|
+
"channels": "channels",
|
|
39
|
+
"console": "console",
|
|
40
|
+
"console_slash": "console_slash",
|
|
41
|
+
"kit": "kit",
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
__all__ = ["VERSION", "__version__", *sorted(_SUBSYSTEMS)]
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def __getattr__(name: str): # PEP 562 lazy namespace re-exports
|
|
48
|
+
if name in _SUBSYSTEMS:
|
|
49
|
+
import importlib
|
|
50
|
+
|
|
51
|
+
return importlib.import_module(f"induscode.{_SUBSYSTEMS[name]}")
|
|
52
|
+
raise AttributeError(f"module 'induscode' has no attribute {name!r}")
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def __dir__() -> list[str]:
|
|
56
|
+
return sorted([*globals(), *_SUBSYSTEMS])
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"""Addons subsystem — public barrel.
|
|
2
|
+
|
|
3
|
+
Re-exports the FROZEN third-party customization contract: the
|
|
4
|
+
:class:`AddonManifest` an addon module provides and the :class:`AddonSurface`
|
|
5
|
+
its ``register`` entry point receives, the colon-named :data:`HookEvent`
|
|
6
|
+
taxonomy with its observe/transform/gate :data:`HookHandler` middleware and
|
|
7
|
+
the :class:`EventDispatcher` that runs them, the tool-boundary
|
|
8
|
+
:class:`ToolInterceptor` stages and the :class:`InterceptorChain` pipeline
|
|
9
|
+
that folds them around a tool execution, the capabilities an addon
|
|
10
|
+
contributes (:data:`AddonTool`, :class:`AddonCommand`), the injectable
|
|
11
|
+
:class:`ModuleLoader` + :class:`AddonDiscovery` loading seam, and the typed
|
|
12
|
+
:class:`AddonFault`.
|
|
13
|
+
|
|
14
|
+
Behavior modules:
|
|
15
|
+
|
|
16
|
+
- ``loader`` — the importlib-backed :class:`ModuleLoader` (the TS jiti
|
|
17
|
+
sandbox collapses: Python addons are ``.py`` and ``import indusagi.*``
|
|
18
|
+
just works), plus the verbatim path-hygiene helpers
|
|
19
|
+
(:func:`scrub_invisible`, :func:`expand_path`, :func:`resolve_path`).
|
|
20
|
+
- ``manifest`` — scan a ``.indus/addons`` directory for entry modules
|
|
21
|
+
(``*.py`` files and packages holding ``__init__.py``) and fold an
|
|
22
|
+
:class:`AddonDiscovery` config into id-stamped :class:`AddonSource`
|
|
23
|
+
records.
|
|
24
|
+
- ``dispatch`` — the unified :class:`AddonEventDispatcher` (observe /
|
|
25
|
+
transform / gate) and the tool-boundary :class:`AddonInterceptorChain`,
|
|
26
|
+
plus the :func:`subscription` / :func:`interceptor` minters.
|
|
27
|
+
- ``surface`` — the per-addon recording :class:`AddonSurface` the host hands
|
|
28
|
+
to an addon's ``register``.
|
|
29
|
+
- ``host`` — the assembly point: discover + load (injectable loader),
|
|
30
|
+
register each addon against a fresh surface, fold every
|
|
31
|
+
:class:`RegisteredManifest` into one registry, and wire the dispatch
|
|
32
|
+
engine + interceptor chain + collected commands/tools.
|
|
33
|
+
|
|
34
|
+
Consumers import the addon surface from ``induscode.addons`` rather than
|
|
35
|
+
reaching into individual modules.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
from __future__ import annotations
|
|
39
|
+
|
|
40
|
+
from .contract import (
|
|
41
|
+
ADDONS_DIR,
|
|
42
|
+
BUNDLED_NAMESPACES,
|
|
43
|
+
AddonCommand,
|
|
44
|
+
AddonDiscovery,
|
|
45
|
+
AddonFault,
|
|
46
|
+
AddonFaultKind,
|
|
47
|
+
AddonFaultListener,
|
|
48
|
+
AddonId,
|
|
49
|
+
AddonManifest,
|
|
50
|
+
AddonSource,
|
|
51
|
+
AddonSurface,
|
|
52
|
+
AddonTool,
|
|
53
|
+
AgentMessage,
|
|
54
|
+
AgentTool,
|
|
55
|
+
AgentToolResult,
|
|
56
|
+
ArgsRewrite,
|
|
57
|
+
BundledNamespace,
|
|
58
|
+
CommandContext,
|
|
59
|
+
CommandRun,
|
|
60
|
+
CommandSpec,
|
|
61
|
+
Component,
|
|
62
|
+
DispatchOutcome,
|
|
63
|
+
EnterFn,
|
|
64
|
+
EnterOutcome,
|
|
65
|
+
EventDispatcher,
|
|
66
|
+
EventSubscription,
|
|
67
|
+
ExecOutcome,
|
|
68
|
+
ExecuteFn,
|
|
69
|
+
ExitFn,
|
|
70
|
+
ExitOutcome,
|
|
71
|
+
FrameworkHandles,
|
|
72
|
+
GateDecision,
|
|
73
|
+
GateHandler,
|
|
74
|
+
HookEvent,
|
|
75
|
+
HookHandler,
|
|
76
|
+
HookKind,
|
|
77
|
+
InterceptorChain,
|
|
78
|
+
InterceptorStage,
|
|
79
|
+
InterceptResult,
|
|
80
|
+
KeyId,
|
|
81
|
+
Model,
|
|
82
|
+
ModuleLoader,
|
|
83
|
+
ObserveHandler,
|
|
84
|
+
RegisteredManifest,
|
|
85
|
+
Schema,
|
|
86
|
+
ThinkingLevel,
|
|
87
|
+
ToolEnterContext,
|
|
88
|
+
ToolExitContext,
|
|
89
|
+
ToolInterceptor,
|
|
90
|
+
TransformHandler,
|
|
91
|
+
addon_fault,
|
|
92
|
+
addon_id,
|
|
93
|
+
empty_manifest,
|
|
94
|
+
)
|
|
95
|
+
from .dispatch import (
|
|
96
|
+
AddonEventDispatcher,
|
|
97
|
+
AddonInterceptorChain,
|
|
98
|
+
interceptor,
|
|
99
|
+
subscription,
|
|
100
|
+
)
|
|
101
|
+
from .host import AddonHost, AddonRegistry, AddonSurfaceBundle, create_addon_host
|
|
102
|
+
from .loader import create_module_loader, expand_path, resolve_path, scrub_invisible
|
|
103
|
+
from .manifest import discover_addons, discover_sources
|
|
104
|
+
from .surface import RecordingSurface, create_surface
|
|
105
|
+
|
|
106
|
+
__all__ = [
|
|
107
|
+
"ADDONS_DIR",
|
|
108
|
+
"AddonCommand",
|
|
109
|
+
"AddonDiscovery",
|
|
110
|
+
"AddonEventDispatcher",
|
|
111
|
+
"AddonFault",
|
|
112
|
+
"AddonFaultKind",
|
|
113
|
+
"AddonFaultListener",
|
|
114
|
+
"AddonHost",
|
|
115
|
+
"AddonId",
|
|
116
|
+
"AddonInterceptorChain",
|
|
117
|
+
"AddonManifest",
|
|
118
|
+
"AddonRegistry",
|
|
119
|
+
"AddonSource",
|
|
120
|
+
"AddonSurface",
|
|
121
|
+
"AddonSurfaceBundle",
|
|
122
|
+
"AddonTool",
|
|
123
|
+
"AgentMessage",
|
|
124
|
+
"AgentTool",
|
|
125
|
+
"AgentToolResult",
|
|
126
|
+
"ArgsRewrite",
|
|
127
|
+
"BUNDLED_NAMESPACES",
|
|
128
|
+
"BundledNamespace",
|
|
129
|
+
"CommandContext",
|
|
130
|
+
"CommandRun",
|
|
131
|
+
"CommandSpec",
|
|
132
|
+
"Component",
|
|
133
|
+
"DispatchOutcome",
|
|
134
|
+
"EnterFn",
|
|
135
|
+
"EnterOutcome",
|
|
136
|
+
"EventDispatcher",
|
|
137
|
+
"EventSubscription",
|
|
138
|
+
"ExecOutcome",
|
|
139
|
+
"ExecuteFn",
|
|
140
|
+
"ExitFn",
|
|
141
|
+
"ExitOutcome",
|
|
142
|
+
"FrameworkHandles",
|
|
143
|
+
"GateDecision",
|
|
144
|
+
"GateHandler",
|
|
145
|
+
"HookEvent",
|
|
146
|
+
"HookHandler",
|
|
147
|
+
"HookKind",
|
|
148
|
+
"InterceptResult",
|
|
149
|
+
"InterceptorChain",
|
|
150
|
+
"InterceptorStage",
|
|
151
|
+
"KeyId",
|
|
152
|
+
"Model",
|
|
153
|
+
"ModuleLoader",
|
|
154
|
+
"ObserveHandler",
|
|
155
|
+
"RecordingSurface",
|
|
156
|
+
"RegisteredManifest",
|
|
157
|
+
"Schema",
|
|
158
|
+
"ThinkingLevel",
|
|
159
|
+
"ToolEnterContext",
|
|
160
|
+
"ToolExitContext",
|
|
161
|
+
"ToolInterceptor",
|
|
162
|
+
"TransformHandler",
|
|
163
|
+
"addon_fault",
|
|
164
|
+
"addon_id",
|
|
165
|
+
"create_addon_host",
|
|
166
|
+
"create_module_loader",
|
|
167
|
+
"create_surface",
|
|
168
|
+
"discover_addons",
|
|
169
|
+
"discover_sources",
|
|
170
|
+
"empty_manifest",
|
|
171
|
+
"expand_path",
|
|
172
|
+
"interceptor",
|
|
173
|
+
"resolve_path",
|
|
174
|
+
"scrub_invisible",
|
|
175
|
+
"subscription",
|
|
176
|
+
]
|