mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-11-25 01:52:07 +08:00
LANG-313: register OASlackBridge Slack reply processor (#2887)
* feat(plugins): register OASlackBridge Slack reply processor Co-authored-by: multica-agent <[email protected]> * fix(plugins): keep pipeline open on bridge permission denial Co-authored-by: multica-agent <[email protected]> --------- Co-authored-by: multica-agent <[email protected]>
This commit is contained in:
co-authored by
multica-agent
parent
be9385a86b
commit
045a7ccd8e
@@ -32,7 +32,13 @@ def check_catalog(root: Path = ROOT) -> list[dict]:
|
||||
raise ValueError(f'Duplicate plugin ID: {identity}')
|
||||
identities.add(identity)
|
||||
kinds = manifest['spec']['components']
|
||||
category = 'Runner' if 'Runner' in kinds else 'KnowledgeEngine' if 'KnowledgeEngine' in kinds else 'misc'
|
||||
category = (
|
||||
'Runner'
|
||||
if 'Runner' in kinds and 'EventListener' not in kinds
|
||||
else 'KnowledgeEngine'
|
||||
if 'KnowledgeEngine' in kinds
|
||||
else 'misc'
|
||||
)
|
||||
assert plugin.parent.name == category, path
|
||||
assert metadata['repository'] == REPOSITORY + plugin.relative_to(root).as_posix(), path
|
||||
assert re.fullmatch(r'\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?', str(metadata['version'])), path
|
||||
|
||||
@@ -86,6 +86,13 @@ class RepositoryTests(unittest.TestCase):
|
||||
for entry in catalog:
|
||||
self.assertIn(f'({entry["path"]}/README.md)', readme)
|
||||
|
||||
def test_pipeline_bridge_with_event_runner_remains_misc(self):
|
||||
entry = next(item for item in check_catalog() if item['id'] == 'langbot-team/OASlackBridge')
|
||||
self.assertEqual(entry['category'], 'misc')
|
||||
self.assertEqual(entry['path'], 'misc/OASlackBridge')
|
||||
manifest = yaml.safe_load((ROOT / entry['path'] / 'manifest.yaml').read_text())
|
||||
self.assertEqual(set(manifest['spec']['components']), {'EventListener', 'Runner'})
|
||||
|
||||
def test_original_identities_are_preserved(self):
|
||||
imported = json.loads((ROOT / 'SOURCE.json').read_text())
|
||||
current = {entry['id']: entry['path'] for entry in check_catalog()}
|
||||
|
||||
Reference in New Issue
Block a user