@yejiming/dsh-data-agent 0.0.12 → 0.1.0

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.
Files changed (60) hide show
  1. package/README.en.md +97 -16
  2. package/README.md +97 -16
  3. package/conformance/dsh-ecosystem/baseline.json +59 -0
  4. package/conformance/dsh-ecosystem/dependencies.json +41 -0
  5. package/conformance/dsh-ecosystem/fixtures/host-degraded.fixture.json +12 -0
  6. package/conformance/dsh-ecosystem/fixtures/host-eligible.fixture.json +13 -0
  7. package/conformance/dsh-ecosystem/fixtures/host-rejected.fixture.json +12 -0
  8. package/conformance/dsh-ecosystem/fixtures/profiles/native-only/package.json +8 -0
  9. package/conformance/dsh-ecosystem/fixtures/profiles/native-plus-adapter/package.json +9 -0
  10. package/conformance/dsh-ecosystem/inventory.json +100 -0
  11. package/conformance/dsh-ecosystem/restrictions.json +20 -0
  12. package/cordis.patch.yml +6 -3
  13. package/dsh-plugin.json +72 -0
  14. package/lib/catalog-DEJqOXRo.js +1944 -0
  15. package/lib/catalog-identity-CVftmvQL.js +96 -0
  16. package/lib/client.js +3465 -138
  17. package/lib/client.js.map +1 -1
  18. package/lib/command-CzzSPmag.js +1719 -0
  19. package/lib/command.js +2 -2
  20. package/lib/{connections-5sfdEDsG.js → connections-CFXOZTHZ.js} +964 -68
  21. package/lib/ecosystem.js +19 -0
  22. package/lib/index.js +392 -34
  23. package/lib/routes.js +260 -8
  24. package/lib/{tool-DgL0fBfj.js → tool-DNkywSph.js} +367 -168
  25. package/lib/tool.js +1 -1
  26. package/lib/types/catalog-adapters.d.ts +52 -0
  27. package/lib/types/catalog-ai.d.ts +49 -0
  28. package/lib/types/catalog-command.d.ts +28 -0
  29. package/lib/types/catalog-identity.d.ts +23 -0
  30. package/lib/types/catalog-storage.d.ts +265 -0
  31. package/lib/types/catalog-tools.d.ts +5 -0
  32. package/lib/types/catalog-tui.d.ts +18 -0
  33. package/lib/types/catalog-types.d.ts +1376 -0
  34. package/lib/types/catalog.d.ts +59 -0
  35. package/lib/types/client/CatalogPanel.d.ts +15 -0
  36. package/lib/types/client/DataAgentWorkbench.d.ts +1 -2
  37. package/lib/types/client/QueryResultTable.d.ts +13 -0
  38. package/lib/types/client/catalog-client.d.ts +57 -0
  39. package/lib/types/client/locales.d.ts +290 -0
  40. package/lib/types/client/persistence.d.ts +3 -1
  41. package/lib/types/client/query-export.d.ts +11 -0
  42. package/lib/types/client-discovery.d.ts +3 -4
  43. package/lib/types/clients.d.ts +14 -8
  44. package/lib/types/command.d.ts +16 -5
  45. package/lib/types/connections.d.ts +42 -4
  46. package/lib/types/database-types.d.ts +23 -0
  47. package/lib/types/defaults.d.ts +26 -0
  48. package/lib/types/ecosystem.d.ts +13 -0
  49. package/lib/types/index.d.ts +58 -15
  50. package/lib/types/query.d.ts +13 -11
  51. package/lib/types/sql.d.ts +9 -1
  52. package/lib/types/storage.d.ts +11 -1
  53. package/lib/types/structured-read.d.ts +2 -2
  54. package/lib/types/structured.d.ts +1 -1
  55. package/lib/types/tool.d.ts +5 -5
  56. package/lib/types/tui-connection-form.d.ts +21 -12
  57. package/package.json +30 -4
  58. package/preset/data-agent/agent.cordis.yml +13 -2
  59. package/lib/command-DuCpwVbl.js +0 -875
  60. package/lib/defaults-DP4RyRh1.js +0 -21
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "dsh-data-agent-native-only-fixture",
3
+ "private": true,
4
+ "fixture": true,
5
+ "dependencies": {
6
+ "@yejiming/dsh-data-agent": "file:../../../../.."
7
+ }
8
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "dsh-data-agent-native-plus-adapter-fixture",
3
+ "private": true,
4
+ "fixture": true,
5
+ "dependencies": {
6
+ "@dsh-std/adapter-dsh": "0.1.0-rc3",
7
+ "@yejiming/dsh-data-agent": "file:../../../../.."
8
+ }
9
+ }
@@ -0,0 +1,100 @@
1
+ {
2
+ "inventoryVersion": "1",
3
+ "packageName": "@yejiming/dsh-data-agent",
4
+ "nativeRuntime": {
5
+ "bundleRows": [
6
+ "@yejiming/dsh-data-agent",
7
+ "@yejiming/dsh-data-agent/routes"
8
+ ],
9
+ "presetRows": [
10
+ "@deepseek-ai/dsh-persona",
11
+ "@deepseek-ai/dsh-tool-str-replace-editor"
12
+ ],
13
+ "commands": ["catalog", "database"],
14
+ "tools": [
15
+ "render-analysis",
16
+ "catalog-get",
17
+ "catalog-search",
18
+ "metric-get",
19
+ "sql-cmd",
20
+ "sql-query",
21
+ "sql-write",
22
+ "str_replace_editor"
23
+ ],
24
+ "services": [
25
+ "dataAgentCatalog",
26
+ "dataAgentCatalogReview",
27
+ "dataAgentCatalogScanner",
28
+ "dataAgentConnections"
29
+ ],
30
+ "routes": [
31
+ "GET describe",
32
+ "GET catalog/assets/:assetId",
33
+ "GET catalog/diff",
34
+ "GET catalog/runs",
35
+ "GET catalog/search",
36
+ "GET catalog/semantics/:semanticId",
37
+ "GET catalog/sources",
38
+ "GET catalog/status",
39
+ "GET schemas",
40
+ "GET status",
41
+ "GET tables",
42
+ "POST connect",
43
+ "POST catalog/cancel",
44
+ "POST catalog/scan",
45
+ "POST catalog/semantics",
46
+ "POST catalog/semantics/:semanticId/dismiss",
47
+ "POST catalog/semantics/:semanticId/retire",
48
+ "POST catalog/semantics/:semanticId/verify",
49
+ "POST disconnect",
50
+ "POST query"
51
+ ],
52
+ "webSlots": [
53
+ "conversation.input.right",
54
+ "tool.call.toolview"
55
+ ],
56
+ "storageDomains": ["data_agent_catalog@1", "data_agent_connections@1"],
57
+ "surfaces": ["desktop", "headless", "tui", "web"],
58
+ "databaseTypes": [
59
+ "clickhouse",
60
+ "doris",
61
+ "hive",
62
+ "impala",
63
+ "mysql",
64
+ "oracle",
65
+ "postgres",
66
+ "sqlite",
67
+ "sqlserver"
68
+ ],
69
+ "publicExports": [
70
+ ".",
71
+ "./client",
72
+ "./command",
73
+ "./cordis.patch.yml",
74
+ "./invariant",
75
+ "./package.json",
76
+ "./routes",
77
+ "./src/*",
78
+ "./tool"
79
+ ],
80
+ "packageFiles": [
81
+ "cordis.patch.yml",
82
+ "lib/**",
83
+ "preset/**"
84
+ ]
85
+ },
86
+ "abilities": [
87
+ { "id": "command:catalog", "disposition": "declared", "manifestReference": "io.github.omdsh-dev.dsh-data-agent.catalog" },
88
+ { "id": "command:database", "disposition": "declared", "manifestReference": "io.github.omdsh-dev.dsh-data-agent.database" },
89
+ { "id": "tools:model", "disposition": "upstream-gap", "restrictionId": "tool-extension-not-in-tui-profile" },
90
+ { "id": "preset:data-agent", "disposition": "upstream-gap", "restrictionId": "agent-preset-not-in-tui-profile" },
91
+ { "id": "service:dataAgentConnections", "disposition": "upstream-gap", "restrictionId": "cordis-service-not-in-tui-profile" },
92
+ { "id": "routes:data-agent", "disposition": "restriction", "restrictionId": "http-routes-native-only" },
93
+ { "id": "ui:web-slots", "disposition": "restriction", "restrictionId": "web-slots-native-only" },
94
+ { "id": "storage:data_agent_connections", "disposition": "restriction", "restrictionId": "storage-domain-native-only" },
95
+ { "id": "storage:data_agent_catalog", "disposition": "restriction", "restrictionId": "storage-domain-native-only" },
96
+ { "id": "credentials:resolve", "disposition": "restriction", "restrictionId": "credential-resolution-native-only" },
97
+ { "id": "subprocess:database-clients", "disposition": "restriction", "restrictionId": "database-execution-native-only" },
98
+ { "id": "presentation:local-tty", "disposition": "restriction", "restrictionId": "legacy-local-tty" }
99
+ ]
100
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "restrictionVersion": "1",
3
+ "claimCeilingWithoutRealHost": "Parsed",
4
+ "items": [
5
+ { "id": "tool-extension-not-in-tui-profile", "kind": "upstream-gap", "requirementId": "DECL-CLOSURE-001", "summary": "The pinned TUI profile does not import the complete model Tool/Preset declaration used by the native data-agent scope." },
6
+ { "id": "agent-preset-not-in-tui-profile", "kind": "upstream-gap", "requirementId": "DECL-CLOSURE-001", "summary": "Agent preset standing-scope composition remains a native DSH contract." },
7
+ { "id": "cordis-service-not-in-tui-profile", "kind": "upstream-gap", "requirementId": "DECL-CLOSURE-001", "summary": "The dataAgentConnections and Catalog Cordis service faces have no admitted Community v0.15 service definition." },
8
+ { "id": "http-routes-native-only", "kind": "restriction", "requirementId": "NATIVE-NO-REGRESSION-001", "summary": "HTTP routes remain owned by the native Web bundle row." },
9
+ { "id": "web-slots-native-only", "kind": "restriction", "requirementId": "NATIVE-NO-REGRESSION-001", "summary": "Web slots remain owned by the native browser client." },
10
+ { "id": "storage-domain-native-only", "kind": "restriction", "requirementId": "DECL-CLOSURE-001", "summary": "The durable data_agent_connections and data_agent_catalog domains remain owned by native Cordis storage-domain." },
11
+ { "id": "credential-resolution-native-only", "kind": "restriction", "requirementId": "TRUST-001", "summary": "Credential references resolve only inside the existing native runtime and are excluded from evidence." },
12
+ { "id": "database-execution-native-only", "kind": "restriction", "requirementId": "DEPENDENCY-CLOSURE-001", "summary": "Database execution remains native and depends on packaged or external database clients." },
13
+ { "id": "legacy-local-tty", "kind": "restriction", "requirementId": "PRESENTATION-001", "summary": "The masked local TTY form is preserved but is not standard Presentation evidence." },
14
+ { "id": "user-interaction-negotiation-spec-gap", "kind": "upstream-gap", "requirementId": "PRESENTATION-001", "summary": "UserInteraction is intentionally not declared: Community v0.15 contract rows cannot carry the requirement spec required by the pinned dsh-std protocol definition, and declaring it prevents actual adapter activation." },
15
+ { "id": "no-standard-effect-ownership", "kind": "restriction", "requirementId": "LIFECYCLE-001", "summary": "Native Cordis effects are implementation evidence, not standard activation-owned ledger effects." },
16
+ { "id": "real-host-descriptor-unavailable", "kind": "restriction", "requirementId": "CLAIM-CEILING-001", "summary": "Repository Host Descriptors are fixtures and cannot establish real-host compatibility." },
17
+ { "id": "remote-presentation-unverified", "kind": "restriction", "requirementId": "PRESENTATION-001", "summary": "Local, remote, attach/detach, and multiple-Presentation parity has not been observed on a real Host." },
18
+ { "id": "external-attestation-unavailable", "kind": "restriction", "requirementId": "CLAIM-CEILING-001", "summary": "No external signer or governance attestation is present." }
19
+ ]
20
+ }
package/cordis.patch.yml CHANGED
@@ -1,8 +1,11 @@
1
1
  # The dsh-data-agent bundle patch: activates the plugin as a profile layer.
