monosmith-plugin-sdk 2.0.0b4__tar.gz → 2.0.0b5__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.
- {monosmith_plugin_sdk-2.0.0b4/src/monosmith_plugin_sdk.egg-info → monosmith_plugin_sdk-2.0.0b5}/PKG-INFO +1 -1
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/pyproject.toml +1 -1
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/__init__.py +2 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/protocol/protocol_schema_contract.py +288 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/protocol/protocol_types_contract.py +234 -2
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/serve/__init__.py +2 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/serve/plugin_contract.py +11 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/serve/plugin_members_config.py +3 -1
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5/src/monosmith_plugin_sdk.egg-info}/PKG-INFO +1 -1
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/LICENSE +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/README.md +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/setup.cfg +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/build_dir/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/build_dir/build_dir_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/cancellation/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/cancellation/cancel_token_model.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/cancellation/request_cancelled_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/ci/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/ci/ci_contribution_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/codec/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/codec/encode_by_schema_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/codec/encode_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/codec/encode_json_value_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/codec/message_parse_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/codec/method_codec_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/codec/normalize_by_schema_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/codec/params_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/codec/received_message_contract.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/codec/schema_lookup_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/codec/wire_message_mapper.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/concurrency/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/concurrency/concurrency_policy.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/conformance/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/conformance/check_generation_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/conformance/check_kind_change_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/conformance/check_plugin_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/conformance/check_scheduling_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/conformance/conformance_report_model.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/conformance/find_manifests_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/conformance/go_list_mapper.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/framing/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/framing/frame_message_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/framing/frame_reader_store.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/framing/framing_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/host/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/host/call_interrupted_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/host/connect_plugin_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/host/host_options_contract.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/host/plugin_client_client.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/host/start_plugin_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/jsondoc/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/jsondoc/indent_raw_json_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/jsondoc/json_document_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/jsondoc/json_document_model.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/jsondoc/scan_json_object_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/plugin_refs/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/plugin_refs/plugin_ref_policy.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/plugin_roles/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/plugin_roles/plugin_role_policy.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/projects/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/projects/audit_settings_policy.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/projects/manifest_match_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/projects/project_kind_policy.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/projects/publishes_policy.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/projects/set_toolchain_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/projects/stack_plugins_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/protocol/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/protocol/rpc_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/py.typed +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/scaffold/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/scaffold/scaffold_data_mapper.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/scaffold/scaffold_project_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/serve/capabilities_of_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/serve/claim_stdio_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/serve/dispatch_request_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/serve/frame_writer_store.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/serve/initialize_plugin_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/serve/protocol_streams_contract.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/serve/request_outcome_contract.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/serve/request_pool_store.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/serve/serve_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/tasks/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/tasks/contribute_tasks_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/tasks/task_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/templating/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/templating/file_exists_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/templating/parse_template_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/templating/render_template_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/templating/template_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/templating/template_functions_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/templating/template_syntax_contract.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/templating/tokenize_action_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/templating/write_templates_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk.egg-info/SOURCES.txt +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk.egg-info/dependency_links.txt +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: monosmith-plugin-sdk
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.0b5
|
|
4
4
|
Summary: The Python SDK for writing smith plugins: the protocol's types, the serve loop, a test host, the conformance checks, templating and key-order-keeping JSON editing. No runtime dependencies.
|
|
5
5
|
Author: Eduardo Russo
|
|
6
6
|
License-Expression: MIT
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "monosmith-plugin-sdk"
|
|
7
|
-
version = "2.0.0-beta.
|
|
7
|
+
version = "2.0.0-beta.5"
|
|
8
8
|
description = "The Python SDK for writing smith plugins: the protocol's types, the serve loop, a test host, the conformance checks, templating and key-order-keeping JSON editing. No runtime dependencies."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
{monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/__init__.py
RENAMED
|
@@ -102,6 +102,7 @@ from .serve import (
|
|
|
102
102
|
Generator,
|
|
103
103
|
KindChanger,
|
|
104
104
|
LatestReader,
|
|
105
|
+
Linker,
|
|
105
106
|
Plugin,
|
|
106
107
|
Publisher,
|
|
107
108
|
RegistryReader,
|
|
@@ -135,6 +136,7 @@ __all__ = [
|
|
|
135
136
|
"ComponentLister",
|
|
136
137
|
"DeclarationEditor",
|
|
137
138
|
"LatestReader",
|
|
139
|
+
"Linker",
|
|
138
140
|
"Contributor",
|
|
139
141
|
"CancelToken",
|
|
140
142
|
"RequestCancelledError",
|
|
@@ -187,6 +187,28 @@ _SCHEMA_JSON = r'''{
|
|
|
187
187
|
"capability": "dependencies",
|
|
188
188
|
"notification": false
|
|
189
189
|
},
|
|
190
|
+
"dependencies/link": {
|
|
191
|
+
"description": "Makes a project depend on a library of the same workspace and language, in the ecosystem's own form, then installs or locks as that needs.",
|
|
192
|
+
"params": {
|
|
193
|
+
"$ref": "#/$defs/LinkParams"
|
|
194
|
+
},
|
|
195
|
+
"result": {
|
|
196
|
+
"$ref": "#/$defs/LinkResult"
|
|
197
|
+
},
|
|
198
|
+
"capability": "link",
|
|
199
|
+
"notification": false
|
|
200
|
+
},
|
|
201
|
+
"dependencies/unlink": {
|
|
202
|
+
"description": "Removes the dependency of a project on a library of the same workspace.",
|
|
203
|
+
"params": {
|
|
204
|
+
"$ref": "#/$defs/UnlinkParams"
|
|
205
|
+
},
|
|
206
|
+
"result": {
|
|
207
|
+
"$ref": "#/$defs/DependencyResult"
|
|
208
|
+
},
|
|
209
|
+
"capability": "link",
|
|
210
|
+
"notification": false
|
|
211
|
+
},
|
|
190
212
|
"dependencies/declared": {
|
|
191
213
|
"description": "Lists the dependencies the manifests of the plugin's projects declare.",
|
|
192
214
|
"params": {
|
|
@@ -601,6 +623,10 @@ _SCHEMA_JSON = r'''{
|
|
|
601
623
|
"type": "boolean",
|
|
602
624
|
"description": "Dependencies installs and uninstalls packages in its projects."
|
|
603
625
|
},
|
|
626
|
+
"link": {
|
|
627
|
+
"type": "boolean",
|
|
628
|
+
"description": "Link makes a project depend on a library of the same workspace in the ecosystem's own form (a workspace dependency, a path dependency, a project reference), and takes it out again. A plugin without it is refused by the host with one sentence that tells the user to add the dependency by hand."
|
|
629
|
+
},
|
|
604
630
|
"declarations": {
|
|
605
631
|
"type": "boolean",
|
|
606
632
|
"description": "Declarations lists and rewrites declared dependency specs (sync, up)."
|
|
@@ -704,6 +730,21 @@ _SCHEMA_JSON = r'''{
|
|
|
704
730
|
"description": {
|
|
705
731
|
"type": "string"
|
|
706
732
|
},
|
|
733
|
+
"title": {
|
|
734
|
+
"type": "string",
|
|
735
|
+
"description": "Title is the name shown to a person (\"Electron\" for electron). Without it the name is shown."
|
|
736
|
+
},
|
|
737
|
+
"aliases": {
|
|
738
|
+
"type": "array",
|
|
739
|
+
"items": {
|
|
740
|
+
"type": "string"
|
|
741
|
+
},
|
|
742
|
+
"description": "Aliases are words that find the choice when a person searches the catalogue (smith compose): \"desktop\", \"serverless\", \"web\"."
|
|
743
|
+
},
|
|
744
|
+
"layer": {
|
|
745
|
+
"type": "string",
|
|
746
|
+
"description": "Layer is where the choice sits in the stack of a project: \"framework\", \"shell\" (a desktop shell), \"host\" (where cloud code runs), \"test\", \"lint\", \"style\" or a layer of the plugin's own. Without it the layer is the axis. It is for display and grouping: the axis decides conflicts."
|
|
747
|
+
},
|
|
707
748
|
"language": {
|
|
708
749
|
"type": "string",
|
|
709
750
|
"description": "Language is the language plugin the choice applies to (\"node\")."
|
|
@@ -726,6 +767,10 @@ _SCHEMA_JSON = r'''{
|
|
|
726
767
|
"type": "boolean",
|
|
727
768
|
"description": "Default marks the choice the host adds when a selection needs its axis and has no choice on it."
|
|
728
769
|
},
|
|
770
|
+
"suggested": {
|
|
771
|
+
"type": "boolean",
|
|
772
|
+
"description": "Suggested marks the choice an asker pre-selects on its axis. The solver never adds it by itself: an axis that a choice needs and that has no Default is asked, and the person answers (ADR 0072)."
|
|
773
|
+
},
|
|
729
774
|
"many": {
|
|
730
775
|
"type": "boolean",
|
|
731
776
|
"description": "Many allows the choice next to other choices of its axis that are Many too. By default a selection has one choice per axis."
|
|
@@ -1601,6 +1646,13 @@ _SCHEMA_JSON = r'''{
|
|
|
1601
1646
|
"$ref": "#/$defs/Choice"
|
|
1602
1647
|
},
|
|
1603
1648
|
"description": "Choices are the options on an axis (framework, test, style) the plugin owns. The host lists them (smith choices) and checks a selection of them (smith add --with). Absent means the plugin owns none."
|
|
1649
|
+
},
|
|
1650
|
+
"tools": {
|
|
1651
|
+
"type": "array",
|
|
1652
|
+
"items": {
|
|
1653
|
+
"$ref": "#/$defs/ToolNeed"
|
|
1654
|
+
},
|
|
1655
|
+
"description": "Tools are the programs the plugin needs on the person's machine. The host detects them and, when one is missing, presents the ways to get it (smith tools). Absent means the plugin declares none."
|
|
1604
1656
|
}
|
|
1605
1657
|
},
|
|
1606
1658
|
"required": [
|
|
@@ -1697,6 +1749,94 @@ _SCHEMA_JSON = r'''{
|
|
|
1697
1749
|
}
|
|
1698
1750
|
}
|
|
1699
1751
|
},
|
|
1752
|
+
"LinkOption": {
|
|
1753
|
+
"description": "LinkOption is one way to write the dependency, with its consequence in words a person who read no manual can follow.",
|
|
1754
|
+
"type": "object",
|
|
1755
|
+
"properties": {
|
|
1756
|
+
"spec": {
|
|
1757
|
+
"type": "string",
|
|
1758
|
+
"description": "Spec is the value passed back in LinkParams.Spec."
|
|
1759
|
+
},
|
|
1760
|
+
"label": {
|
|
1761
|
+
"type": "string",
|
|
1762
|
+
"description": "Label is the option in a few words."
|
|
1763
|
+
},
|
|
1764
|
+
"meaning": {
|
|
1765
|
+
"type": "string",
|
|
1766
|
+
"description": "Meaning says what happens with this option."
|
|
1767
|
+
}
|
|
1768
|
+
},
|
|
1769
|
+
"required": [
|
|
1770
|
+
"spec",
|
|
1771
|
+
"label",
|
|
1772
|
+
"meaning"
|
|
1773
|
+
]
|
|
1774
|
+
},
|
|
1775
|
+
"LinkParams": {
|
|
1776
|
+
"description": "LinkParams asks a plugin to make Project depend on Library, a lib or package of the same workspace and language, in the ecosystem's own form, and to install or lock as that needs. The host has checked that both exist, that the languages match, that Library is not an app, and that the link makes no cycle; the plugin answers with an error that names the file when it cannot write the dependency.",
|
|
1777
|
+
"type": "object",
|
|
1778
|
+
"properties": {
|
|
1779
|
+
"project": {
|
|
1780
|
+
"$ref": "#/$defs/Project",
|
|
1781
|
+
"description": "Project is the project that gains the dependency."
|
|
1782
|
+
},
|
|
1783
|
+
"library": {
|
|
1784
|
+
"$ref": "#/$defs/Project",
|
|
1785
|
+
"description": "Library is the project it depends on."
|
|
1786
|
+
},
|
|
1787
|
+
"quiet": {
|
|
1788
|
+
"type": "boolean",
|
|
1789
|
+
"description": "Quiet keeps the package manager's output unless it fails."
|
|
1790
|
+
},
|
|
1791
|
+
"plan": {
|
|
1792
|
+
"type": "boolean",
|
|
1793
|
+
"description": "Plan asks for the plan only: the plugin writes nothing and answers with the manifest, the line it would write and the choices the user has."
|
|
1794
|
+
},
|
|
1795
|
+
"spec": {
|
|
1796
|
+
"type": "string",
|
|
1797
|
+
"description": "Spec is the version range the user chose from LinkResult.Options; empty means the plugin's default, or the form the workspace already uses."
|
|
1798
|
+
}
|
|
1799
|
+
},
|
|
1800
|
+
"required": [
|
|
1801
|
+
"project",
|
|
1802
|
+
"library"
|
|
1803
|
+
]
|
|
1804
|
+
},
|
|
1805
|
+
"LinkResult": {
|
|
1806
|
+
"description": "LinkResult is what a link wrote, or with LinkParams.Plan would write.",
|
|
1807
|
+
"type": "object",
|
|
1808
|
+
"properties": {
|
|
1809
|
+
"files": {
|
|
1810
|
+
"type": "array",
|
|
1811
|
+
"items": {
|
|
1812
|
+
"type": "string"
|
|
1813
|
+
},
|
|
1814
|
+
"description": "Files are the workspace-relative files changed (or to be changed)."
|
|
1815
|
+
},
|
|
1816
|
+
"notes": {
|
|
1817
|
+
"type": "array",
|
|
1818
|
+
"items": {
|
|
1819
|
+
"type": "string"
|
|
1820
|
+
},
|
|
1821
|
+
"description": "Notes are for the user."
|
|
1822
|
+
},
|
|
1823
|
+
"manifest": {
|
|
1824
|
+
"type": "string",
|
|
1825
|
+
"description": "Manifest is the file the dependency goes into, workspace-relative."
|
|
1826
|
+
},
|
|
1827
|
+
"line": {
|
|
1828
|
+
"type": "string",
|
|
1829
|
+
"description": "Line is the dependency as it is written there, for the plan shown before anything is written (\"@acme/core\": \"*\")."
|
|
1830
|
+
},
|
|
1831
|
+
"options": {
|
|
1832
|
+
"type": "array",
|
|
1833
|
+
"items": {
|
|
1834
|
+
"$ref": "#/$defs/LinkOption"
|
|
1835
|
+
},
|
|
1836
|
+
"description": "Options are the real choices of the range written, with the default first. Empty when the ecosystem has none, or the workspace already follows a convention (then Line shows it)."
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
},
|
|
1700
1840
|
"PackageStore": {
|
|
1701
1841
|
"description": "PackageStore is where a package manager keeps what it downloaded (npm's ~/.npm, Go's module cache). A generated pipeline restores it before setup and saves it after a run, keyed on Files, so `npm ci` or `go mod download` fetches only what changed. A pull request from a fork restores it and never writes the base repository's cache.",
|
|
1702
1842
|
"type": "object",
|
|
@@ -2414,6 +2554,121 @@ _SCHEMA_JSON = r'''{
|
|
|
2414
2554
|
"command"
|
|
2415
2555
|
]
|
|
2416
2556
|
},
|
|
2557
|
+
"ToolInstall": {
|
|
2558
|
+
"description": "ToolInstall is one way to get a tool with a package manager. Manager is one of: \"winget\", \"brew\", \"brew-cask\", \"apt\", \"dnf\", \"pacman\", \"npm\", \"uv\", \"fnm\" and \"rustup\". The host builds the exact command from the manager and Package; Package may hold {major} and {major.minor}, which the pinned or suggested version fills. The language's own installers (uv, fnm, rustup) are offered only when they are already on the machine.",
|
|
2559
|
+
"type": "object",
|
|
2560
|
+
"properties": {
|
|
2561
|
+
"manager": {
|
|
2562
|
+
"type": "string"
|
|
2563
|
+
},
|
|
2564
|
+
"package": {
|
|
2565
|
+
"type": "string"
|
|
2566
|
+
},
|
|
2567
|
+
"note": {
|
|
2568
|
+
"type": "string",
|
|
2569
|
+
"description": "Note adds a sentence the person needs before choosing (\"a new terminal is needed\")."
|
|
2570
|
+
}
|
|
2571
|
+
},
|
|
2572
|
+
"required": [
|
|
2573
|
+
"manager",
|
|
2574
|
+
"package"
|
|
2575
|
+
]
|
|
2576
|
+
},
|
|
2577
|
+
"ToolNeed": {
|
|
2578
|
+
"description": "ToolNeed is a program on the person's machine that a plugin needs to build, test or run its projects (Python, the .NET SDK, Docker). A plugin publishes the tools it needs in InitializeResult.Tools. The host detects them, and when one is missing it presents the ways to get it (ADR 0077): it never installs in silence. The plugin writes facts only (what the tool is, how to detect it, how each system gets it); the host decides how to ask.",
|
|
2579
|
+
"type": "object",
|
|
2580
|
+
"properties": {
|
|
2581
|
+
"name": {
|
|
2582
|
+
"type": "string",
|
|
2583
|
+
"description": "Name identifies the tool across plugins and in commands (smith tools install python). Two plugins that need the same tool use the same Name."
|
|
2584
|
+
},
|
|
2585
|
+
"title": {
|
|
2586
|
+
"type": "string",
|
|
2587
|
+
"description": "Title is what the tool is called in text: \"Python\", \"the .NET SDK\". Doctor words the check \"<Title> is installed\"."
|
|
2588
|
+
},
|
|
2589
|
+
"why": {
|
|
2590
|
+
"type": "string",
|
|
2591
|
+
"description": "Why says in plain words what smith needs the tool for."
|
|
2592
|
+
},
|
|
2593
|
+
"consequence": {
|
|
2594
|
+
"type": "string",
|
|
2595
|
+
"description": "Consequence says what stops working while the tool is missing, as the end of a sentence that starts \"If you skip it, \": \"smith test and smith build fail for the python projects\"."
|
|
2596
|
+
},
|
|
2597
|
+
"program": {
|
|
2598
|
+
"type": "string",
|
|
2599
|
+
"description": "Program is the program that carries the tool on PATH (\"python3\")."
|
|
2600
|
+
},
|
|
2601
|
+
"alternatives": {
|
|
2602
|
+
"type": "array",
|
|
2603
|
+
"items": {
|
|
2604
|
+
"type": "string"
|
|
2605
|
+
},
|
|
2606
|
+
"description": "Alternatives are other programs that also count (\"python\", \"py\")."
|
|
2607
|
+
},
|
|
2608
|
+
"versionArgs": {
|
|
2609
|
+
"type": "array",
|
|
2610
|
+
"items": {
|
|
2611
|
+
"type": "string"
|
|
2612
|
+
},
|
|
2613
|
+
"description": "VersionArgs are the arguments that make Program print its version. Absent means --version."
|
|
2614
|
+
},
|
|
2615
|
+
"pins": {
|
|
2616
|
+
"type": "array",
|
|
2617
|
+
"items": {
|
|
2618
|
+
"$ref": "#/$defs/ToolVersionPin"
|
|
2619
|
+
},
|
|
2620
|
+
"description": "Pins are the files where a workspace pins the version it wants. The first pin the host finds gives the version range. Absent means any version counts."
|
|
2621
|
+
},
|
|
2622
|
+
"choice": {
|
|
2623
|
+
"type": "string",
|
|
2624
|
+
"description": "Choice limits the tool to stacks that have this choice (\"azure-functions\"): the tool is not needed by a project built without it. Absent means every project of the plugin needs it."
|
|
2625
|
+
},
|
|
2626
|
+
"systems": {
|
|
2627
|
+
"type": "array",
|
|
2628
|
+
"items": {
|
|
2629
|
+
"type": "string"
|
|
2630
|
+
},
|
|
2631
|
+
"description": "Systems limits the tool to these systems, named as Go names them (\"windows\", \"darwin\", \"linux\"): the Xcode Command Line Tools exist only on \"darwin\". Absent means every system."
|
|
2632
|
+
},
|
|
2633
|
+
"suggested": {
|
|
2634
|
+
"type": "string",
|
|
2635
|
+
"description": "Suggested is the version smith installs when no pin says one: \"3.13\". It fills {major} and {major.minor} in the install entries."
|
|
2636
|
+
},
|
|
2637
|
+
"optional": {
|
|
2638
|
+
"type": "boolean",
|
|
2639
|
+
"description": "Optional marks a tool whose absence only costs a feature (running a function app locally). Doctor reports it as a warning, not a failure."
|
|
2640
|
+
},
|
|
2641
|
+
"install": {
|
|
2642
|
+
"type": "array",
|
|
2643
|
+
"items": {
|
|
2644
|
+
"$ref": "#/$defs/ToolInstall"
|
|
2645
|
+
},
|
|
2646
|
+
"description": "Install are the ways to get the tool, per package manager and system."
|
|
2647
|
+
},
|
|
2648
|
+
"download": {
|
|
2649
|
+
"type": "string",
|
|
2650
|
+
"description": "Download is the official page of the tool, for the person who installs it by hand or has no package manager."
|
|
2651
|
+
},
|
|
2652
|
+
"source": {
|
|
2653
|
+
"type": "string",
|
|
2654
|
+
"description": "Source is the address of the page the Install entries were checked against."
|
|
2655
|
+
},
|
|
2656
|
+
"checked": {
|
|
2657
|
+
"type": "string",
|
|
2658
|
+
"description": "Checked is the date (YYYY-MM-DD) the entries were last checked."
|
|
2659
|
+
}
|
|
2660
|
+
},
|
|
2661
|
+
"required": [
|
|
2662
|
+
"name",
|
|
2663
|
+
"title",
|
|
2664
|
+
"why",
|
|
2665
|
+
"consequence",
|
|
2666
|
+
"program",
|
|
2667
|
+
"download",
|
|
2668
|
+
"source",
|
|
2669
|
+
"checked"
|
|
2670
|
+
]
|
|
2671
|
+
},
|
|
2417
2672
|
"ToolPin": {
|
|
2418
2673
|
"description": "ToolPin is a tool the plugin installs at a pinned version (in CI, the dev container, the venv) against the newest release; informational.",
|
|
2419
2674
|
"type": "object",
|
|
@@ -2438,6 +2693,23 @@ _SCHEMA_JSON = r'''{
|
|
|
2438
2693
|
"pinned"
|
|
2439
2694
|
]
|
|
2440
2695
|
},
|
|
2696
|
+
"ToolVersionPin": {
|
|
2697
|
+
"description": "ToolVersionPin names a file that pins the version of a tool and how to read it. Format is one of: \"text\" (the first word of the file, as in .nvmrc and .python-version), \"go-mod\" (the toolchain line, else the go line), \"pyproject\" (requires-python), \"global-json\" (sdk.version) and \"rust-toolchain\" (the channel).",
|
|
2698
|
+
"type": "object",
|
|
2699
|
+
"properties": {
|
|
2700
|
+
"file": {
|
|
2701
|
+
"type": "string",
|
|
2702
|
+
"description": "File is the base name of the file, looked up at the workspace root and in the folders of the projects that use the tool."
|
|
2703
|
+
},
|
|
2704
|
+
"format": {
|
|
2705
|
+
"type": "string"
|
|
2706
|
+
}
|
|
2707
|
+
},
|
|
2708
|
+
"required": [
|
|
2709
|
+
"file",
|
|
2710
|
+
"format"
|
|
2711
|
+
]
|
|
2712
|
+
},
|
|
2441
2713
|
"Toolchain": {
|
|
2442
2714
|
"description": "Toolchain is a runtime the pipeline must install, and how. Plugins asking for the same name share one setup step (the first plugin's).",
|
|
2443
2715
|
"type": "object",
|
|
@@ -2489,6 +2761,22 @@ _SCHEMA_JSON = r'''{
|
|
|
2489
2761
|
"packages"
|
|
2490
2762
|
]
|
|
2491
2763
|
},
|
|
2764
|
+
"UnlinkParams": {
|
|
2765
|
+
"description": "UnlinkParams asks a plugin to remove the dependency of Project on Library. Notes of the result say so when the manifest held no such dependency.",
|
|
2766
|
+
"type": "object",
|
|
2767
|
+
"properties": {
|
|
2768
|
+
"project": {
|
|
2769
|
+
"$ref": "#/$defs/Project"
|
|
2770
|
+
},
|
|
2771
|
+
"library": {
|
|
2772
|
+
"$ref": "#/$defs/Project"
|
|
2773
|
+
}
|
|
2774
|
+
},
|
|
2775
|
+
"required": [
|
|
2776
|
+
"project",
|
|
2777
|
+
"library"
|
|
2778
|
+
]
|
|
2779
|
+
},
|
|
2492
2780
|
"VersionParams": {
|
|
2493
2781
|
"description": "VersionParams asks a plugin to record a new version in a project manifest.",
|
|
2494
2782
|
"type": "object",
|
|
@@ -71,6 +71,9 @@ __all__ = [
|
|
|
71
71
|
"InstallParams",
|
|
72
72
|
"LatestParams",
|
|
73
73
|
"LatestResult",
|
|
74
|
+
"LinkOption",
|
|
75
|
+
"LinkParams",
|
|
76
|
+
"LinkResult",
|
|
74
77
|
"PackageStore",
|
|
75
78
|
"Peer",
|
|
76
79
|
"PluginKind",
|
|
@@ -96,9 +99,13 @@ __all__ = [
|
|
|
96
99
|
"Stack",
|
|
97
100
|
"Step",
|
|
98
101
|
"Task",
|
|
102
|
+
"ToolInstall",
|
|
103
|
+
"ToolNeed",
|
|
99
104
|
"ToolPin",
|
|
105
|
+
"ToolVersionPin",
|
|
100
106
|
"Toolchain",
|
|
101
107
|
"UninstallParams",
|
|
108
|
+
"UnlinkParams",
|
|
102
109
|
"VersionParams",
|
|
103
110
|
"VersionResult",
|
|
104
111
|
"WorkspaceInfo",
|
|
@@ -163,11 +170,11 @@ class ErrorCodes:
|
|
|
163
170
|
ERROR_CODES = ErrorCodes()
|
|
164
171
|
|
|
165
172
|
|
|
166
|
-
MethodName = Literal["initialize", "shutdown", "cancel", "discover", "generate", "version/write", "publish", "ci", "doctor", "contribute", "remove", "project/kind", "published", "dependencies/install", "dependencies/uninstall", "dependencies/declared", "dependencies/rewrite", "dependencies/latest", "sbom/components", "derive", "api/surface"]
|
|
173
|
+
MethodName = Literal["initialize", "shutdown", "cancel", "discover", "generate", "version/write", "publish", "ci", "doctor", "contribute", "remove", "project/kind", "published", "dependencies/install", "dependencies/uninstall", "dependencies/link", "dependencies/unlink", "dependencies/declared", "dependencies/rewrite", "dependencies/latest", "sbom/components", "derive", "api/surface"]
|
|
167
174
|
"""Every method of the protocol, `initialize`, `shutdown` and the `cancel` notification too."""
|
|
168
175
|
|
|
169
176
|
|
|
170
|
-
CapabilityName = Literal["discover", "generate", "version", "publish", "ci", "doctor", "contribute", "remove", "changeKind", "published", "dependencies", "declarations", "latest", "cancel", "components", "derive", "apiSurface", "channels", "declared"]
|
|
177
|
+
CapabilityName = Literal["discover", "generate", "version", "publish", "ci", "doctor", "contribute", "remove", "changeKind", "published", "dependencies", "link", "declarations", "latest", "cancel", "components", "derive", "apiSurface", "channels", "declared"]
|
|
171
178
|
"""The names of the capability flags: the optional methods a plugin implements."""
|
|
172
179
|
|
|
173
180
|
|
|
@@ -187,6 +194,8 @@ METHOD_CAPABILITIES: Final[dict[str, str | None]] = {
|
|
|
187
194
|
"published": "published",
|
|
188
195
|
"dependencies/install": "dependencies",
|
|
189
196
|
"dependencies/uninstall": "dependencies",
|
|
197
|
+
"dependencies/link": "link",
|
|
198
|
+
"dependencies/unlink": "link",
|
|
190
199
|
"dependencies/declared": "declarations",
|
|
191
200
|
"dependencies/rewrite": "declarations",
|
|
192
201
|
"dependencies/latest": "latest",
|
|
@@ -373,6 +382,13 @@ class Capabilities(TypedDict, total=False):
|
|
|
373
382
|
"""Published reports what a registry has of a project."""
|
|
374
383
|
dependencies: bool
|
|
375
384
|
"""Dependencies installs and uninstalls packages in its projects."""
|
|
385
|
+
link: bool
|
|
386
|
+
"""
|
|
387
|
+
Link makes a project depend on a library of the same workspace in the ecosystem's own form (a
|
|
388
|
+
workspace dependency, a path dependency, a project reference), and takes it out again. A
|
|
389
|
+
plugin without it is refused by the host with one sentence that tells the user to add the
|
|
390
|
+
dependency by hand.
|
|
391
|
+
"""
|
|
376
392
|
declarations: bool
|
|
377
393
|
"""Declarations lists and rewrites declared dependency specs (sync, up)."""
|
|
378
394
|
latest: bool
|
|
@@ -484,6 +500,22 @@ class Choice(_ChoiceRequired, total=False):
|
|
|
484
500
|
"""
|
|
485
501
|
|
|
486
502
|
description: str
|
|
503
|
+
title: str
|
|
504
|
+
"""
|
|
505
|
+
Title is the name shown to a person ("Electron" for electron). Without it the name is shown.
|
|
506
|
+
"""
|
|
507
|
+
aliases: list[str]
|
|
508
|
+
"""
|
|
509
|
+
Aliases are words that find the choice when a person searches the catalogue (smith compose):
|
|
510
|
+
"desktop", "serverless", "web".
|
|
511
|
+
"""
|
|
512
|
+
layer: str
|
|
513
|
+
"""
|
|
514
|
+
Layer is where the choice sits in the stack of a project: "framework", "shell" (a desktop
|
|
515
|
+
shell), "host" (where cloud code runs), "test", "lint", "style" or a layer of the plugin's
|
|
516
|
+
own. Without it the layer is the axis. It is for display and grouping: the axis decides
|
|
517
|
+
conflicts.
|
|
518
|
+
"""
|
|
487
519
|
roles: list[Role]
|
|
488
520
|
"""
|
|
489
521
|
Roles are the roles the choice's plugin plays in a stack built from it: scaffold (it writes
|
|
@@ -500,6 +532,12 @@ class Choice(_ChoiceRequired, total=False):
|
|
|
500
532
|
Default marks the choice the host adds when a selection needs its axis and has no choice on
|
|
501
533
|
it.
|
|
502
534
|
"""
|
|
535
|
+
suggested: bool
|
|
536
|
+
"""
|
|
537
|
+
Suggested marks the choice an asker pre-selects on its axis. The solver never adds it by
|
|
538
|
+
itself: an axis that a choice needs and that has no Default is asked, and the person answers
|
|
539
|
+
(ADR 0072).
|
|
540
|
+
"""
|
|
503
541
|
many: bool
|
|
504
542
|
"""
|
|
505
543
|
Many allows the choice next to other choices of its axis that are Many too. By default a
|
|
@@ -1117,6 +1155,12 @@ class InitializeResult(_InitializeResultRequired, total=False):
|
|
|
1117
1155
|
them (smith choices) and checks a selection of them (smith add --with). Absent means the
|
|
1118
1156
|
plugin owns none.
|
|
1119
1157
|
"""
|
|
1158
|
+
tools: list[ToolNeed]
|
|
1159
|
+
"""
|
|
1160
|
+
Tools are the programs the plugin needs on the person's machine. The host detects them and,
|
|
1161
|
+
when one is missing, presents the ways to get it (smith tools). Absent means the plugin
|
|
1162
|
+
declares none.
|
|
1163
|
+
"""
|
|
1120
1164
|
|
|
1121
1165
|
|
|
1122
1166
|
class Input(TypedDict):
|
|
@@ -1179,6 +1223,71 @@ class LatestResult(TypedDict, total=False):
|
|
|
1179
1223
|
tools: list[ToolPin]
|
|
1180
1224
|
|
|
1181
1225
|
|
|
1226
|
+
class LinkOption(TypedDict):
|
|
1227
|
+
"""
|
|
1228
|
+
LinkOption is one way to write the dependency, with its consequence in words a person who
|
|
1229
|
+
read no manual can follow.
|
|
1230
|
+
"""
|
|
1231
|
+
|
|
1232
|
+
spec: str
|
|
1233
|
+
"""Spec is the value passed back in LinkParams.Spec."""
|
|
1234
|
+
label: str
|
|
1235
|
+
"""Label is the option in a few words."""
|
|
1236
|
+
meaning: str
|
|
1237
|
+
"""Meaning says what happens with this option."""
|
|
1238
|
+
|
|
1239
|
+
|
|
1240
|
+
class _LinkParamsRequired(TypedDict):
|
|
1241
|
+
project: Project
|
|
1242
|
+
"""Project is the project that gains the dependency."""
|
|
1243
|
+
library: Project
|
|
1244
|
+
"""Library is the project it depends on."""
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
class LinkParams(_LinkParamsRequired, total=False):
|
|
1248
|
+
"""
|
|
1249
|
+
LinkParams asks a plugin to make Project depend on Library, a lib or package of the same
|
|
1250
|
+
workspace and language, in the ecosystem's own form, and to install or lock as that needs.
|
|
1251
|
+
The host has checked that both exist, that the languages match, that Library is not an app,
|
|
1252
|
+
and that the link makes no cycle; the plugin answers with an error that names the file when
|
|
1253
|
+
it cannot write the dependency.
|
|
1254
|
+
"""
|
|
1255
|
+
|
|
1256
|
+
quiet: bool
|
|
1257
|
+
"""Quiet keeps the package manager's output unless it fails."""
|
|
1258
|
+
plan: bool
|
|
1259
|
+
"""
|
|
1260
|
+
Plan asks for the plan only: the plugin writes nothing and answers with the manifest, the
|
|
1261
|
+
line it would write and the choices the user has.
|
|
1262
|
+
"""
|
|
1263
|
+
spec: str
|
|
1264
|
+
"""
|
|
1265
|
+
Spec is the version range the user chose from LinkResult.Options; empty means the plugin's
|
|
1266
|
+
default, or the form the workspace already uses.
|
|
1267
|
+
"""
|
|
1268
|
+
|
|
1269
|
+
|
|
1270
|
+
class LinkResult(TypedDict, total=False):
|
|
1271
|
+
"""LinkResult is what a link wrote, or with LinkParams.Plan would write."""
|
|
1272
|
+
|
|
1273
|
+
files: list[str]
|
|
1274
|
+
"""Files are the workspace-relative files changed (or to be changed)."""
|
|
1275
|
+
notes: list[str]
|
|
1276
|
+
"""Notes are for the user."""
|
|
1277
|
+
manifest: str
|
|
1278
|
+
"""Manifest is the file the dependency goes into, workspace-relative."""
|
|
1279
|
+
line: str
|
|
1280
|
+
"""
|
|
1281
|
+
Line is the dependency as it is written there, for the plan shown before anything is written
|
|
1282
|
+
("@acme/core": "*").
|
|
1283
|
+
"""
|
|
1284
|
+
options: list[LinkOption]
|
|
1285
|
+
"""
|
|
1286
|
+
Options are the real choices of the range written, with the default first. Empty when the
|
|
1287
|
+
ecosystem has none, or the workspace already follows a convention (then Line shows it).
|
|
1288
|
+
"""
|
|
1289
|
+
|
|
1290
|
+
|
|
1182
1291
|
class PackageStore(TypedDict):
|
|
1183
1292
|
"""
|
|
1184
1293
|
PackageStore is where a package manager keeps what it downloaded (npm's ~/.npm, Go's module
|
|
@@ -1703,6 +1812,97 @@ class Task(_TaskRequired, total=False):
|
|
|
1703
1812
|
"""ServeTimeout is how long to wait for ServeURL, as a Go duration ("60s"); empty means 60s."""
|
|
1704
1813
|
|
|
1705
1814
|
|
|
1815
|
+
class _ToolInstallRequired(TypedDict):
|
|
1816
|
+
manager: str
|
|
1817
|
+
package: str
|
|
1818
|
+
|
|
1819
|
+
|
|
1820
|
+
class ToolInstall(_ToolInstallRequired, total=False):
|
|
1821
|
+
"""
|
|
1822
|
+
ToolInstall is one way to get a tool with a package manager. Manager is one of: "winget",
|
|
1823
|
+
"brew", "brew-cask", "apt", "dnf", "pacman", "npm", "uv", "fnm" and "rustup". The host builds
|
|
1824
|
+
the exact command from the manager and Package; Package may hold {major} and {major.minor},
|
|
1825
|
+
which the pinned or suggested version fills. The language's own installers (uv, fnm, rustup)
|
|
1826
|
+
are offered only when they are already on the machine.
|
|
1827
|
+
"""
|
|
1828
|
+
|
|
1829
|
+
note: str
|
|
1830
|
+
"""Note adds a sentence the person needs before choosing ("a new terminal is needed")."""
|
|
1831
|
+
|
|
1832
|
+
|
|
1833
|
+
class _ToolNeedRequired(TypedDict):
|
|
1834
|
+
name: str
|
|
1835
|
+
"""
|
|
1836
|
+
Name identifies the tool across plugins and in commands (smith tools install python). Two
|
|
1837
|
+
plugins that need the same tool use the same Name.
|
|
1838
|
+
"""
|
|
1839
|
+
title: str
|
|
1840
|
+
"""
|
|
1841
|
+
Title is what the tool is called in text: "Python", "the .NET SDK". Doctor words the check
|
|
1842
|
+
"<Title> is installed".
|
|
1843
|
+
"""
|
|
1844
|
+
why: str
|
|
1845
|
+
"""Why says in plain words what smith needs the tool for."""
|
|
1846
|
+
consequence: str
|
|
1847
|
+
"""
|
|
1848
|
+
Consequence says what stops working while the tool is missing, as the end of a sentence that
|
|
1849
|
+
starts "If you skip it, ": "smith test and smith build fail for the python projects".
|
|
1850
|
+
"""
|
|
1851
|
+
program: str
|
|
1852
|
+
"""Program is the program that carries the tool on PATH ("python3")."""
|
|
1853
|
+
download: str
|
|
1854
|
+
"""
|
|
1855
|
+
Download is the official page of the tool, for the person who installs it by hand or has no
|
|
1856
|
+
package manager.
|
|
1857
|
+
"""
|
|
1858
|
+
source: str
|
|
1859
|
+
"""Source is the address of the page the Install entries were checked against."""
|
|
1860
|
+
checked: str
|
|
1861
|
+
"""Checked is the date (YYYY-MM-DD) the entries were last checked."""
|
|
1862
|
+
|
|
1863
|
+
|
|
1864
|
+
class ToolNeed(_ToolNeedRequired, total=False):
|
|
1865
|
+
"""
|
|
1866
|
+
ToolNeed is a program on the person's machine that a plugin needs to build, test or run its
|
|
1867
|
+
projects (Python, the .NET SDK, Docker). A plugin publishes the tools it needs in
|
|
1868
|
+
InitializeResult.Tools. The host detects them, and when one is missing it presents the ways
|
|
1869
|
+
to get it (ADR 0077): it never installs in silence. The plugin writes facts only (what the
|
|
1870
|
+
tool is, how to detect it, how each system gets it); the host decides how to ask.
|
|
1871
|
+
"""
|
|
1872
|
+
|
|
1873
|
+
alternatives: list[str]
|
|
1874
|
+
"""Alternatives are other programs that also count ("python", "py")."""
|
|
1875
|
+
versionArgs: list[str]
|
|
1876
|
+
"""VersionArgs are the arguments that make Program print its version. Absent means --version."""
|
|
1877
|
+
pins: list[ToolVersionPin]
|
|
1878
|
+
"""
|
|
1879
|
+
Pins are the files where a workspace pins the version it wants. The first pin the host finds
|
|
1880
|
+
gives the version range. Absent means any version counts.
|
|
1881
|
+
"""
|
|
1882
|
+
choice: str
|
|
1883
|
+
"""
|
|
1884
|
+
Choice limits the tool to stacks that have this choice ("azure-functions"): the tool is not
|
|
1885
|
+
needed by a project built without it. Absent means every project of the plugin needs it.
|
|
1886
|
+
"""
|
|
1887
|
+
systems: list[str]
|
|
1888
|
+
"""
|
|
1889
|
+
Systems limits the tool to these systems, named as Go names them ("windows", "darwin",
|
|
1890
|
+
"linux"): the Xcode Command Line Tools exist only on "darwin". Absent means every system.
|
|
1891
|
+
"""
|
|
1892
|
+
suggested: str
|
|
1893
|
+
"""
|
|
1894
|
+
Suggested is the version smith installs when no pin says one: "3.13". It fills {major} and
|
|
1895
|
+
{major.minor} in the install entries.
|
|
1896
|
+
"""
|
|
1897
|
+
optional: bool
|
|
1898
|
+
"""
|
|
1899
|
+
Optional marks a tool whose absence only costs a feature (running a function app locally).
|
|
1900
|
+
Doctor reports it as a warning, not a failure.
|
|
1901
|
+
"""
|
|
1902
|
+
install: list[ToolInstall]
|
|
1903
|
+
"""Install are the ways to get the tool, per package manager and system."""
|
|
1904
|
+
|
|
1905
|
+
|
|
1706
1906
|
class _ToolPinRequired(TypedDict):
|
|
1707
1907
|
name: str
|
|
1708
1908
|
pinned: str
|
|
@@ -1720,6 +1920,22 @@ class ToolPin(_ToolPinRequired, total=False):
|
|
|
1720
1920
|
"""Newer is true when Latest is a release the pin does not cover."""
|
|
1721
1921
|
|
|
1722
1922
|
|
|
1923
|
+
class ToolVersionPin(TypedDict):
|
|
1924
|
+
"""
|
|
1925
|
+
ToolVersionPin names a file that pins the version of a tool and how to read it. Format is one
|
|
1926
|
+
of: "text" (the first word of the file, as in .nvmrc and .python-version), "go-mod" (the
|
|
1927
|
+
toolchain line, else the go line), "pyproject" (requires-python), "global-json" (sdk.version)
|
|
1928
|
+
and "rust-toolchain" (the channel).
|
|
1929
|
+
"""
|
|
1930
|
+
|
|
1931
|
+
file: str
|
|
1932
|
+
"""
|
|
1933
|
+
File is the base name of the file, looked up at the workspace root and in the folders of the
|
|
1934
|
+
projects that use the tool.
|
|
1935
|
+
"""
|
|
1936
|
+
format: str
|
|
1937
|
+
|
|
1938
|
+
|
|
1723
1939
|
class _ToolchainRequired(TypedDict):
|
|
1724
1940
|
name: str
|
|
1725
1941
|
version: str
|
|
@@ -1754,6 +1970,16 @@ class UninstallParams(TypedDict):
|
|
|
1754
1970
|
packages: list[str]
|
|
1755
1971
|
|
|
1756
1972
|
|
|
1973
|
+
class UnlinkParams(TypedDict):
|
|
1974
|
+
"""
|
|
1975
|
+
UnlinkParams asks a plugin to remove the dependency of Project on Library. Notes of the
|
|
1976
|
+
result say so when the manifest held no such dependency.
|
|
1977
|
+
"""
|
|
1978
|
+
|
|
1979
|
+
project: Project
|
|
1980
|
+
library: Project
|
|
1981
|
+
|
|
1982
|
+
|
|
1757
1983
|
class _VersionParamsRequired(TypedDict):
|
|
1758
1984
|
project: Project
|
|
1759
1985
|
version: str
|
|
@@ -1855,3 +2081,9 @@ class PluginDescription(_PluginDescriptionRequired, total=False):
|
|
|
1855
2081
|
them (smith choices) and checks a selection of them (smith add --with). Absent means the
|
|
1856
2082
|
plugin owns none.
|
|
1857
2083
|
"""
|
|
2084
|
+
tools: list[ToolNeed]
|
|
2085
|
+
"""
|
|
2086
|
+
Tools are the programs the plugin needs on the person's machine. The host detects them and,
|
|
2087
|
+
when one is missing, presents the ways to get it (smith tools). Absent means the plugin
|
|
2088
|
+
declares none.
|
|
2089
|
+
"""
|
|
@@ -14,6 +14,7 @@ from .plugin_contract import (
|
|
|
14
14
|
Generator,
|
|
15
15
|
KindChanger,
|
|
16
16
|
LatestReader,
|
|
17
|
+
Linker,
|
|
17
18
|
Plugin,
|
|
18
19
|
Publisher,
|
|
19
20
|
RegistryReader,
|
|
@@ -40,6 +41,7 @@ __all__ = [
|
|
|
40
41
|
"Generator",
|
|
41
42
|
"KindChanger",
|
|
42
43
|
"LatestReader",
|
|
44
|
+
"Linker",
|
|
43
45
|
"Plugin",
|
|
44
46
|
"Publisher",
|
|
45
47
|
"RegistryReader",
|
|
@@ -42,6 +42,8 @@ from ..protocol import (
|
|
|
42
42
|
InstallParams,
|
|
43
43
|
LatestParams,
|
|
44
44
|
LatestResult,
|
|
45
|
+
LinkParams,
|
|
46
|
+
LinkResult,
|
|
45
47
|
PluginDescription,
|
|
46
48
|
PublishedParams,
|
|
47
49
|
PublishedResult,
|
|
@@ -51,6 +53,7 @@ from ..protocol import (
|
|
|
51
53
|
RemoveResult,
|
|
52
54
|
RewriteParams,
|
|
53
55
|
UninstallParams,
|
|
56
|
+
UnlinkParams,
|
|
54
57
|
VersionParams,
|
|
55
58
|
VersionResult,
|
|
56
59
|
)
|
|
@@ -147,6 +150,14 @@ class DependencyManager(Protocol):
|
|
|
147
150
|
def uninstall(self, params: UninstallParams, cancel: CancelToken) -> DependencyResult: ...
|
|
148
151
|
|
|
149
152
|
|
|
153
|
+
class Linker(Protocol):
|
|
154
|
+
"""`dependencies/link` and `dependencies/unlink`: both, or the capability is not advertised."""
|
|
155
|
+
|
|
156
|
+
def link(self, params: LinkParams, cancel: CancelToken) -> LinkResult: ...
|
|
157
|
+
|
|
158
|
+
def unlink(self, params: UnlinkParams, cancel: CancelToken) -> DependencyResult: ...
|
|
159
|
+
|
|
160
|
+
|
|
150
161
|
class DeclarationEditor(Protocol):
|
|
151
162
|
"""`dependencies/declared` and `dependencies/rewrite`: both, or the capability is not advertised."""
|
|
152
163
|
|
|
@@ -29,7 +29,9 @@ PLUGIN_MEMBERS: dict[str, PluginMember] = {
|
|
|
29
29
|
"published": PluginMember("published", ("published",)),
|
|
30
30
|
"dependencies/install": PluginMember("install", ("install", "uninstall")),
|
|
31
31
|
"dependencies/uninstall": PluginMember("uninstall", ("install", "uninstall")),
|
|
32
|
-
"dependencies/
|
|
32
|
+
"dependencies/link": PluginMember("link", ("link", "unlink")),
|
|
33
|
+
"dependencies/unlink": PluginMember("unlink", ("link", "unlink")),
|
|
34
|
+
"dependencies/declared":PluginMember("declared", ("declared", "rewrite")),
|
|
33
35
|
"dependencies/rewrite": PluginMember("rewrite", ("declared", "rewrite")),
|
|
34
36
|
"dependencies/latest": PluginMember("latest", ("latest",)),
|
|
35
37
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: monosmith-plugin-sdk
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.0b5
|
|
4
4
|
Summary: The Python SDK for writing smith plugins: the protocol's types, the serve loop, a test host, the conformance checks, templating and key-order-keeping JSON editing. No runtime dependencies.
|
|
5
5
|
Author: Eduardo Russo
|
|
6
6
|
License-Expression: MIT
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b5}/src/monosmith_plugin_sdk/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|