monosmith-plugin-sdk 0.3.0__tar.gz → 0.5.0__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.
Potentially problematic release.
This version of monosmith-plugin-sdk might be problematic. Click here for more details.
- {monosmith_plugin_sdk-0.3.0/src/monosmith_plugin_sdk.egg-info → monosmith_plugin_sdk-0.5.0}/PKG-INFO +1 -1
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/pyproject.toml +1 -1
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/__init__.py +2 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/conformance/check_generation_use_case.py +2 -1
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/protocol/protocol_schema_contract.py +119 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/protocol/protocol_types_contract.py +101 -2
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/serve/__init__.py +2 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/serve/plugin_contract.py +8 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/serve/plugin_members_config.py +1 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0/src/monosmith_plugin_sdk.egg-info}/PKG-INFO +1 -1
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/LICENSE +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/README.md +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/setup.cfg +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/build_dir/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/build_dir/build_dir_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/cancellation/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/cancellation/cancel_token_model.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/cancellation/request_cancelled_error.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/ci/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/ci/ci_contribution_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/codec/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/codec/encode_by_schema_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/codec/encode_error.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/codec/encode_json_value_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/codec/message_parse_error.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/codec/method_codec_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/codec/normalize_by_schema_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/codec/params_error.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/codec/received_message_contract.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/codec/schema_lookup_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/codec/wire_message_mapper.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/concurrency/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/concurrency/concurrency_policy.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/conformance/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/conformance/check_kind_change_use_case.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/conformance/check_plugin_use_case.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/conformance/check_scheduling_use_case.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/conformance/conformance_report_model.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/conformance/find_manifests_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/conformance/go_list_mapper.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/framing/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/framing/frame_message_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/framing/frame_reader_store.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/framing/framing_error.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/host/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/host/call_interrupted_error.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/host/connect_plugin_use_case.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/host/host_options_contract.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/host/plugin_client_client.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/host/start_plugin_use_case.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/jsondoc/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/jsondoc/indent_raw_json_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/jsondoc/json_document_error.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/jsondoc/json_document_model.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/jsondoc/scan_json_object_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/plugin_refs/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/plugin_refs/plugin_ref_policy.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/plugin_roles/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/plugin_roles/plugin_role_policy.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/projects/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/projects/audit_settings_policy.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/projects/manifest_match_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/projects/project_kind_policy.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/projects/publishes_policy.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/projects/set_toolchain_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/projects/stack_plugins_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/protocol/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/protocol/rpc_error.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/py.typed +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/scaffold/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/scaffold/scaffold_data_mapper.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/scaffold/scaffold_project_use_case.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/serve/capabilities_of_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/serve/claim_stdio_use_case.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/serve/dispatch_request_use_case.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/serve/frame_writer_store.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/serve/initialize_plugin_use_case.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/serve/protocol_streams_contract.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/serve/request_outcome_contract.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/serve/request_pool_store.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/serve/serve_use_case.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/tasks/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/tasks/contribute_tasks_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/tasks/task_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/templating/__init__.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/templating/file_exists_error.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/templating/parse_template_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/templating/render_template_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/templating/template_error.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/templating/template_functions_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/templating/template_syntax_contract.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/templating/tokenize_action_algorithm.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/templating/write_templates_use_case.py +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk.egg-info/SOURCES.txt +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk.egg-info/dependency_links.txt +0 -0
- {monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk.egg-info/top_level.txt +0 -0
{monosmith_plugin_sdk-0.3.0/src/monosmith_plugin_sdk.egg-info → monosmith_plugin_sdk-0.5.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: monosmith-plugin-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
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 = "0.
|
|
7
|
+
version = "0.5.0"
|
|
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-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/__init__.py
RENAMED
|
@@ -91,6 +91,7 @@ from .protocol import * # noqa: F403
|
|
|
91
91
|
from .scaffold import scaffold_data, scaffold_project
|
|
92
92
|
from .serve import (
|
|
93
93
|
CIContributor,
|
|
94
|
+
ComponentLister,
|
|
94
95
|
Contributor,
|
|
95
96
|
DeclarationEditor,
|
|
96
97
|
DependencyManager,
|
|
@@ -127,6 +128,7 @@ __all__ = [
|
|
|
127
128
|
"Remover",
|
|
128
129
|
"KindChanger",
|
|
129
130
|
"DependencyManager",
|
|
131
|
+
"ComponentLister",
|
|
130
132
|
"DeclarationEditor",
|
|
131
133
|
"LatestReader",
|
|
132
134
|
"Contributor",
|
|
@@ -35,7 +35,8 @@ def check_generation(client: PluginClient, workspace: str | Path, report: Confor
|
|
|
35
35
|
"""
|
|
36
36
|
language = "language" in effective_roles(client.info)
|
|
37
37
|
made: list[GenerateParams] = []
|
|
38
|
-
|
|
38
|
+
declared = client.info.get("kinds") or []
|
|
39
|
+
kinds: tuple[ProjectKind, ...] = tuple(k for k in ("app", "lib", "package") if not declared or k in declared)
|
|
39
40
|
for kind in kinds:
|
|
40
41
|
name = f"c{kind}"
|
|
41
42
|
params: GenerateParams = {
|
|
@@ -219,6 +219,17 @@ _SCHEMA_JSON = r'''{
|
|
|
219
219
|
},
|
|
220
220
|
"capability": "latest",
|
|
221
221
|
"notification": false
|
|
222
|
+
},
|
|
223
|
+
"sbom/components": {
|
|
224
|
+
"description": "Asks which components a project ships (its locked dependencies, read from a lockfile where the ecosystem has one and from the manifest otherwise), as package URLs, for the SBOM a release attaches.",
|
|
225
|
+
"params": {
|
|
226
|
+
"$ref": "#/$defs/ComponentsParams"
|
|
227
|
+
},
|
|
228
|
+
"result": {
|
|
229
|
+
"$ref": "#/$defs/ComponentsResult"
|
|
230
|
+
},
|
|
231
|
+
"capability": "components",
|
|
232
|
+
"notification": false
|
|
222
233
|
}
|
|
223
234
|
},
|
|
224
235
|
"x-errorCodes": [
|
|
@@ -543,6 +554,10 @@ _SCHEMA_JSON = r'''{
|
|
|
543
554
|
"cancel": {
|
|
544
555
|
"type": "boolean",
|
|
545
556
|
"description": "Cancel says the plugin stops the work of a request when the host sends a cancel notification with its id, then answers that request with its result (if the work was already done) or the request-cancelled error. A host never sends the notification to a plugin without it."
|
|
557
|
+
},
|
|
558
|
+
"components": {
|
|
559
|
+
"type": "boolean",
|
|
560
|
+
"description": "Components lists a project's dependencies for its SBOM."
|
|
546
561
|
}
|
|
547
562
|
}
|
|
548
563
|
},
|
|
@@ -600,6 +615,62 @@ _SCHEMA_JSON = r'''{
|
|
|
600
615
|
}
|
|
601
616
|
}
|
|
602
617
|
},
|
|
618
|
+
"Component": {
|
|
619
|
+
"description": "Component is one dependency of a project.",
|
|
620
|
+
"type": "object",
|
|
621
|
+
"properties": {
|
|
622
|
+
"name": {
|
|
623
|
+
"type": "string"
|
|
624
|
+
},
|
|
625
|
+
"version": {
|
|
626
|
+
"type": "string",
|
|
627
|
+
"description": "Version is the locked version, or the declared range when the project has no lockfile."
|
|
628
|
+
},
|
|
629
|
+
"purl": {
|
|
630
|
+
"type": "string",
|
|
631
|
+
"description": "PURL is the package URL (https://github.com/package-url/purl-spec)."
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
"required": [
|
|
635
|
+
"name",
|
|
636
|
+
"purl"
|
|
637
|
+
]
|
|
638
|
+
},
|
|
639
|
+
"ComponentsParams": {
|
|
640
|
+
"description": "ComponentsParams asks a plugin for the components one of its projects ships: what a CycloneDX SBOM lists.",
|
|
641
|
+
"type": "object",
|
|
642
|
+
"properties": {
|
|
643
|
+
"project": {
|
|
644
|
+
"$ref": "#/$defs/Project"
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
"required": [
|
|
648
|
+
"project"
|
|
649
|
+
]
|
|
650
|
+
},
|
|
651
|
+
"ComponentsResult": {
|
|
652
|
+
"description": "ComponentsResult lists the components, read from a lockfile where the ecosystem has one and from the manifest otherwise. An empty list is an answer: the project declares no dependencies.",
|
|
653
|
+
"type": "object",
|
|
654
|
+
"properties": {
|
|
655
|
+
"components": {
|
|
656
|
+
"type": "array",
|
|
657
|
+
"items": {
|
|
658
|
+
"$ref": "#/$defs/Component"
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
|
+
"source": {
|
|
662
|
+
"type": "string",
|
|
663
|
+
"description": "Source is the workspace-relative file the list was read from, \"\" when the project has none."
|
|
664
|
+
},
|
|
665
|
+
"purl": {
|
|
666
|
+
"type": "string",
|
|
667
|
+
"description": "PURL is the project's own package URL when it has a registry identity (without a version: the release supplies it); \"\" otherwise."
|
|
668
|
+
}
|
|
669
|
+
},
|
|
670
|
+
"required": [
|
|
671
|
+
"components"
|
|
672
|
+
]
|
|
673
|
+
},
|
|
603
674
|
"ContributeParams": {
|
|
604
675
|
"description": "ContributeParams hands a plugin the projects it applies to: those whose stack includes it, or, for a workspace-wide convention, those of the languages it supports that smith.toml enables it for.",
|
|
605
676
|
"type": "object",
|
|
@@ -654,6 +725,10 @@ _SCHEMA_JSON = r'''{
|
|
|
654
725
|
}
|
|
655
726
|
},
|
|
656
727
|
"description": "DependsOn adds dependencies to tasks the project already has, by task name ({\"lint\": [\"slice-check\"]})."
|
|
728
|
+
},
|
|
729
|
+
"release": {
|
|
730
|
+
"$ref": "#/$defs/ReleaseDefaults",
|
|
731
|
+
"description": "Release is how the project's release files are made, for a project that releases through GitHub releases and leaves them out of its smith.toml [projects.<name>.release] table; what the table sets wins."
|
|
657
732
|
}
|
|
658
733
|
}
|
|
659
734
|
},
|
|
@@ -1175,6 +1250,13 @@ _SCHEMA_JSON = r'''{
|
|
|
1175
1250
|
"$ref": "#/$defs/Stack"
|
|
1176
1251
|
},
|
|
1177
1252
|
"description": "Stacks are ready-made stacks the plugin publishes."
|
|
1253
|
+
},
|
|
1254
|
+
"kinds": {
|
|
1255
|
+
"type": "array",
|
|
1256
|
+
"items": {
|
|
1257
|
+
"$ref": "#/$defs/ProjectKind"
|
|
1258
|
+
},
|
|
1259
|
+
"description": "Kinds are the project kinds the plugin can scaffold with generate. Absent or empty means all three (app, lib and package): what every plugin that says nothing does. A plugin that scaffolds only some, such as an app, lists them, so the host offers and the conformance suite asks for just those."
|
|
1178
1260
|
}
|
|
1179
1261
|
},
|
|
1180
1262
|
"required": [
|
|
@@ -1639,6 +1721,43 @@ _SCHEMA_JSON = r'''{
|
|
|
1639
1721
|
"auth"
|
|
1640
1722
|
]
|
|
1641
1723
|
},
|
|
1724
|
+
"ReleaseDefaults": {
|
|
1725
|
+
"description": "ReleaseDefaults are release settings a plugin supplies for a project: the same fields as the release-from-a-command settings of smith.toml, used for the ones the project's table leaves out.",
|
|
1726
|
+
"type": "object",
|
|
1727
|
+
"properties": {
|
|
1728
|
+
"build": {
|
|
1729
|
+
"type": "string",
|
|
1730
|
+
"description": "Build is the shell command that makes the files, run at the workspace root on a runner of each platform."
|
|
1731
|
+
},
|
|
1732
|
+
"assets": {
|
|
1733
|
+
"type": "array",
|
|
1734
|
+
"items": {
|
|
1735
|
+
"type": "string"
|
|
1736
|
+
},
|
|
1737
|
+
"description": "Assets are workspace-relative globs of the files Build leaves."
|
|
1738
|
+
},
|
|
1739
|
+
"platforms": {
|
|
1740
|
+
"type": "array",
|
|
1741
|
+
"items": {
|
|
1742
|
+
"type": "string"
|
|
1743
|
+
},
|
|
1744
|
+
"description": "Platforms are the runner platforms (windows-x64, macos-arm64, macos-x64, linux-x64, linux-arm64)."
|
|
1745
|
+
},
|
|
1746
|
+
"assetName": {
|
|
1747
|
+
"type": "string",
|
|
1748
|
+
"description": "AssetName renames each file on upload; see the asset_name setting."
|
|
1749
|
+
},
|
|
1750
|
+
"checksums": {
|
|
1751
|
+
"type": "boolean",
|
|
1752
|
+
"description": "Checksums attaches a checksums file for the files a runner uploads."
|
|
1753
|
+
}
|
|
1754
|
+
},
|
|
1755
|
+
"required": [
|
|
1756
|
+
"build",
|
|
1757
|
+
"assets",
|
|
1758
|
+
"platforms"
|
|
1759
|
+
]
|
|
1760
|
+
},
|
|
1642
1761
|
"RemoveParams": {
|
|
1643
1762
|
"description": "RemoveParams tells a plugin a project is being removed. The host deletes the project's directory first; the plugin cleans what it owns outside it (a go.work entry, a lockfile, an installed package).",
|
|
1644
1763
|
"type": "object",
|
|
@@ -32,6 +32,9 @@ __all__ = [
|
|
|
32
32
|
"Capabilities",
|
|
33
33
|
"ChangeKindParams",
|
|
34
34
|
"ChangeKindResult",
|
|
35
|
+
"Component",
|
|
36
|
+
"ComponentsParams",
|
|
37
|
+
"ComponentsResult",
|
|
35
38
|
"ContributeParams",
|
|
36
39
|
"ContributeResult",
|
|
37
40
|
"Contribution",
|
|
@@ -73,6 +76,7 @@ __all__ = [
|
|
|
73
76
|
"PublishedResult",
|
|
74
77
|
"Registries",
|
|
75
78
|
"Registry",
|
|
79
|
+
"ReleaseDefaults",
|
|
76
80
|
"RemoveParams",
|
|
77
81
|
"RemoveResult",
|
|
78
82
|
"Request",
|
|
@@ -151,11 +155,11 @@ class ErrorCodes:
|
|
|
151
155
|
ERROR_CODES = ErrorCodes()
|
|
152
156
|
|
|
153
157
|
|
|
154
|
-
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"]
|
|
158
|
+
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"]
|
|
155
159
|
"""Every method of the protocol, `initialize`, `shutdown` and the `cancel` notification too."""
|
|
156
160
|
|
|
157
161
|
|
|
158
|
-
CapabilityName = Literal["discover", "generate", "version", "publish", "ci", "doctor", "contribute", "remove", "changeKind", "published", "dependencies", "declarations", "latest", "cancel"]
|
|
162
|
+
CapabilityName = Literal["discover", "generate", "version", "publish", "ci", "doctor", "contribute", "remove", "changeKind", "published", "dependencies", "declarations", "latest", "cancel", "components"]
|
|
159
163
|
"""The names of the capability flags: the optional methods a plugin implements."""
|
|
160
164
|
|
|
161
165
|
|
|
@@ -178,6 +182,7 @@ METHOD_CAPABILITIES: Final[dict[str, str | None]] = {
|
|
|
178
182
|
"dependencies/declared": "declarations",
|
|
179
183
|
"dependencies/rewrite": "declarations",
|
|
180
184
|
"dependencies/latest": "latest",
|
|
185
|
+
"sbom/components": "components",
|
|
181
186
|
}
|
|
182
187
|
"""The capability a plugin advertises to be asked each method (`None`: always available).
|
|
183
188
|
|
|
@@ -331,6 +336,8 @@ class Capabilities(TypedDict, total=False):
|
|
|
331
336
|
with its id, then answers that request with its result (if the work was already done) or the
|
|
332
337
|
request-cancelled error. A host never sends the notification to a plugin without it.
|
|
333
338
|
"""
|
|
339
|
+
components: bool
|
|
340
|
+
"""Components lists a project's dependencies for its SBOM."""
|
|
334
341
|
|
|
335
342
|
|
|
336
343
|
class _ChangeKindParamsRequired(TypedDict):
|
|
@@ -382,6 +389,50 @@ class ChangeKindResult(TypedDict, total=False):
|
|
|
382
389
|
"""
|
|
383
390
|
|
|
384
391
|
|
|
392
|
+
class _ComponentRequired(TypedDict):
|
|
393
|
+
name: str
|
|
394
|
+
purl: str
|
|
395
|
+
"""PURL is the package URL (https://github.com/package-url/purl-spec)."""
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
class Component(_ComponentRequired, total=False):
|
|
399
|
+
"""Component is one dependency of a project."""
|
|
400
|
+
|
|
401
|
+
version: str
|
|
402
|
+
"""Version is the locked version, or the declared range when the project has no lockfile."""
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
class ComponentsParams(TypedDict):
|
|
406
|
+
"""
|
|
407
|
+
ComponentsParams asks a plugin for the components one of its projects ships: what a CycloneDX
|
|
408
|
+
SBOM lists.
|
|
409
|
+
"""
|
|
410
|
+
|
|
411
|
+
project: Project
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
class _ComponentsResultRequired(TypedDict):
|
|
415
|
+
components: list[Component]
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
class ComponentsResult(_ComponentsResultRequired, total=False):
|
|
419
|
+
"""
|
|
420
|
+
ComponentsResult lists the components, read from a lockfile where the ecosystem has one and
|
|
421
|
+
from the manifest otherwise. An empty list is an answer: the project declares no
|
|
422
|
+
dependencies.
|
|
423
|
+
"""
|
|
424
|
+
|
|
425
|
+
source: str
|
|
426
|
+
"""
|
|
427
|
+
Source is the workspace-relative file the list was read from, "" when the project has none.
|
|
428
|
+
"""
|
|
429
|
+
purl: str
|
|
430
|
+
"""
|
|
431
|
+
PURL is the project's own package URL when it has a registry identity (without a version: the
|
|
432
|
+
release supplies it); "" otherwise.
|
|
433
|
+
"""
|
|
434
|
+
|
|
435
|
+
|
|
385
436
|
class ContributeParams(TypedDict):
|
|
386
437
|
"""
|
|
387
438
|
ContributeParams hands a plugin the projects it applies to: those whose stack includes it,
|
|
@@ -413,6 +464,12 @@ class Contribution(TypedDict, total=False):
|
|
|
413
464
|
DependsOn adds dependencies to tasks the project already has, by task name ({"lint":
|
|
414
465
|
["slice-check"]}).
|
|
415
466
|
"""
|
|
467
|
+
release: ReleaseDefaults
|
|
468
|
+
"""
|
|
469
|
+
Release is how the project's release files are made, for a project that releases through
|
|
470
|
+
GitHub releases and leaves them out of its smith.toml [projects.<name>.release] table; what
|
|
471
|
+
the table sets wins.
|
|
472
|
+
"""
|
|
416
473
|
|
|
417
474
|
|
|
418
475
|
class _CredentialRequired(TypedDict):
|
|
@@ -758,6 +815,13 @@ class InitializeResult(_InitializeResultRequired, total=False):
|
|
|
758
815
|
"""Conflicts are plugins that must not be in the same project."""
|
|
759
816
|
stacks: list[Stack]
|
|
760
817
|
"""Stacks are ready-made stacks the plugin publishes."""
|
|
818
|
+
kinds: list[ProjectKind]
|
|
819
|
+
"""
|
|
820
|
+
Kinds are the project kinds the plugin can scaffold with generate. Absent or empty means all
|
|
821
|
+
three (app, lib and package): what every plugin that says nothing does. A plugin that
|
|
822
|
+
scaffolds only some, such as an app, lists them, so the host offers and the conformance suite
|
|
823
|
+
asks for just those.
|
|
824
|
+
"""
|
|
761
825
|
|
|
762
826
|
|
|
763
827
|
class Input(TypedDict):
|
|
@@ -1117,6 +1181,34 @@ class Registry(_RegistryRequired, total=False):
|
|
|
1117
1181
|
"""
|
|
1118
1182
|
|
|
1119
1183
|
|
|
1184
|
+
class _ReleaseDefaultsRequired(TypedDict):
|
|
1185
|
+
build: str
|
|
1186
|
+
"""
|
|
1187
|
+
Build is the shell command that makes the files, run at the workspace root on a runner of
|
|
1188
|
+
each platform.
|
|
1189
|
+
"""
|
|
1190
|
+
assets: list[str]
|
|
1191
|
+
"""Assets are workspace-relative globs of the files Build leaves."""
|
|
1192
|
+
platforms: list[str]
|
|
1193
|
+
"""
|
|
1194
|
+
Platforms are the runner platforms (windows-x64, macos-arm64, macos-x64, linux-x64,
|
|
1195
|
+
linux-arm64).
|
|
1196
|
+
"""
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
class ReleaseDefaults(_ReleaseDefaultsRequired, total=False):
|
|
1200
|
+
"""
|
|
1201
|
+
ReleaseDefaults are release settings a plugin supplies for a project: the same fields as the
|
|
1202
|
+
release-from-a-command settings of smith.toml, used for the ones the project's table leaves
|
|
1203
|
+
out.
|
|
1204
|
+
"""
|
|
1205
|
+
|
|
1206
|
+
assetName: str
|
|
1207
|
+
"""AssetName renames each file on upload; see the asset_name setting."""
|
|
1208
|
+
checksums: bool
|
|
1209
|
+
"""Checksums attaches a checksums file for the files a runner uploads."""
|
|
1210
|
+
|
|
1211
|
+
|
|
1120
1212
|
class _RemoveParamsRequired(TypedDict):
|
|
1121
1213
|
project: Project
|
|
1122
1214
|
|
|
@@ -1420,3 +1512,10 @@ class PluginDescription(_PluginDescriptionRequired, total=False):
|
|
|
1420
1512
|
"""Conflicts are plugins that must not be in the same project."""
|
|
1421
1513
|
stacks: list[Stack]
|
|
1422
1514
|
"""Stacks are ready-made stacks the plugin publishes."""
|
|
1515
|
+
kinds: list[ProjectKind]
|
|
1516
|
+
"""
|
|
1517
|
+
Kinds are the project kinds the plugin can scaffold with generate. Absent or empty means all
|
|
1518
|
+
three (app, lib and package): what every plugin that says nothing does. A plugin that
|
|
1519
|
+
scaffolds only some, such as an app, lists them, so the host offers and the conformance suite
|
|
1520
|
+
asks for just those.
|
|
1521
|
+
"""
|
{monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/serve/__init__.py
RENAMED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from .capabilities_of_algorithm import capabilities_of, implements_method
|
|
4
4
|
from .plugin_contract import (
|
|
5
5
|
CIContributor,
|
|
6
|
+
ComponentLister,
|
|
6
7
|
Contributor,
|
|
7
8
|
DeclarationEditor,
|
|
8
9
|
DependencyManager,
|
|
@@ -27,6 +28,7 @@ __all__ = [
|
|
|
27
28
|
"ByteSource",
|
|
28
29
|
"CIContributor",
|
|
29
30
|
"Contributor",
|
|
31
|
+
"ComponentLister",
|
|
30
32
|
"DeclarationEditor",
|
|
31
33
|
"DependencyManager",
|
|
32
34
|
"Discoverer",
|
|
@@ -21,6 +21,8 @@ from ..protocol import (
|
|
|
21
21
|
ChangeKindResult,
|
|
22
22
|
CIParams,
|
|
23
23
|
CIResult,
|
|
24
|
+
ComponentsParams,
|
|
25
|
+
ComponentsResult,
|
|
24
26
|
ContributeParams,
|
|
25
27
|
ContributeResult,
|
|
26
28
|
DeclaredParams,
|
|
@@ -115,6 +117,12 @@ class KindChanger(Protocol):
|
|
|
115
117
|
def change_kind(self, params: ChangeKindParams, cancel: CancelToken) -> ChangeKindResult: ...
|
|
116
118
|
|
|
117
119
|
|
|
120
|
+
class ComponentLister(Protocol):
|
|
121
|
+
"""`sbom/components`: the components a project ships, for the SBOM a release attaches."""
|
|
122
|
+
|
|
123
|
+
def components(self, params: ComponentsParams, cancel: CancelToken) -> ComponentsResult: ...
|
|
124
|
+
|
|
125
|
+
|
|
118
126
|
class DependencyManager(Protocol):
|
|
119
127
|
"""`dependencies/install` and `dependencies/uninstall`: both, or the capability is not advertised."""
|
|
120
128
|
|
|
@@ -23,6 +23,7 @@ PLUGIN_MEMBERS: dict[str, PluginMember] = {
|
|
|
23
23
|
"contribute": PluginMember("contribute", ("contribute",)),
|
|
24
24
|
"remove": PluginMember("remove", ("remove",)),
|
|
25
25
|
"project/kind": PluginMember("change_kind", ("change_kind",)),
|
|
26
|
+
"sbom/components": PluginMember("components", ("components",)),
|
|
26
27
|
"published": PluginMember("published", ("published",)),
|
|
27
28
|
"dependencies/install": PluginMember("install", ("install", "uninstall")),
|
|
28
29
|
"dependencies/uninstall": PluginMember("uninstall", ("install", "uninstall")),
|
{monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0/src/monosmith_plugin_sdk.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: monosmith-plugin-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
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
|
{monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/ci/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/codec/__init__.py
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
|
{monosmith_plugin_sdk-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/host/__init__.py
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
|
|
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-0.3.0 → monosmith_plugin_sdk-0.5.0}/src/monosmith_plugin_sdk/tasks/__init__.py
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
|