2
2
  #
3
- # Two host rows: `data-agent` provides the connection store, installs the
4
- # selectable agent preset, and statically preloads that preset's scoped tools
5
- # and command through the profile bundle path; `data-agent-routes` mounts the
3
+ # Two host rows: `data-agent` provides connection and versioned Catalog stores,
4
+ # installs the selectable agent preset, and statically preloads that preset's
5
+ # scoped tools on every surface and gates the human commands plus optional
6
+ # public status/scene presentation on the actual `dsh-tui` Cordis plugin
7
+ # runtime (independent of profile name);
8
+ # `data-agent-routes` mounts the
6
9
  # HTTP routes and only activates where the webserver exists (web profiles).
7
10
  # The browser half (lib/client.js) ships in the same package and loads under
8
11
  # the data-agent id through the `dsh.client` declaration in package.json.
@@ -0,0 +1,72 @@
1
+ {
2
+ "$schema": "https://dsh.community/schemas/dsh-plugin-0.15.json",
3
+ "manifestVersion": "0.15",
4
+ "id": "io.github.omdsh-dev.dsh-data-agent",
5
+ "name": "DSH Data Agent",
6
+ "version": "0.1.0",
7
+ "facets": {
8
+ "host": {
9
+ "entry": "lib/ecosystem.js",
10
+ "apiVersion": "v1alpha1"
11
+ }
12
+ },
13
+ "requires": {
14
+ "contracts": [
15
+ {
16
+ "apiVersion": "commands.dsh/v1alpha1",
17
+ "kind": "Command"
18
+ },
19
+ {
20
+ "apiVersion": "storage.dsh/v1alpha1",
21
+ "kind": "LocalStorage",
22
+ "optional": true,
23
+ "fallback": "use the native Cordis storage-domain, or process-local state when native persistence is disabled"
24
+ }
25
+ ],
26
+ "services": []
27
+ },
28
+ "permissions": [
29
+ {
30
+ "name": "commands.invoke",
31
+ "scope": "io.github.omdsh-dev.dsh-data-agent",
32
+ "reason": "invoke the declared database and human-controlled Catalog commands when the dsh-tui runtime is loaded"
33
+ }
34
+ ],
35
+ "contributes": {
36
+ "commands": [
37
+ {
38
+ "id": "io.github.omdsh-dev.dsh-data-agent.database",
39
+ "title": "Database",
40
+ "description": "Manage the native data-agent database connection when the dsh-tui runtime is loaded"
41
+ },
42
+ {
43
+ "id": "io.github.omdsh-dev.dsh-data-agent.catalog",
44
+ "title": "Data Catalog",
45
+ "description": "Scan system metadata, follow persistent progress, and browse versioned Catalog results when the dsh-tui runtime is loaded"
46
+ }
47
+ ],
48
+ "panels": []
49
+ },
50
+ "subscriptions": [],
51
+ "license": "MIT",
52
+ "source": {
53
+ "repository": "https://github.com/omdsh-dev/dsh-data-agent"
54
+ },
55
+ "overrides": [
56
+ {
57
+ "target": "package.json#dsh.bundle",
58
+ "kind": "native",
59
+ "description": "The existing Cordis bundle remains the sole functional runtime"
60
+ },
61
+ {
62
+ "target": "lib/client.js",
63
+ "kind": "build",
64
+ "description": "The Web client is a generated browser closure-factory artifact"
65
+ },
66
+ {
67
+ "target": "database-clients",
68
+ "kind": "native",
69
+ "description": "Database execution may require external CLI clients; ClickHouse uses its packaged HTTP client"
70
+ }
71
+ ]
72
+ }