monosmith-plugin-sdk 2.0.0b4__tar.gz → 2.0.0b6__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.0b6}/PKG-INFO +1 -1
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/pyproject.toml +1 -1
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/__init__.py +2 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/protocol/protocol_schema_contract.py +295 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/protocol/protocol_types_contract.py +239 -2
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/serve/__init__.py +2 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/serve/plugin_contract.py +11 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/serve/plugin_members_config.py +3 -1
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6/src/monosmith_plugin_sdk.egg-info}/PKG-INFO +1 -1
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/LICENSE +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/README.md +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/setup.cfg +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/build_dir/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/build_dir/build_dir_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/cancellation/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/cancellation/cancel_token_model.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/cancellation/request_cancelled_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/ci/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/ci/ci_contribution_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/codec/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/codec/encode_by_schema_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/codec/encode_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/codec/encode_json_value_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/codec/message_parse_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/codec/method_codec_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/codec/normalize_by_schema_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/codec/params_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/codec/received_message_contract.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/codec/schema_lookup_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/codec/wire_message_mapper.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/concurrency/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/concurrency/concurrency_policy.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/conformance/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/conformance/check_generation_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/conformance/check_kind_change_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/conformance/check_plugin_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/conformance/check_scheduling_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/conformance/conformance_report_model.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/conformance/find_manifests_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/conformance/go_list_mapper.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/framing/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/framing/frame_message_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/framing/frame_reader_store.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/framing/framing_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/host/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/host/call_interrupted_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/host/connect_plugin_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/host/host_options_contract.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/host/plugin_client_client.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/host/start_plugin_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/jsondoc/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/jsondoc/indent_raw_json_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/jsondoc/json_document_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/jsondoc/json_document_model.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/jsondoc/scan_json_object_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/plugin_refs/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/plugin_refs/plugin_ref_policy.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/plugin_roles/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/plugin_roles/plugin_role_policy.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/projects/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/projects/audit_settings_policy.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/projects/manifest_match_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/projects/project_kind_policy.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/projects/publishes_policy.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/projects/set_toolchain_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/projects/stack_plugins_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/protocol/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/protocol/rpc_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/py.typed +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/scaffold/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/scaffold/scaffold_data_mapper.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/scaffold/scaffold_project_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/serve/capabilities_of_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/serve/claim_stdio_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/serve/dispatch_request_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/serve/frame_writer_store.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/serve/initialize_plugin_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/serve/protocol_streams_contract.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/serve/request_outcome_contract.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/serve/request_pool_store.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/serve/serve_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/tasks/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/tasks/contribute_tasks_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/tasks/task_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/templating/__init__.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/templating/file_exists_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/templating/parse_template_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/templating/render_template_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/templating/template_error.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/templating/template_functions_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/templating/template_syntax_contract.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/templating/tokenize_action_algorithm.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk/templating/write_templates_use_case.py +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk.egg-info/SOURCES.txt +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/src/monosmith_plugin_sdk.egg-info/dependency_links.txt +0 -0
- {monosmith_plugin_sdk-2.0.0b4 → monosmith_plugin_sdk-2.0.0b6}/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.0b6
|
|
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.6"
|
|
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.0b6}/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",
|
|
@@ -1936,6 +2076,13 @@ _SCHEMA_JSON = r'''{
|
|
|
1936
2076
|
"registry": {
|
|
1937
2077
|
"type": "string"
|
|
1938
2078
|
},
|
|
2079
|
+
"notes": {
|
|
2080
|
+
"type": "array",
|
|
2081
|
+
"items": {
|
|
2082
|
+
"type": "string"
|
|
2083
|
+
},
|
|
2084
|
+
"description": "Notes are things the person must know about a publish that succeeded, such as a dist-tag that was not moved; the host prints them and the report keeps them."
|
|
2085
|
+
},
|
|
1939
2086
|
"assets": {
|
|
1940
2087
|
"type": "array",
|
|
1941
2088
|
"items": {
|
|
@@ -2414,6 +2561,121 @@ _SCHEMA_JSON = r'''{
|
|
|
2414
2561
|
"command"
|
|
2415
2562
|
]
|
|
2416
2563
|
},
|
|
2564
|
+
"ToolInstall": {
|
|
2565
|
+
"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.",
|
|
2566
|
+
"type": "object",
|
|
2567
|
+
"properties": {
|
|
2568
|
+
"manager": {
|
|
2569
|
+
"type": "string"
|
|
2570
|
+
},
|
|
2571
|
+
"package": {
|
|
2572
|
+
"type": "string"
|
|
2573
|
+
},
|
|
2574
|
+
"note": {
|
|
2575
|
+
"type": "string",
|
|
2576
|
+
"description": "Note adds a sentence the person needs before choosing (\"a new terminal is needed\")."
|
|
2577
|
+
}
|
|
2578
|
+
},
|
|
2579
|
+
"required": [
|
|
2580
|
+
"manager",
|
|
2581
|
+
"package"
|
|
2582
|
+
]
|
|
2583
|
+
},
|
|
2584
|
+
"ToolNeed": {
|
|
2585
|
+
"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.",
|
|
2586
|
+
"type": "object",
|
|
2587
|
+
"properties": {
|
|
2588
|
+
"name": {
|
|
2589
|
+
"type": "string",
|
|
2590
|
+
"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."
|
|
2591
|
+
},
|
|
2592
|
+
"title": {
|
|
2593
|
+
"type": "string",
|
|
2594
|
+
"description": "Title is what the tool is called in text: \"Python\", \"the .NET SDK\". Doctor words the check \"<Title> is installed\"."
|
|
2595
|
+
},
|
|
2596
|
+
"why": {
|
|
2597
|
+
"type": "string",
|
|
2598
|
+
"description": "Why says in plain words what smith needs the tool for."
|
|
2599
|
+
},
|
|
2600
|
+
"consequence": {
|
|
2601
|
+
"type": "string",
|
|
2602
|
+
"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\"."
|
|
2603
|
+
},
|
|
2604
|
+
"program": {
|
|
2605
|
+
"type": "string",
|
|
2606
|
+
"description": "Program is the program that carries the tool on PATH (\"python3\")."
|
|
2607
|
+
},
|
|
2608
|
+
"alternatives": {
|
|
2609
|
+
"type": "array",
|
|
2610
|
+
"items": {
|
|
2611
|
+
"type": "string"
|
|
2612
|
+
},
|
|
2613
|
+
"description": "Alternatives are other programs that also count (\"python\", \"py\")."
|
|
2614
|
+
},
|
|
2615
|
+
"versionArgs": {
|
|
2616
|
+
"type": "array",
|
|
2617
|
+
"items": {
|
|
2618
|
+
"type": "string"
|
|
2619
|
+
},
|
|
2620
|
+
"description": "VersionArgs are the arguments that make Program print its version. Absent means --version."
|
|
2621
|
+
},
|
|
2622
|
+
"pins": {
|
|
2623
|
+
"type": "array",
|
|
2624
|
+
"items": {
|
|
2625
|
+
"$ref": "#/$defs/ToolVersionPin"
|
|
2626
|
+
},
|
|
2627
|
+
"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."
|
|
2628
|
+
},
|
|
2629
|
+
"choice": {
|
|
2630
|
+
"type": "string",
|
|
2631
|
+
"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."
|
|
2632
|
+
},
|
|
2633
|
+
"systems": {
|
|
2634
|
+
"type": "array",
|
|
2635
|
+
"items": {
|
|
2636
|
+
"type": "string"
|
|
2637
|
+
},
|
|
2638
|
+
"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."
|
|
2639
|
+
},
|
|
2640
|
+
"suggested": {
|
|
2641
|
+
"type": "string",
|
|
2642
|
+
"description": "Suggested is the version smith installs when no pin says one: \"3.13\". It fills {major} and {major.minor} in the install entries."
|
|
2643
|
+
},
|
|
2644
|
+
"optional": {
|
|
2645
|
+
"type": "boolean",
|
|
2646
|
+
"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."
|
|
2647
|
+
},
|
|
2648
|
+
"install": {
|
|
2649
|
+
"type": "array",
|
|
2650
|
+
"items": {
|
|
2651
|
+
"$ref": "#/$defs/ToolInstall"
|
|
2652
|
+
},
|
|
2653
|
+
"description": "Install are the ways to get the tool, per package manager and system."
|
|
2654
|
+
},
|
|
2655
|
+
"download": {
|
|
2656
|
+
"type": "string",
|
|
2657
|
+
"description": "Download is the official page of the tool, for the person who installs it by hand or has no package manager."
|
|
2658
|
+
},
|
|
2659
|
+
"source": {
|
|
2660
|
+
"type": "string",
|
|
2661
|
+
"description": "Source is the address of the page the Install entries were checked against."
|
|
2662
|
+
},
|
|
2663
|
+
"checked": {
|
|
2664
|
+
"type": "string",
|
|
2665
|
+
"description": "Checked is the date (YYYY-MM-DD) the entries were last checked."
|
|
2666
|
+
}
|
|
2667
|
+
},
|
|
2668
|
+
"required": [
|
|
2669
|
+
"name",
|
|
2670
|
+
"title",
|
|
2671
|
+
"why",
|
|
2672
|
+
"consequence",
|
|
2673
|
+
"program",
|
|
2674
|
+
"download",
|
|
2675
|
+
"source",
|
|
2676
|
+
"checked"
|
|
2677
|
+
]
|
|
2678
|
+
},
|
|
2417
2679
|
"ToolPin": {
|
|
2418
2680
|
"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
2681
|
"type": "object",
|
|
@@ -2438,6 +2700,23 @@ _SCHEMA_JSON = r'''{
|
|
|
2438
2700
|
"pinned"
|
|
2439
2701
|
]
|
|
2440
2702
|
},
|
|
2703
|
+
"ToolVersionPin": {
|
|
2704
|
+
"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).",
|
|
2705
|
+
"type": "object",
|
|
2706
|
+
"properties": {
|
|
2707
|
+
"file": {
|
|
2708
|
+
"type": "string",
|
|
2709
|
+
"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."
|
|
2710
|
+
},
|
|
2711
|
+
"format": {
|
|
2712
|
+
"type": "string"
|
|
2713
|
+
}
|
|
2714
|
+
},
|
|
2715
|
+
"required": [
|
|
2716
|
+
"file",
|
|
2717
|
+
"format"
|
|
2718
|
+
]
|
|
2719
|
+
},
|
|
2441
2720
|
"Toolchain": {
|
|
2442
2721
|
"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
2722
|
"type": "object",
|
|
@@ -2489,6 +2768,22 @@ _SCHEMA_JSON = r'''{
|
|
|
2489
2768
|
"packages"
|
|
2490
2769
|
]
|
|
2491
2770
|
},
|
|
2771
|
+
"UnlinkParams": {
|
|
2772
|
+
"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.",
|
|
2773
|
+
"type": "object",
|
|
2774
|
+
"properties": {
|
|
2775
|
+
"project": {
|
|
2776
|
+
"$ref": "#/$defs/Project"
|
|
2777
|
+
},
|
|
2778
|
+
"library": {
|
|
2779
|
+
"$ref": "#/$defs/Project"
|
|
2780
|
+
}
|
|
2781
|
+
},
|
|
2782
|
+
"required": [
|
|
2783
|
+
"project",
|
|
2784
|
+
"library"
|
|
2785
|
+
]
|
|
2786
|
+
},
|
|
2492
2787
|
"VersionParams": {
|
|
2493
2788
|
"description": "VersionParams asks a plugin to record a new version in a project manifest.",
|
|
2494
2789
|
"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
|
|
@@ -1390,6 +1499,11 @@ class PublishResult(_PublishResultRequired, total=False):
|
|
|
1390
1499
|
|
|
1391
1500
|
skipped: str
|
|
1392
1501
|
registry: str
|
|
1502
|
+
notes: list[str]
|
|
1503
|
+
"""
|
|
1504
|
+
Notes are things the person must know about a publish that succeeded, such as a dist-tag that
|
|
1505
|
+
was not moved; the host prints them and the report keeps them.
|
|
1506
|
+
"""
|
|
1393
1507
|
assets: list[str]
|
|
1394
1508
|
"""
|
|
1395
1509
|
Assets are the workspace-relative files built for the release, in upload order; in a dry run,
|
|
@@ -1703,6 +1817,97 @@ class Task(_TaskRequired, total=False):
|
|
|
1703
1817
|
"""ServeTimeout is how long to wait for ServeURL, as a Go duration ("60s"); empty means 60s."""
|
|
1704
1818
|
|
|
1705
1819
|
|
|
1820
|
+
class _ToolInstallRequired(TypedDict):
|
|
1821
|
+
manager: str
|
|
1822
|
+
package: str
|
|
1823
|
+
|
|
1824
|
+
|
|
1825
|
+
class ToolInstall(_ToolInstallRequired, total=False):
|
|
1826
|
+
"""
|
|
1827
|
+
ToolInstall is one way to get a tool with a package manager. Manager is one of: "winget",
|
|
1828
|
+
"brew", "brew-cask", "apt", "dnf", "pacman", "npm", "uv", "fnm" and "rustup". The host builds
|
|
1829
|
+
the exact command from the manager and Package; Package may hold {major} and {major.minor},
|
|
1830
|
+
which the pinned or suggested version fills. The language's own installers (uv, fnm, rustup)
|
|
1831
|
+
are offered only when they are already on the machine.
|
|
1832
|
+
"""
|
|
1833
|
+
|
|
1834
|
+
note: str
|
|
1835
|
+
"""Note adds a sentence the person needs before choosing ("a new terminal is needed")."""
|
|
1836
|
+
|
|
1837
|
+
|
|
1838
|
+
class _ToolNeedRequired(TypedDict):
|
|
1839
|
+
name: str
|
|
1840
|
+
"""
|
|
1841
|
+
Name identifies the tool across plugins and in commands (smith tools install python). Two
|
|
1842
|
+
plugins that need the same tool use the same Name.
|
|
1843
|
+
"""
|
|
1844
|
+
title: str
|
|
1845
|
+
"""
|
|
1846
|
+
Title is what the tool is called in text: "Python", "the .NET SDK". Doctor words the check
|
|
1847
|
+
"<Title> is installed".
|
|
1848
|
+
"""
|
|
1849
|
+
why: str
|
|
1850
|
+
"""Why says in plain words what smith needs the tool for."""
|
|
1851
|
+
consequence: str
|
|
1852
|
+
"""
|
|
1853
|
+
Consequence says what stops working while the tool is missing, as the end of a sentence that
|
|
1854
|
+
starts "If you skip it, ": "smith test and smith build fail for the python projects".
|
|
1855
|
+
"""
|
|
1856
|
+
program: str
|
|
1857
|
+
"""Program is the program that carries the tool on PATH ("python3")."""
|
|
1858
|
+
download: str
|
|
1859
|
+
"""
|
|
1860
|
+
Download is the official page of the tool, for the person who installs it by hand or has no
|
|
1861
|
+
package manager.
|
|
1862
|
+
"""
|
|
1863
|
+
source: str
|
|
1864
|
+
"""Source is the address of the page the Install entries were checked against."""
|
|
1865
|
+
checked: str
|
|
1866
|
+
"""Checked is the date (YYYY-MM-DD) the entries were last checked."""
|
|
1867
|
+
|
|
1868
|
+
|
|
1869
|
+
class ToolNeed(_ToolNeedRequired, total=False):
|
|
1870
|
+
"""
|
|
1871
|
+
ToolNeed is a program on the person's machine that a plugin needs to build, test or run its
|
|
1872
|
+
projects (Python, the .NET SDK, Docker). A plugin publishes the tools it needs in
|
|
1873
|
+
InitializeResult.Tools. The host detects them, and when one is missing it presents the ways
|
|
1874
|
+
to get it (ADR 0077): it never installs in silence. The plugin writes facts only (what the
|
|
1875
|
+
tool is, how to detect it, how each system gets it); the host decides how to ask.
|
|
1876
|
+
"""
|
|
1877
|
+
|
|
1878
|
+
alternatives: list[str]
|
|
1879
|
+
"""Alternatives are other programs that also count ("python", "py")."""
|
|
1880
|
+
versionArgs: list[str]
|
|
1881
|
+
"""VersionArgs are the arguments that make Program print its version. Absent means --version."""
|
|
1882
|
+
pins: list[ToolVersionPin]
|
|
1883
|
+
"""
|
|
1884
|
+
Pins are the files where a workspace pins the version it wants. The first pin the host finds
|
|
1885
|
+
gives the version range. Absent means any version counts.
|
|
1886
|
+
"""
|
|
1887
|
+
choice: str
|
|
1888
|
+
"""
|
|
1889
|
+
Choice limits the tool to stacks that have this choice ("azure-functions"): the tool is not
|
|
1890
|
+
needed by a project built without it. Absent means every project of the plugin needs it.
|
|
1891
|
+
"""
|
|
1892
|
+
systems: list[str]
|
|
1893
|
+
"""
|
|
1894
|
+
Systems limits the tool to these systems, named as Go names them ("windows", "darwin",
|
|
1895
|
+
"linux"): the Xcode Command Line Tools exist only on "darwin". Absent means every system.
|
|
1896
|
+
"""
|
|
1897
|
+
suggested: str
|
|
1898
|
+
"""
|
|
1899
|
+
Suggested is the version smith installs when no pin says one: "3.13". It fills {major} and
|
|
1900
|
+
{major.minor} in the install entries.
|
|
1901
|
+
"""
|
|
1902
|
+
optional: bool
|
|
1903
|
+
"""
|
|
1904
|
+
Optional marks a tool whose absence only costs a feature (running a function app locally).
|
|
1905
|
+
Doctor reports it as a warning, not a failure.
|
|
1906
|
+
"""
|
|
1907
|
+
install: list[ToolInstall]
|
|
1908
|
+
"""Install are the ways to get the tool, per package manager and system."""
|
|
1909
|
+
|
|
1910
|
+
|
|
1706
1911
|
class _ToolPinRequired(TypedDict):
|
|
1707
1912
|
name: str
|
|
1708
1913
|
pinned: str
|
|
@@ -1720,6 +1925,22 @@ class ToolPin(_ToolPinRequired, total=False):
|
|
|
1720
1925
|
"""Newer is true when Latest is a release the pin does not cover."""
|
|
1721
1926
|
|
|
1722
1927
|
|
|
1928
|
+
class ToolVersionPin(TypedDict):
|
|
1929
|
+
"""
|
|
1930
|
+
ToolVersionPin names a file that pins the version of a tool and how to read it. Format is one
|
|
1931
|
+
of: "text" (the first word of the file, as in .nvmrc and .python-version), "go-mod" (the
|
|
1932
|
+
toolchain line, else the go line), "pyproject" (requires-python), "global-json" (sdk.version)
|
|
1933
|
+
and "rust-toolchain" (the channel).
|
|
1934
|
+
"""
|
|
1935
|
+
|
|
1936
|
+
file: str
|
|
1937
|
+
"""
|
|
1938
|
+
File is the base name of the file, looked up at the workspace root and in the folders of the
|
|
1939
|
+
projects that use the tool.
|
|
1940
|
+
"""
|
|
1941
|
+
format: str
|
|
1942
|
+
|
|
1943
|
+
|
|
1723
1944
|
class _ToolchainRequired(TypedDict):
|
|
1724
1945
|
name: str
|
|
1725
1946
|
version: str
|
|
@@ -1754,6 +1975,16 @@ class UninstallParams(TypedDict):
|
|
|
1754
1975
|
packages: list[str]
|
|
1755
1976
|
|
|
1756
1977
|
|
|
1978
|
+
class UnlinkParams(TypedDict):
|
|
1979
|
+
"""
|
|
1980
|
+
UnlinkParams asks a plugin to remove the dependency of Project on Library. Notes of the
|
|
1981
|
+
result say so when the manifest held no such dependency.
|
|
1982
|
+
"""
|
|
1983
|
+
|
|
1984
|
+
project: Project
|
|
1985
|
+
library: Project
|
|
1986
|
+
|
|
1987
|
+
|
|
1757
1988
|
class _VersionParamsRequired(TypedDict):
|
|
1758
1989
|
project: Project
|
|
1759
1990
|
version: str
|
|
@@ -1855,3 +2086,9 @@ class PluginDescription(_PluginDescriptionRequired, total=False):
|
|
|
1855
2086
|
them (smith choices) and checks a selection of them (smith add --with). Absent means the
|
|
1856
2087
|
plugin owns none.
|
|
1857
2088
|
"""
|
|
2089
|
+
tools: list[ToolNeed]
|
|
2090
|
+
"""
|
|
2091
|
+
Tools are the programs the plugin needs on the person's machine. The host detects them and,
|
|
2092
|
+
when one is missing, presents the ways to get it (smith tools). Absent means the plugin
|
|
2093
|
+
declares none.
|
|
2094
|
+
"""
|
|
@@ -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.0b6
|
|
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.0b6}/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
|