meldfabric 0.1.0b1__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.
- meldfabric-0.1.0b1/.gitignore +65 -0
- meldfabric-0.1.0b1/CHANGELOG.md +15 -0
- meldfabric-0.1.0b1/LICENSE +201 -0
- meldfabric-0.1.0b1/PKG-INFO +187 -0
- meldfabric-0.1.0b1/README.md +147 -0
- meldfabric-0.1.0b1/mypy.ini +11 -0
- meldfabric-0.1.0b1/pyproject.toml +76 -0
- meldfabric-0.1.0b1/pytest.ini +4 -0
- meldfabric-0.1.0b1/ruff.toml +6 -0
- meldfabric-0.1.0b1/scripts/build-package.sh +27 -0
- meldfabric-0.1.0b1/src/meldfabric/__init__.py +38 -0
- meldfabric-0.1.0b1/src/meldfabric/_version.py +12 -0
- meldfabric-0.1.0b1/src/meldfabric/agents/__init__.py +50 -0
- meldfabric-0.1.0b1/src/meldfabric/agents/concurrency.py +51 -0
- meldfabric-0.1.0b1/src/meldfabric/agents/native_compiler.py +1472 -0
- meldfabric-0.1.0b1/src/meldfabric/agents/runtime.py +1067 -0
- meldfabric-0.1.0b1/src/meldfabric/agents/types.py +59 -0
- meldfabric-0.1.0b1/src/meldfabric/app.py +596 -0
- meldfabric-0.1.0b1/src/meldfabric/config/__init__.py +33 -0
- meldfabric-0.1.0b1/src/meldfabric/config/backup.py +251 -0
- meldfabric-0.1.0b1/src/meldfabric/config/database.py +113 -0
- meldfabric-0.1.0b1/src/meldfabric/config/defaults.py +35 -0
- meldfabric-0.1.0b1/src/meldfabric/config/models.py +975 -0
- meldfabric-0.1.0b1/src/meldfabric/config/reconciliation.py +681 -0
- meldfabric-0.1.0b1/src/meldfabric/config/repository.py +791 -0
- meldfabric-0.1.0b1/src/meldfabric/config/schema.py +133 -0
- meldfabric-0.1.0b1/src/meldfabric/config/store.py +139 -0
- meldfabric-0.1.0b1/src/meldfabric/config/structured.py +396 -0
- meldfabric-0.1.0b1/src/meldfabric/config/types.py +55 -0
- meldfabric-0.1.0b1/src/meldfabric/domain/__init__.py +15 -0
- meldfabric-0.1.0b1/src/meldfabric/domain/enums.py +29 -0
- meldfabric-0.1.0b1/src/meldfabric/domain/identity.py +11 -0
- meldfabric-0.1.0b1/src/meldfabric/domain/names.py +72 -0
- meldfabric-0.1.0b1/src/meldfabric/domain/serialization.py +49 -0
- meldfabric-0.1.0b1/src/meldfabric/errors.py +223 -0
- meldfabric-0.1.0b1/src/meldfabric/events.py +43 -0
- meldfabric-0.1.0b1/src/meldfabric/identity/__init__.py +17 -0
- meldfabric-0.1.0b1/src/meldfabric/identity/resolver.py +163 -0
- meldfabric-0.1.0b1/src/meldfabric/interventions.py +19 -0
- meldfabric-0.1.0b1/src/meldfabric/management/__init__.py +5 -0
- meldfabric-0.1.0b1/src/meldfabric/management/api.py +1859 -0
- meldfabric-0.1.0b1/src/meldfabric/management/entities.py +168 -0
- meldfabric-0.1.0b1/src/meldfabric/management/mutations.py +209 -0
- meldfabric-0.1.0b1/src/meldfabric/management/playground.py +225 -0
- meldfabric-0.1.0b1/src/meldfabric/management/references.py +110 -0
- meldfabric-0.1.0b1/src/meldfabric/management/schemas.py +167 -0
- meldfabric-0.1.0b1/src/meldfabric/management/static/assets/index-B0uPqd5d.js +234 -0
- meldfabric-0.1.0b1/src/meldfabric/management/static/assets/index-C8o7EX3G.css +1 -0
- meldfabric-0.1.0b1/src/meldfabric/management/static/build.json +3 -0
- meldfabric-0.1.0b1/src/meldfabric/management/static/index.html +15 -0
- meldfabric-0.1.0b1/src/meldfabric/management/web.py +32 -0
- meldfabric-0.1.0b1/src/meldfabric/mcp/__init__.py +5 -0
- meldfabric-0.1.0b1/src/meldfabric/mcp/manager.py +279 -0
- meldfabric-0.1.0b1/src/meldfabric/models/__init__.py +15 -0
- meldfabric-0.1.0b1/src/meldfabric/models/probe.py +84 -0
- meldfabric-0.1.0b1/src/meldfabric/models/registry.py +288 -0
- meldfabric-0.1.0b1/src/meldfabric/observability/__init__.py +5 -0
- meldfabric-0.1.0b1/src/meldfabric/observability/manager.py +390 -0
- meldfabric-0.1.0b1/src/meldfabric/orchestration.py +5 -0
- meldfabric-0.1.0b1/src/meldfabric/prompts/__init__.py +5 -0
- meldfabric-0.1.0b1/src/meldfabric/prompts/renderer.py +68 -0
- meldfabric-0.1.0b1/src/meldfabric/protocols/__init__.py +5 -0
- meldfabric-0.1.0b1/src/meldfabric/protocols/a2a.py +788 -0
- meldfabric-0.1.0b1/src/meldfabric/protocols/ag_ui.py +299 -0
- meldfabric-0.1.0b1/src/meldfabric/registrations/__init__.py +64 -0
- meldfabric-0.1.0b1/src/meldfabric/registrations/catalog.py +308 -0
- meldfabric-0.1.0b1/src/meldfabric/registrations/decorators.py +597 -0
- meldfabric-0.1.0b1/src/meldfabric/registrations/runtime.py +554 -0
- meldfabric-0.1.0b1/src/meldfabric/registrations/types.py +107 -0
- meldfabric-0.1.0b1/src/meldfabric/remote/__init__.py +35 -0
- meldfabric-0.1.0b1/src/meldfabric/remote/a2a_client.py +314 -0
- meldfabric-0.1.0b1/src/meldfabric/remote/client.py +185 -0
- meldfabric-0.1.0b1/src/meldfabric/remote/manager.py +796 -0
- meldfabric-0.1.0b1/src/meldfabric/remote/models.py +182 -0
- meldfabric-0.1.0b1/src/meldfabric/resources/__init__.py +5 -0
- meldfabric-0.1.0b1/src/meldfabric/resources/capabilities.py +216 -0
- meldfabric-0.1.0b1/src/meldfabric/resources/features.py +312 -0
- meldfabric-0.1.0b1/src/meldfabric/runtime/__init__.py +16 -0
- meldfabric-0.1.0b1/src/meldfabric/runtime/bootstrap.py +47 -0
- meldfabric-0.1.0b1/src/meldfabric/runtime/drivers.py +119 -0
- meldfabric-0.1.0b1/src/meldfabric/runtime/snapshots.py +135 -0
- meldfabric-0.1.0b1/src/meldfabric/sandbox/__init__.py +17 -0
- meldfabric-0.1.0b1/src/meldfabric/sandbox/base.py +74 -0
- meldfabric-0.1.0b1/src/meldfabric/sandbox/docker.py +501 -0
- meldfabric-0.1.0b1/src/meldfabric/sandbox/manager.py +237 -0
- meldfabric-0.1.0b1/src/meldfabric/security/__init__.py +5 -0
- meldfabric-0.1.0b1/src/meldfabric/security/crypto.py +172 -0
- meldfabric-0.1.0b1/src/meldfabric/skills/__init__.py +10 -0
- meldfabric-0.1.0b1/src/meldfabric/skills/manager.py +212 -0
- meldfabric-0.1.0b1/src/meldfabric/storage/__init__.py +41 -0
- meldfabric-0.1.0b1/src/meldfabric/storage/database.py +124 -0
- meldfabric-0.1.0b1/src/meldfabric/storage/manager.py +309 -0
- meldfabric-0.1.0b1/src/meldfabric/storage/memory.py +190 -0
- meldfabric-0.1.0b1/src/meldfabric/storage/migrations.py +239 -0
- meldfabric-0.1.0b1/src/meldfabric/storage/persistence.py +276 -0
- meldfabric-0.1.0b1/src/meldfabric/storage/playground.py +200 -0
- meldfabric-0.1.0b1/src/meldfabric/storage/schema.py +291 -0
- meldfabric-0.1.0b1/src/meldfabric/storage/secrets.py +382 -0
- meldfabric-0.1.0b1/src/meldfabric/storage/sql.py +38 -0
- meldfabric-0.1.0b1/src/meldfabric/storage/strands.py +179 -0
- meldfabric-0.1.0b1/src/meldfabric/storage/system.py +1168 -0
- meldfabric-0.1.0b1/src/meldfabric/storage/types.py +92 -0
- meldfabric-0.1.0b1/src/meldfabric/tools/__init__.py +20 -0
- meldfabric-0.1.0b1/src/meldfabric/tools/registry.py +432 -0
- meldfabric-0.1.0b1/src/meldfabric/tools/workspace.py +81 -0
- meldfabric-0.1.0b1/uv.lock +2979 -0
- meldfabric-0.1.0b1/web/index.html +14 -0
- meldfabric-0.1.0b1/web/package-lock.json +1062 -0
- meldfabric-0.1.0b1/web/package.json +23 -0
- meldfabric-0.1.0b1/web/scripts/check-design.mjs +58 -0
- meldfabric-0.1.0b1/web/scripts/stamp.mjs +27 -0
- meldfabric-0.1.0b1/web/src/App.vue +288 -0
- meldfabric-0.1.0b1/web/src/api.js +109 -0
- meldfabric-0.1.0b1/web/src/components/AgentConfigEditor.vue +481 -0
- meldfabric-0.1.0b1/web/src/components/BindingPicker.vue +88 -0
- meldfabric-0.1.0b1/web/src/components/ChoiceControl.vue +62 -0
- meldfabric-0.1.0b1/web/src/components/CodeExample.vue +41 -0
- meldfabric-0.1.0b1/web/src/components/CodeRegistrationCatalog.vue +86 -0
- meldfabric-0.1.0b1/web/src/components/ConfigSchemaForm.vue +34 -0
- meldfabric-0.1.0b1/web/src/components/ConfigurationModes.vue +37 -0
- meldfabric-0.1.0b1/web/src/components/ConfirmDialog.vue +37 -0
- meldfabric-0.1.0b1/web/src/components/ContextMenu.vue +74 -0
- meldfabric-0.1.0b1/web/src/components/Disclosure.vue +36 -0
- meldfabric-0.1.0b1/web/src/components/EndpointConfigEditor.vue +245 -0
- meldfabric-0.1.0b1/web/src/components/GraphCanvas.vue +635 -0
- meldfabric-0.1.0b1/web/src/components/Icon.vue +37 -0
- meldfabric-0.1.0b1/web/src/components/ModalFrame.vue +47 -0
- meldfabric-0.1.0b1/web/src/components/MotionDialog.vue +71 -0
- meldfabric-0.1.0b1/web/src/components/MotionPresence.vue +96 -0
- meldfabric-0.1.0b1/web/src/components/NumberStepper.vue +52 -0
- meldfabric-0.1.0b1/web/src/components/OrchestrationConfigEditor.vue +416 -0
- meldfabric-0.1.0b1/web/src/components/PromptEditor.vue +136 -0
- meldfabric-0.1.0b1/web/src/components/ReconciliationDialog.vue +142 -0
- meldfabric-0.1.0b1/web/src/components/ResourceConfigEditor.vue +1168 -0
- meldfabric-0.1.0b1/web/src/components/SearchField.vue +18 -0
- meldfabric-0.1.0b1/web/src/components/SelectControl.vue +270 -0
- meldfabric-0.1.0b1/web/src/components/SettingRow.vue +44 -0
- meldfabric-0.1.0b1/web/src/components/StructuredDataEditor.vue +41 -0
- meldfabric-0.1.0b1/web/src/components/StructuredField.vue +641 -0
- meldfabric-0.1.0b1/web/src/components/StructuredSettings.vue +72 -0
- meldfabric-0.1.0b1/web/src/components/TechnicalId.vue +37 -0
- meldfabric-0.1.0b1/web/src/components/ToastStack.vue +28 -0
- meldfabric-0.1.0b1/web/src/components/ToggleSwitch.vue +25 -0
- meldfabric-0.1.0b1/web/src/components/ToolDescriptionEditor.vue +104 -0
- meldfabric-0.1.0b1/web/src/components/UiButton.vue +39 -0
- meldfabric-0.1.0b1/web/src/components/UiDescription.vue +3 -0
- meldfabric-0.1.0b1/web/src/components/WorkflowCanvas.vue +533 -0
- meldfabric-0.1.0b1/web/src/composables/useInfiniteCanvas.js +146 -0
- meldfabric-0.1.0b1/web/src/dialogs.js +22 -0
- meldfabric-0.1.0b1/web/src/directives/contextMenu.js +78 -0
- meldfabric-0.1.0b1/web/src/domain/developerExamples.js +238 -0
- meldfabric-0.1.0b1/web/src/domain/metadata.js +87 -0
- meldfabric-0.1.0b1/web/src/domain/structuredData.js +250 -0
- meldfabric-0.1.0b1/web/src/main.js +16 -0
- meldfabric-0.1.0b1/web/src/motion.js +71 -0
- meldfabric-0.1.0b1/web/src/router.js +152 -0
- meldfabric-0.1.0b1/web/src/store.js +248 -0
- meldfabric-0.1.0b1/web/src/style.css +11 -0
- meldfabric-0.1.0b1/web/src/styles/directories.css +406 -0
- meldfabric-0.1.0b1/web/src/styles/editors.css +644 -0
- meldfabric-0.1.0b1/web/src/styles/foundation.css +528 -0
- meldfabric-0.1.0b1/web/src/styles/operations.css +1278 -0
- meldfabric-0.1.0b1/web/src/styles/orchestration.css +641 -0
- meldfabric-0.1.0b1/web/src/styles/overlays-responsive.css +458 -0
- meldfabric-0.1.0b1/web/src/styles/playground.css +616 -0
- meldfabric-0.1.0b1/web/src/styles/reconciliation.css +186 -0
- meldfabric-0.1.0b1/web/src/styles/shell.css +274 -0
- meldfabric-0.1.0b1/web/src/styles/structured.css +552 -0
- meldfabric-0.1.0b1/web/src/styles/welcome.css +70 -0
- meldfabric-0.1.0b1/web/src/views/DeveloperDocsView.vue +1069 -0
- meldfabric-0.1.0b1/web/src/views/DiagnosticsView.vue +184 -0
- meldfabric-0.1.0b1/web/src/views/DirectoryView.vue +426 -0
- meldfabric-0.1.0b1/web/src/views/EntityEditorView.vue +534 -0
- meldfabric-0.1.0b1/web/src/views/NotFoundView.vue +7 -0
- meldfabric-0.1.0b1/web/src/views/OverviewView.vue +98 -0
- meldfabric-0.1.0b1/web/src/views/PlaygroundView.vue +811 -0
- meldfabric-0.1.0b1/web/src/views/PoolLayout.vue +52 -0
- meldfabric-0.1.0b1/web/src/views/SystemView.vue +502 -0
- meldfabric-0.1.0b1/web/vite.config.js +48 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Operating system and editors
|
|
2
|
+
.DS_Store
|
|
3
|
+
*~
|
|
4
|
+
*.orig
|
|
5
|
+
.*.swp
|
|
6
|
+
.idea/
|
|
7
|
+
.vscode/
|
|
8
|
+
.history/
|
|
9
|
+
.ropeproject
|
|
10
|
+
.project
|
|
11
|
+
.pydevproject
|
|
12
|
+
.settings/
|
|
13
|
+
|
|
14
|
+
# Local environments and secrets
|
|
15
|
+
.env
|
|
16
|
+
.env.*
|
|
17
|
+
!.env.example
|
|
18
|
+
.venv/
|
|
19
|
+
venv/
|
|
20
|
+
*.key
|
|
21
|
+
.meldfabric/
|
|
22
|
+
|
|
23
|
+
# Python caches and tooling
|
|
24
|
+
__pycache__/
|
|
25
|
+
*.py[cod]
|
|
26
|
+
*.so
|
|
27
|
+
*.egg
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.eggs/
|
|
30
|
+
.cache/
|
|
31
|
+
.pytest_cache/
|
|
32
|
+
.ruff_cache/
|
|
33
|
+
.mypy_cache/
|
|
34
|
+
.hypothesis/
|
|
35
|
+
.tox/
|
|
36
|
+
.nox/
|
|
37
|
+
.dmypy.json
|
|
38
|
+
|
|
39
|
+
# Coverage and test reports
|
|
40
|
+
.coverage
|
|
41
|
+
.coverage.*
|
|
42
|
+
htmlcov/
|
|
43
|
+
coverage.xml
|
|
44
|
+
junit.xml
|
|
45
|
+
cov.xml
|
|
46
|
+
report.xml
|
|
47
|
+
playwright-report/
|
|
48
|
+
test-results/
|
|
49
|
+
|
|
50
|
+
# Build outputs
|
|
51
|
+
build/
|
|
52
|
+
dist/
|
|
53
|
+
sdist/
|
|
54
|
+
cover/
|
|
55
|
+
MANIFEST
|
|
56
|
+
web/dist/
|
|
57
|
+
web/node_modules/
|
|
58
|
+
src/meldfabric/management/static/
|
|
59
|
+
|
|
60
|
+
# Local verification artifacts and runtime data
|
|
61
|
+
artifacts/
|
|
62
|
+
*.log
|
|
63
|
+
*.db
|
|
64
|
+
*.sqlite
|
|
65
|
+
*.sqlite3
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
<!-- version list -->
|
|
4
|
+
|
|
5
|
+
## v0.1.0-beta.1 (2026-11-20)
|
|
6
|
+
|
|
7
|
+
### Chores
|
|
8
|
+
|
|
9
|
+
- **ci**: Pin action runner on ubuntu-24.04 and update semantic rule
|
|
10
|
+
([`779de15`](https://github.com/uwa-lab/MeldFabric/commit/779de1567e252fcbb8a36a5c3a17365137884012))
|
|
11
|
+
|
|
12
|
+
### Update
|
|
13
|
+
|
|
14
|
+
- Initial MeldFabric release
|
|
15
|
+
([`7dff909`](https://github.com/uwa-lab/MeldFabric/commit/7dff909bf13ec1024941c7548861e33def97f87a))
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: meldfabric
|
|
3
|
+
Version: 0.1.0-beta.1
|
|
4
|
+
Summary: Configuration-driven runtime and control plane for Strands Agents
|
|
5
|
+
Project-URL: Homepage, https://github.com/uwa-lab/MeldFabric
|
|
6
|
+
Project-URL: Repository, https://github.com/uwa-lab/MeldFabric.git
|
|
7
|
+
Project-URL: Issues, https://github.com/uwa-lab/MeldFabric/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/uwa-lab/MeldFabric/blob/main/CHANGELOG.md
|
|
9
|
+
Author: MeldFabric Contributors
|
|
10
|
+
License-Expression: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Python: <4,>=3.11
|
|
13
|
+
Requires-Dist: a2a-sdk<0.4,>=0.3
|
|
14
|
+
Requires-Dist: aiosqlite<1,>=0.20
|
|
15
|
+
Requires-Dist: asyncmy<1,>=0.2
|
|
16
|
+
Requires-Dist: asyncpg<1,>=0.29
|
|
17
|
+
Requires-Dist: cryptography<47,>=45
|
|
18
|
+
Requires-Dist: fastapi<0.163,>=0.115
|
|
19
|
+
Requires-Dist: filelock<4,>=3.16
|
|
20
|
+
Requires-Dist: httpx<1,>=0.27
|
|
21
|
+
Requires-Dist: jsonschema<5,>=4.23
|
|
22
|
+
Requires-Dist: psycopg[binary,pool]<4,>=3.2
|
|
23
|
+
Requires-Dist: pydantic<3,>=2.9
|
|
24
|
+
Requires-Dist: pyjwt<3,>=2.10
|
|
25
|
+
Requires-Dist: pymysql<2,>=1.1
|
|
26
|
+
Requires-Dist: pyyaml<7,>=6.0
|
|
27
|
+
Requires-Dist: sqlalchemy<2.1,>=2.0
|
|
28
|
+
Requires-Dist: strands-agents[openai]<1.65,>=1.64
|
|
29
|
+
Requires-Dist: uvicorn[standard]<1,>=0.30
|
|
30
|
+
Provides-Extra: all
|
|
31
|
+
Requires-Dist: docker<8,>=7; extra == 'all'
|
|
32
|
+
Requires-Dist: langfuse<4.16,>=4.15.6; extra == 'all'
|
|
33
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http<2,>=1.38; extra == 'all'
|
|
34
|
+
Provides-Extra: langfuse
|
|
35
|
+
Requires-Dist: langfuse<4.16,>=4.15.6; extra == 'langfuse'
|
|
36
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http<2,>=1.38; extra == 'langfuse'
|
|
37
|
+
Provides-Extra: sandbox-docker
|
|
38
|
+
Requires-Dist: docker<8,>=7; extra == 'sandbox-docker'
|
|
39
|
+
Description-Content-Type: text/markdown
|
|
40
|
+
|
|
41
|
+
# MeldFabric
|
|
42
|
+
|
|
43
|
+
MeldFabric 是一个基于 Strands Agents 的配置驱动 Agent 服务库。它把 Agent、模型、工具、会话记忆、编排和发布端点统一到一个 FastAPI 服务与可视化管理后台中。
|
|
44
|
+
|
|
45
|
+
## 安装
|
|
46
|
+
|
|
47
|
+
主包已包含 Strands、FastAPI、管理后台、MCP、A2A,以及 SQLite、MySQL、PostgreSQL 支持:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install meldfabric
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
可选能力:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pip install "meldfabric[langfuse]"
|
|
57
|
+
pip install "meldfabric[sandbox-docker]"
|
|
58
|
+
pip install "meldfabric[all]"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## 五分钟启动
|
|
62
|
+
|
|
63
|
+
创建 `app.py`:
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
from typing import Annotated
|
|
67
|
+
|
|
68
|
+
from pydantic import Field
|
|
69
|
+
|
|
70
|
+
from meldfabric import AgentKit, register
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
@register.tool(id="orders.status", description="查询订单状态")
|
|
74
|
+
def order_status(
|
|
75
|
+
order_id: Annotated[str, Field(description="订单编号")],
|
|
76
|
+
) -> dict[str, str]:
|
|
77
|
+
return {"order_id": order_id, "status": "paid"}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
kit = AgentKit()
|
|
81
|
+
kit.run()
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
启动服务:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
export MELDFABRIC_ADMIN_KEY='replace-with-a-strong-key'
|
|
88
|
+
python app.py
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
打开:
|
|
92
|
+
|
|
93
|
+
- 管理后台:`http://127.0.0.1:8000/admin`
|
|
94
|
+
- OpenAPI:`http://127.0.0.1:8000/docs`
|
|
95
|
+
- 运行诊断:`http://127.0.0.1:8000/ready`
|
|
96
|
+
|
|
97
|
+
如果没有传入控制数据库,MeldFabric 会创建 `.meldfabric/control.db`。如果首次启动也没有提供管理员 Key,服务会随机生成一个并在初始化日志中显示一次。
|
|
98
|
+
|
|
99
|
+
进入后台后,按以下顺序完成首个端点:
|
|
100
|
+
|
|
101
|
+
1. 在“模型”中创建服务商、发现并注册模型;
|
|
102
|
+
2. 在“工具”中确认代码工具已经出现;
|
|
103
|
+
3. 创建 Agent,选择模型并挂载工具;
|
|
104
|
+
4. 创建发布端点并生成访问 Key;
|
|
105
|
+
5. 保存并应用最新配置,然后在“端点测试”中对话。
|
|
106
|
+
|
|
107
|
+
## 调用 AG-UI
|
|
108
|
+
|
|
109
|
+
使用发布端点生成的访问 Key,而不是管理员 Key:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
curl -N -sS -X POST 'http://127.0.0.1:8000/api/ag-ui' \
|
|
113
|
+
-H 'Authorization: Bearer <agent-api-key>' \
|
|
114
|
+
-H 'Content-Type: application/json' \
|
|
115
|
+
-H 'Accept: text/event-stream' \
|
|
116
|
+
-H 'X-User-ID: user-001' \
|
|
117
|
+
-d '{
|
|
118
|
+
"threadId": "conversation-001",
|
|
119
|
+
"runId": "run-001",
|
|
120
|
+
"messages": [
|
|
121
|
+
{"id": "message-001", "role": "user", "content": "查询订单 A-100"}
|
|
122
|
+
]
|
|
123
|
+
}'
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
正常响应包含 `RUN_STARTED`、文本或工具事件,以及 `RUN_FINISHED`。
|
|
127
|
+
|
|
128
|
+
## 代码注册
|
|
129
|
+
|
|
130
|
+
MeldFabric 使用统一的 `register` 入口:
|
|
131
|
+
|
|
132
|
+
- `@register.tool`:工具;
|
|
133
|
+
- `@register.plugin`:插件;
|
|
134
|
+
- `@register.hook` / `@register.hook_group`:生命周期 Hook;
|
|
135
|
+
- `@register.intervention` / `@register.intervention_group`:执行干预;
|
|
136
|
+
- `@register.graph_condition`:Graph 条件。
|
|
137
|
+
|
|
138
|
+
装饰器只有在 Python 导入并执行其所在模块后才会注册。请在创建 `AgentKit` 前导入能力模块;不需要配置扫描目录或 `tool_modules`。
|
|
139
|
+
|
|
140
|
+
所有参数和返回值都必须有受支持的类型注解,并能生成合法 JSON Schema。可以使用 `Annotated[T, Field(description="...")]` 描述参数。生产代码建议显式设置稳定的 `id`;修改自动生成 ID 所依赖的模块路径或函数名,会被视为删除旧注册项并新增一项。
|
|
141
|
+
|
|
142
|
+
插件、Hook 和 Intervention 的完整签名及双模式示例可在管理后台“开发指南”中查看。
|
|
143
|
+
|
|
144
|
+
## 控制数据库与密钥
|
|
145
|
+
|
|
146
|
+
可以显式指定独立的控制数据库:
|
|
147
|
+
|
|
148
|
+
```python
|
|
149
|
+
kit = AgentKit(
|
|
150
|
+
"postgresql://user:password@database.example.com/meldfabric",
|
|
151
|
+
admin_key_env="MELDFABRIC_ADMIN_KEY",
|
|
152
|
+
)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
控制数据库保存系统配置、配置快照、加密凭据、访问 Key 哈希和运行协调数据。Agent 的会话、长期记忆等业务数据使用后台创建的数据库资源,两者相互独立。
|
|
156
|
+
|
|
157
|
+
出站凭据由工作空间密钥加密。默认密钥文件位于 `.meldfabric/keys/<workspace_id>.key`;备份或迁移控制数据库时也必须安全迁移该文件。
|
|
158
|
+
|
|
159
|
+
配置“保存”只创建新的配置版本;点击“应用配置”后,新任务才使用它,正在执行的任务继续使用启动时的配置。
|
|
160
|
+
|
|
161
|
+
## 本地开发
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
uv sync --dev
|
|
165
|
+
npm --prefix web ci
|
|
166
|
+
npm --prefix web run build
|
|
167
|
+
uv run pre-commit install
|
|
168
|
+
uv run pre-commit run --all-files
|
|
169
|
+
uv run pytest
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
构建 wheel 和 sdist:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
bash scripts/build-package.sh
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
脚本会先构建 Vue 管理后台,再执行 Python 打包。不要直接用 `uv build` 代替完整构建。
|
|
179
|
+
|
|
180
|
+
## 发布
|
|
181
|
+
|
|
182
|
+
每次 push 和 pull request 都会运行质量流水线。发布流水线从受保护分支手动触发:
|
|
183
|
+
|
|
184
|
+
- `dev` 发布 beta;
|
|
185
|
+
- `main` 发布正式版本。
|
|
186
|
+
|
|
187
|
+
提交信息遵循 Conventional Commits。`update:` 触发 minor,`feat:`、`fix:`、`perf:` 触发 patch;其余允许的类型不单独提升版本。发布流水线生成版本、构建前端与 Python 发行包,并将同一份产物上传到 PyPI 和 GitHub Release。
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# MeldFabric
|
|
2
|
+
|
|
3
|
+
MeldFabric 是一个基于 Strands Agents 的配置驱动 Agent 服务库。它把 Agent、模型、工具、会话记忆、编排和发布端点统一到一个 FastAPI 服务与可视化管理后台中。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
主包已包含 Strands、FastAPI、管理后台、MCP、A2A,以及 SQLite、MySQL、PostgreSQL 支持:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install meldfabric
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
可选能力:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install "meldfabric[langfuse]"
|
|
17
|
+
pip install "meldfabric[sandbox-docker]"
|
|
18
|
+
pip install "meldfabric[all]"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 五分钟启动
|
|
22
|
+
|
|
23
|
+
创建 `app.py`:
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
from typing import Annotated
|
|
27
|
+
|
|
28
|
+
from pydantic import Field
|
|
29
|
+
|
|
30
|
+
from meldfabric import AgentKit, register
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@register.tool(id="orders.status", description="查询订单状态")
|
|
34
|
+
def order_status(
|
|
35
|
+
order_id: Annotated[str, Field(description="订单编号")],
|
|
36
|
+
) -> dict[str, str]:
|
|
37
|
+
return {"order_id": order_id, "status": "paid"}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
kit = AgentKit()
|
|
41
|
+
kit.run()
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
启动服务:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
export MELDFABRIC_ADMIN_KEY='replace-with-a-strong-key'
|
|
48
|
+
python app.py
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
打开:
|
|
52
|
+
|
|
53
|
+
- 管理后台:`http://127.0.0.1:8000/admin`
|
|
54
|
+
- OpenAPI:`http://127.0.0.1:8000/docs`
|
|
55
|
+
- 运行诊断:`http://127.0.0.1:8000/ready`
|
|
56
|
+
|
|
57
|
+
如果没有传入控制数据库,MeldFabric 会创建 `.meldfabric/control.db`。如果首次启动也没有提供管理员 Key,服务会随机生成一个并在初始化日志中显示一次。
|
|
58
|
+
|
|
59
|
+
进入后台后,按以下顺序完成首个端点:
|
|
60
|
+
|
|
61
|
+
1. 在“模型”中创建服务商、发现并注册模型;
|
|
62
|
+
2. 在“工具”中确认代码工具已经出现;
|
|
63
|
+
3. 创建 Agent,选择模型并挂载工具;
|
|
64
|
+
4. 创建发布端点并生成访问 Key;
|
|
65
|
+
5. 保存并应用最新配置,然后在“端点测试”中对话。
|
|
66
|
+
|
|
67
|
+
## 调用 AG-UI
|
|
68
|
+
|
|
69
|
+
使用发布端点生成的访问 Key,而不是管理员 Key:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
curl -N -sS -X POST 'http://127.0.0.1:8000/api/ag-ui' \
|
|
73
|
+
-H 'Authorization: Bearer <agent-api-key>' \
|
|
74
|
+
-H 'Content-Type: application/json' \
|
|
75
|
+
-H 'Accept: text/event-stream' \
|
|
76
|
+
-H 'X-User-ID: user-001' \
|
|
77
|
+
-d '{
|
|
78
|
+
"threadId": "conversation-001",
|
|
79
|
+
"runId": "run-001",
|
|
80
|
+
"messages": [
|
|
81
|
+
{"id": "message-001", "role": "user", "content": "查询订单 A-100"}
|
|
82
|
+
]
|
|
83
|
+
}'
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
正常响应包含 `RUN_STARTED`、文本或工具事件,以及 `RUN_FINISHED`。
|
|
87
|
+
|
|
88
|
+
## 代码注册
|
|
89
|
+
|
|
90
|
+
MeldFabric 使用统一的 `register` 入口:
|
|
91
|
+
|
|
92
|
+
- `@register.tool`:工具;
|
|
93
|
+
- `@register.plugin`:插件;
|
|
94
|
+
- `@register.hook` / `@register.hook_group`:生命周期 Hook;
|
|
95
|
+
- `@register.intervention` / `@register.intervention_group`:执行干预;
|
|
96
|
+
- `@register.graph_condition`:Graph 条件。
|
|
97
|
+
|
|
98
|
+
装饰器只有在 Python 导入并执行其所在模块后才会注册。请在创建 `AgentKit` 前导入能力模块;不需要配置扫描目录或 `tool_modules`。
|
|
99
|
+
|
|
100
|
+
所有参数和返回值都必须有受支持的类型注解,并能生成合法 JSON Schema。可以使用 `Annotated[T, Field(description="...")]` 描述参数。生产代码建议显式设置稳定的 `id`;修改自动生成 ID 所依赖的模块路径或函数名,会被视为删除旧注册项并新增一项。
|
|
101
|
+
|
|
102
|
+
插件、Hook 和 Intervention 的完整签名及双模式示例可在管理后台“开发指南”中查看。
|
|
103
|
+
|
|
104
|
+
## 控制数据库与密钥
|
|
105
|
+
|
|
106
|
+
可以显式指定独立的控制数据库:
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
kit = AgentKit(
|
|
110
|
+
"postgresql://user:password@database.example.com/meldfabric",
|
|
111
|
+
admin_key_env="MELDFABRIC_ADMIN_KEY",
|
|
112
|
+
)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
控制数据库保存系统配置、配置快照、加密凭据、访问 Key 哈希和运行协调数据。Agent 的会话、长期记忆等业务数据使用后台创建的数据库资源,两者相互独立。
|
|
116
|
+
|
|
117
|
+
出站凭据由工作空间密钥加密。默认密钥文件位于 `.meldfabric/keys/<workspace_id>.key`;备份或迁移控制数据库时也必须安全迁移该文件。
|
|
118
|
+
|
|
119
|
+
配置“保存”只创建新的配置版本;点击“应用配置”后,新任务才使用它,正在执行的任务继续使用启动时的配置。
|
|
120
|
+
|
|
121
|
+
## 本地开发
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
uv sync --dev
|
|
125
|
+
npm --prefix web ci
|
|
126
|
+
npm --prefix web run build
|
|
127
|
+
uv run pre-commit install
|
|
128
|
+
uv run pre-commit run --all-files
|
|
129
|
+
uv run pytest
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
构建 wheel 和 sdist:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
bash scripts/build-package.sh
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
脚本会先构建 Vue 管理后台,再执行 Python 打包。不要直接用 `uv build` 代替完整构建。
|
|
139
|
+
|
|
140
|
+
## 发布
|
|
141
|
+
|
|
142
|
+
每次 push 和 pull request 都会运行质量流水线。发布流水线从受保护分支手动触发:
|
|
143
|
+
|
|
144
|
+
- `dev` 发布 beta;
|
|
145
|
+
- `main` 发布正式版本。
|
|
146
|
+
|
|
147
|
+
提交信息遵循 Conventional Commits。`update:` 触发 minor,`feat:`、`fix:`、`perf:` 触发 patch;其余允许的类型不单独提升版本。发布流水线生成版本、构建前端与 Python 发行包,并将同一份产物上传到 PyPI 和 GitHub Release。
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[mypy]
|
|
2
|
+
python_version = 3.11
|
|
3
|
+
files = src/meldfabric
|
|
4
|
+
exclude = ^src/meldfabric/management/static/
|
|
5
|
+
check_untyped_defs = True
|
|
6
|
+
no_implicit_optional = True
|
|
7
|
+
show_error_codes = True
|
|
8
|
+
show_error_context = True
|
|
9
|
+
warn_redundant_casts = True
|
|
10
|
+
warn_unused_configs = True
|
|
11
|
+
warn_unused_ignores = True
|