katalyst-plugin-context 0.2.1a17__tar.gz → 0.2.1a18__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.
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/.gitignore +3 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/PKG-INFO +1 -1
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/pyproject.toml +1 -1
- katalyst_plugin_context-0.2.1a18/xspec/features/cli/54_kata_context_plugin_turned_off.feature +52 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/steps/context.ts +13 -4
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/Justfile +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/__init__.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/adapters/__init__.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/adapters/runtime_graph.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/cli.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/composition.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/domain/__init__.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/domain/context.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/domain/graph.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/domain/markdown.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/domain/paths.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/domain/policy.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/domain/settings.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/lint.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/mcp_tools.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/plugin.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/py.typed +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/rest.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/schema.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/katalyst_plugin_context/service.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/src/layer.yaml +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/tests/conftest.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/tests/context_support.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/tests/test_context.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/tests/test_cross_backend_edges.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/tests/test_lint.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/tests/test_shared_names.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/tests/test_source_install.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/tests/test_surfaces.py +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/.gitignore +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/Justfile +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/features/cli/52_kata_context.feature +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/features/cli/53_kata_context_budget_policy.feature +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/features/mcp/09_mcp_context.feature +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/fixtures/context-catalogue/catalogue/areas/payments.yaml +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/fixtures/context-catalogue/catalogue/checks/encrypt-card-data.scan-for-card-numbers.yaml +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/fixtures/context-catalogue/catalogue/components/payments.checkout.web-api.yaml +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/fixtures/context-catalogue/catalogue/decisions/async-events.yaml +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/fixtures/context-catalogue/catalogue/decisions/pin-httpx.yaml +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/fixtures/context-catalogue/catalogue/decisions/use-postgres.yaml +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/fixtures/context-catalogue/catalogue/packages/httpx.yaml +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/fixtures/context-catalogue/catalogue/rules/encrypt-card-data.yaml +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/fixtures/context-catalogue/catalogue/rules/log-correlation-id.yaml +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/fixtures/context-catalogue/catalogue/services/payments.checkout.yaml +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/layer.yaml +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/package.json +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/playwright.config.ts +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/steps/steps.ts +0 -0
- {katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/tsconfig.json +0 -0
|
@@ -125,3 +125,6 @@ node_modules/
|
|
|
125
125
|
# Bard's built web assets (SPA, server bundle, desktop shell): build output, made by
|
|
126
126
|
# scripts/build_bard_web.sh where Bard is tested, packaged or served. The wheel includes them.
|
|
127
127
|
plugins/bard/src/katalyst_plugin_bard/web_dist/
|
|
128
|
+
|
|
129
|
+
# `just dev-bundle`: kata without the test bundle
|
|
130
|
+
.venv-bundle/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "katalyst-plugin-context"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.1a18"
|
|
4
4
|
description = "Katalyst context plugin — the right context from the taxonomy for an agent working on a node"
|
|
5
5
|
license = { text = "Proprietary" }
|
|
6
6
|
requires-python = ">=3.13,<3.14"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@cli @area-context
|
|
2
|
+
Feature: Kata CLI - Context: a plugin turned off in the configuration contributes nothing
|
|
3
|
+
As an operator who has turned the context plugin off
|
|
4
|
+
I want it to add no lint rule and no command, whatever else its section of the configuration says
|
|
5
|
+
So that off means off, in every command
|
|
6
|
+
|
|
7
|
+
# `enabled: false` on a plugin of `spec.plugins` stops it everywhere: the lint rules it
|
|
8
|
+
# adds, the `kata tax context` command, the REST routes and MCP tools. The same configuration with the
|
|
9
|
+
# plugin on warns in 53_kata_context_budget_policy.feature. See also
|
|
10
|
+
# mcp/xspec/features/api/19_api_plugin_turned_off.feature (the REST routes).
|
|
11
|
+
# (github.com/esimplicityinc/katalyst-taxonomy/issues/347)
|
|
12
|
+
|
|
13
|
+
Background:
|
|
14
|
+
Given the payments catalogue is installed
|
|
15
|
+
|
|
16
|
+
@smoke
|
|
17
|
+
Scenario: A plugin turned off adds no lint rule
|
|
18
|
+
Given I run "kata config profile create reviewer --copy-from local"
|
|
19
|
+
And the context plugin is turned off and configured with:
|
|
20
|
+
"""
|
|
21
|
+
profiles:
|
|
22
|
+
reviewer:
|
|
23
|
+
policy:
|
|
24
|
+
paths: { deny: ["*:in", "USES_PACKAGE"] }
|
|
25
|
+
"""
|
|
26
|
+
When I run "kata tax lint"
|
|
27
|
+
Then the command should succeed
|
|
28
|
+
And the output should not contain "context-policy"
|
|
29
|
+
And the output should not contain "Rule warnings"
|
|
30
|
+
|
|
31
|
+
Scenario: A plugin turned off adds no command
|
|
32
|
+
Given the context plugin is turned off and configured with:
|
|
33
|
+
"""
|
|
34
|
+
policy:
|
|
35
|
+
max_depth: 3
|
|
36
|
+
"""
|
|
37
|
+
When I run "kata tax context filesystem:payments.checkout.web-api"
|
|
38
|
+
Then the command should fail
|
|
39
|
+
And the output should contain "No such command 'context'"
|
|
40
|
+
|
|
41
|
+
Scenario: The same section with the plugin on is linted
|
|
42
|
+
Given I run "kata config profile create reviewer --copy-from local"
|
|
43
|
+
And the context plugin is configured with:
|
|
44
|
+
"""
|
|
45
|
+
profiles:
|
|
46
|
+
reviewer:
|
|
47
|
+
policy:
|
|
48
|
+
paths: { deny: ["*:in", "USES_PACKAGE"] }
|
|
49
|
+
"""
|
|
50
|
+
When I run "kata tax lint"
|
|
51
|
+
Then the command should succeed
|
|
52
|
+
And the output should contain "[context-policy]"
|
{katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/steps/context.ts
RENAMED
|
@@ -35,19 +35,19 @@ function copyPayments(repoDir: string): void {
|
|
|
35
35
|
* The text that goes under `spec:` of config.yaml to configure the context plugin: the
|
|
36
36
|
* docstring is the plugin's `config` mapping.
|
|
37
37
|
*/
|
|
38
|
-
function pluginsBlock(configYaml: string): string {
|
|
38
|
+
function pluginsBlock(configYaml: string, enabled = true): string {
|
|
39
39
|
const body = dedent(configYaml)
|
|
40
40
|
.split('\n')
|
|
41
41
|
.map((line) => (line.length > 0 ? ` ${line}` : line))
|
|
42
42
|
.join('\n');
|
|
43
|
-
return [' plugins:', ' - name: context', ' config:', body, ''].join('\n');
|
|
43
|
+
return [' plugins:', ' - name: context', ...(enabled ? [] : [' enabled: false']), ' config:', body, ''].join('\n');
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/** Append the plugin block to a config file whose `spec:` is its last mapping. */
|
|
47
|
-
function appendPluginConfig(configFile: string, configYaml: string): void {
|
|
47
|
+
function appendPluginConfig(configFile: string, configYaml: string, enabled = true): void {
|
|
48
48
|
const current = fs.readFileSync(configFile, 'utf-8');
|
|
49
49
|
expect(current, `${configFile} already configures plugins`).not.toContain('\n plugins:');
|
|
50
|
-
fs.writeFileSync(configFile, `${current.replace(/\n*$/, '\n')}${pluginsBlock(configYaml)}`, 'utf-8');
|
|
50
|
+
fs.writeFileSync(configFile, `${current.replace(/\n*$/, '\n')}${pluginsBlock(configYaml, enabled)}`, 'utf-8');
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
/**
|
|
@@ -107,6 +107,15 @@ export function registerContextSteps(test: typeof sharedTest): void {
|
|
|
107
107
|
},
|
|
108
108
|
);
|
|
109
109
|
|
|
110
|
+
Given(
|
|
111
|
+
'the context plugin is turned off and configured with:',
|
|
112
|
+
{ tags: '@cli' },
|
|
113
|
+
async ({ cliWorld }: { cliWorld: CliWorld }, docString: string) => {
|
|
114
|
+
const home = buildEnv(cliWorld).KATALYST_HOME as string;
|
|
115
|
+
appendPluginConfig(path.join(home, 'config', 'config.yaml'), docString, false);
|
|
116
|
+
},
|
|
117
|
+
);
|
|
118
|
+
|
|
110
119
|
When(
|
|
111
120
|
'I record the item names of the context output',
|
|
112
121
|
{ tags: '@cli' },
|
|
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
|
{katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/tests/context_support.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/tests/test_shared_names.py
RENAMED
|
File without changes
|
{katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/tests/test_source_install.py
RENAMED
|
File without changes
|
{katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/tests/test_surfaces.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
|
{katalyst_plugin_context-0.2.1a17 → katalyst_plugin_context-0.2.1a18}/xspec/playwright.config.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|