@foggy-projects/deepseek-harness-plugin 0.4.0-beta.10
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.
- package/LICENSE +201 -0
- package/README.md +81 -0
- package/THIRD-PARTY-RUNTIME-NOTICES.md +16 -0
- package/cordis.patch.yml +6 -0
- package/docs/PUBLIC-BETA-READINESS.md +57 -0
- package/docs/WINDOWS-BETA-ACCEPTANCE.md +75 -0
- package/experience/linux/README.md +53 -0
- package/experience/linux/prepare.sh +188 -0
- package/lib/atomic-json.js +41 -0
- package/lib/client.js +453 -0
- package/lib/index.js +467 -0
- package/lib/python-runtime.js +339 -0
- package/lib/remote-descriptor.js +30 -0
- package/lib/remote.js +8 -0
- package/lib/skill-provider.js +111 -0
- package/lib/typert.js +9 -0
- package/lib/version.js +20 -0
- package/package.json +63 -0
- package/skills/foggy-deepseek-onboarding/SKILL.md +137 -0
- package/skills/foggy-deepseek-onboarding/assets/connection.schema.json +50 -0
- package/skills/foggy-deepseek-onboarding/assets/datasource.example.json +13 -0
- package/skills/foggy-deepseek-onboarding/assets/env.example +14 -0
- package/skills/foggy-deepseek-onboarding/assets/onboarding-state.schema.json +42 -0
- package/skills/foggy-deepseek-onboarding/assets/semantic-plan.example.json +8 -0
- package/skills/foggy-deepseek-onboarding/assets/semantic-plan.schema.json +21 -0
- package/skills/foggy-deepseek-onboarding/assets/versions.json +137 -0
- package/skills/foggy-deepseek-onboarding/references/onboarding-workflow.md +156 -0
- package/skills/foggy-deepseek-onboarding/scripts/doctor.ps1 +4 -0
- package/skills/foggy-deepseek-onboarding/scripts/doctor.sh +4 -0
- package/skills/foggy-deepseek-onboarding/scripts/install.ps1 +4 -0
- package/skills/foggy-deepseek-onboarding/scripts/install.sh +4 -0
- package/skills/foggy-deepseek-onboarding/scripts/invoke-onboarding.ps1 +30 -0
- package/skills/foggy-deepseek-onboarding/scripts/invoke-onboarding.sh +24 -0
- package/skills/foggy-deepseek-onboarding/scripts/onboard.ps1 +4 -0
- package/skills/foggy-deepseek-onboarding/scripts/onboard.sh +4 -0
- package/skills/foggy-deepseek-onboarding/scripts/onboarding.py +3027 -0
- package/skills/foggy-deepseek-onboarding/scripts/runtime-start.ps1 +4 -0
- package/skills/foggy-deepseek-onboarding/scripts/runtime-start.sh +4 -0
- package/skills/foggy-deepseek-onboarding/scripts/runtime-stop.ps1 +4 -0
- package/skills/foggy-deepseek-onboarding/scripts/runtime-stop.sh +4 -0
- package/skills/foggy-deepseek-onboarding/scripts/uninstall.ps1 +4 -0
- package/skills/foggy-deepseek-onboarding/scripts/uninstall.sh +4 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: foggy-deepseek-onboarding
|
|
3
|
+
description: Install and operate a pinned Foggy CLI-first dev/test environment from DeepSeek Harness, including opaque datasource profiles, resumable verification, and schema discovery before semantic authoring. Use for initial Foggy setup or local Runtime onboarding; do not use for production deployment or MCP configuration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Foggy DeepSeek onboarding
|
|
7
|
+
|
|
8
|
+
Set up Foggy through shell and `foggy-runtime` CLI. Do not configure Foggy MCP for this local workflow.
|
|
9
|
+
|
|
10
|
+
## Native registry and installed-state gate
|
|
11
|
+
|
|
12
|
+
This Skill is registered by the Foggy plugin through DeepSeek Harness's native Skill registry. Its
|
|
13
|
+
resource base is the authoritative location for these scripts and references; do not search for or
|
|
14
|
+
copy this Skill into the current workspace.
|
|
15
|
+
|
|
16
|
+
- Resolve the global install state from the platform default component directory: on Linux use
|
|
17
|
+
`${XDG_DATA_HOME:-$HOME/.local/share}/foggy/deepseek-harness/install-state.json`; on Windows use
|
|
18
|
+
`%LOCALAPPDATA%\Foggy\DeepSeekHarness\install-state.json`.
|
|
19
|
+
- Confirm the installation with this Skill's `doctor` wrapper and pass the current DSH session
|
|
20
|
+
workspace as `--project-root`. The absence of `foggy-runtime` from `PATH` is not evidence that the
|
|
21
|
+
managed CLI is missing; the plugin intentionally installs it in an isolated environment and records
|
|
22
|
+
its absolute command in the global install state.
|
|
23
|
+
- The plugin downloads and verifies a pinned private Python runtime before running this Skill. Do not
|
|
24
|
+
search for, install, or repair a system Python. Wrappers resolve the interpreter recorded in the
|
|
25
|
+
global install state. If private Python is missing, use the plugin's Python repair action. Only use
|
|
26
|
+
`FOGGY_PYTHON` or `FOGGY_ONBOARDING_PYTHON` when the user explicitly supplied an advanced override.
|
|
27
|
+
- Do not independently download or reinstall the CLI. If the global install state, managed marker, or
|
|
28
|
+
analysis Skill is missing or invalid, ask the user to open the Foggy plugin settings and use
|
|
29
|
+
the matching component repair action. Repair restores managed components and invalidates the
|
|
30
|
+
native DSH Skill catalog. Reinstall or upgrade the plugin itself to restore this bundled Skill.
|
|
31
|
+
- Treat the current DSH session workspace as the authoritative `projectRoot` for the whole onboarding
|
|
32
|
+
run. Do not redirect semantic drafts or contracts to a different repository merely because another
|
|
33
|
+
Skill or example was found there. Place non-secret contracts below
|
|
34
|
+
`<projectRoot>/.foggy/onboarding-contracts/<profile>/`, drafts below
|
|
35
|
+
`<projectRoot>/.foggy/onboarding-drafts/<profile>/`, and published files below the approved
|
|
36
|
+
project-relative `modelsDir`.
|
|
37
|
+
|
|
38
|
+
## Mandatory orchestration boundary
|
|
39
|
+
|
|
40
|
+
For every new-database onboarding session, this Skill is the orchestration authority until
|
|
41
|
+
`onboard-status` reports `next.status=completed`:
|
|
42
|
+
|
|
43
|
+
- Invoke datasource, schema, semantic, bundle, and query operations only through this Skill's
|
|
44
|
+
`scripts/onboard.ps1` or `scripts/onboard.sh`. Do not call `foggy-runtime` directly for those
|
|
45
|
+
operations, even if another loaded Skill documents equivalent CLI commands.
|
|
46
|
+
- Use `foggy-ai-analysis` only to author TM/QM draft content. Its general direct-CLI workflow does not
|
|
47
|
+
supersede this Skill's state machine, approval gates, names, paths, query limit, or evidence rules.
|
|
48
|
+
- Use the exact profile, datasource, namespace, bundle, model names, paths, fields, and query limit
|
|
49
|
+
supplied or confirmed by the user. Do not replace them with examples or inferred alternatives.
|
|
50
|
+
- Do not use raw SQL to sample business rows during onboarding. `schema-discover` is the metadata gate;
|
|
51
|
+
any later SQL probe requires separate explicit approval and must be bounded and read-only.
|
|
52
|
+
- Never use `--replace`, `--replace-bundle`, `--prune`, `--watch`, or `--execute` unless that exact
|
|
53
|
+
mutation was explicitly approved. Approval for adding a new resource is not approval to replace one.
|
|
54
|
+
- Save each wrapper result as the single JSON object returned on stdout when the user requests evidence.
|
|
55
|
+
Do not claim completion when required evidence is missing or the persisted status is incomplete.
|
|
56
|
+
- Never read query-execution evidence back into the conversation. Report only validation state,
|
|
57
|
+
execution state, row count, and evidence path; do not report row values or generated SQL containing
|
|
58
|
+
business literals.
|
|
59
|
+
- Prefer one composite command per approval boundary. Do not inspect this Skill's Python implementation
|
|
60
|
+
or the CLI package source during a normal run; use the documented command contract and inspect code
|
|
61
|
+
only after a structured wrapper error requires troubleshooting.
|
|
62
|
+
|
|
63
|
+
## Boundaries
|
|
64
|
+
|
|
65
|
+
- Treat the bundled Launcher as local dev/test only. Its expected security mode is
|
|
66
|
+
`none-dev-test-only`; never expose it to a network.
|
|
67
|
+
- Do not print, persist, or request secrets in chat. Use named environment variables or a private env
|
|
68
|
+
file outside the Skill and evidence directories.
|
|
69
|
+
- Do not modify Foggy engine or CLI source. If setup cannot continue without such a change, stop and
|
|
70
|
+
ask the user for explicit authorization.
|
|
71
|
+
- Before downloads, installs, replacement, Runtime start/stop, or removal, state the concrete action
|
|
72
|
+
and obtain any authorization required by the host.
|
|
73
|
+
|
|
74
|
+
## Workflow
|
|
75
|
+
|
|
76
|
+
1. Run `scripts/doctor.ps1 --project-root <current-session-workspace>` on Windows or
|
|
77
|
+
`bash scripts/doctor.sh --project-root <current-session-workspace>` on Linux.
|
|
78
|
+
2. If private Python, the pinned CLI, Launcher, or global managed analysis Skill is missing, use the
|
|
79
|
+
Foggy plugin's matching Repair action. First-time Python bootstrap requires the plugin UI unless
|
|
80
|
+
the user explicitly supplies `FOGGY_ONBOARDING_PYTHON`. Use a matching install script only after
|
|
81
|
+
private Python exists and the plugin UI is unavailable; use `--dry-run` first when paths or
|
|
82
|
+
permissions are uncertain.
|
|
83
|
+
3. Run `runtime-start` and require successful `wait-ready` plus `capabilities`. Record engine,
|
|
84
|
+
Runtime API version, schema version, security mode, URL, namespace, PID, and evidence path. If the
|
|
85
|
+
recorded Runtime is already running, `runtime-start` verifies and reuses it instead of starting a
|
|
86
|
+
second process.
|
|
87
|
+
4. Load `foggy-ai-analysis` from the native DSH Skill registry. Do not require a workspace copy.
|
|
88
|
+
5. For a new business database, read [references/onboarding-workflow.md](references/onboarding-workflow.md)
|
|
89
|
+
and prefer its two composite `onboard-datasource-run` / `onboard-semantic-run` commands. Require the
|
|
90
|
+
trusted operator to create the private CLI profile outside Harness. Unless the operator explicitly
|
|
91
|
+
overrides it, use the persistent profile store reported by the wrapper under the Foggy data root
|
|
92
|
+
(`<dataRoot>/cli-profiles`), never `/tmp`. Accept only the opaque profile
|
|
93
|
+
ID, exact revision, datasource name/type, and namespace; never request JDBC URL, username,
|
|
94
|
+
password, or password environment-variable name in Harness.
|
|
95
|
+
If plugin settings report a legacy temporary profile, use the explicit migration action before
|
|
96
|
+
onboarding. It moves only validated connection metadata and environment-variable references; it
|
|
97
|
+
never copies a password value and leaves a recoverable private backup below the Foggy data root.
|
|
98
|
+
6. After schema discovery, use `foggy-ai-analysis` only to author TM/QM files in the standard project-local
|
|
99
|
+
draft directory. Register, validate, publish, and verify them through this Skill's wrapper using the deterministic commands in
|
|
100
|
+
[references/onboarding-workflow.md](references/onboarding-workflow.md). Do not publish, prune, replace
|
|
101
|
+
a bundle, or execute a business-data query without the matching explicit flag and user approval.
|
|
102
|
+
7. Stop only the Runtime PID recorded by this package. Preserve Runtime data unless the user explicitly
|
|
103
|
+
requests purge.
|
|
104
|
+
|
|
105
|
+
## Command contract
|
|
106
|
+
|
|
107
|
+
All package scripts return one JSON object on stdout. Treat `success=false` or a nonzero exit code as a
|
|
108
|
+
failure. Do not infer readiness from a fixed sleep; require CLI `wait-ready` and `capabilities`.
|
|
109
|
+
|
|
110
|
+
Use this analysis order after setup:
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
datasource test -> bind -> diagnostics
|
|
114
|
+
tables list -> inspect -> optional bounded read-only SQL
|
|
115
|
+
models validate -> bundles add/update -> models refresh -> models describe
|
|
116
|
+
query validate -> query execute -> interpretation
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
In DeepSeek Harness, do not expand the composite onboarding commands back into these individual CLI
|
|
120
|
+
operations. This order documents what the wrapper enforces internally and becomes a direct CLI workflow
|
|
121
|
+
only after onboarding is complete.
|
|
122
|
+
|
|
123
|
+
Composite commands are checkpointed and idempotent: a retry skips completed datasource, validation,
|
|
124
|
+
publication, and verification phases when the approved contract and draft digest are unchanged. Fix a
|
|
125
|
+
query payload in place and rerun the same semantic composite command; do not remove a successfully
|
|
126
|
+
published bundle merely to recover from a later query-validation failure.
|
|
127
|
+
|
|
128
|
+
An already-completed profile may be reused from another DSH workspace when the approved connection
|
|
129
|
+
contract is byte-for-byte equivalent. Run the datasource composite in the new workspace first; it adds
|
|
130
|
+
that workspace as a non-destructive binding and reuses datasource/schema checkpoints. Then pass the
|
|
131
|
+
current workspace explicitly as `--project-root` to the semantic composite. A secondary workspace may
|
|
132
|
+
reuse an identical published semantic digest and run its own bounded verification query, but it cannot
|
|
133
|
+
replace the published semantic layer; changes must be published from the original workspace or a new
|
|
134
|
+
profile.
|
|
135
|
+
|
|
136
|
+
Keep user business data separate from the sales-drop SQLite demo. Prefer a read-only database account,
|
|
137
|
+
opaque CLI profile references, and bounded query limits.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://foggy-projects.dev/schemas/deepseek-harness/connection.schema.json",
|
|
4
|
+
"title": "Foggy DeepSeek Harness connection plan",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "name", "type", "namespace"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": {"const": "foggy-deepseek-connection/v1"},
|
|
10
|
+
"profile": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"},
|
|
11
|
+
"name": {"type": "string", "minLength": 1},
|
|
12
|
+
"type": {"enum": ["sqlite", "mysql", "postgres", "postgresql"]},
|
|
13
|
+
"jdbcUrl": {"type": "string", "minLength": 1},
|
|
14
|
+
"username": {"type": "string"},
|
|
15
|
+
"passwordEnv": {"type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"},
|
|
16
|
+
"opaqueProfileId": {"type": "string", "pattern": "^fop_[a-f0-9]{32}$"},
|
|
17
|
+
"opaqueRevision": {"type": "string", "pattern": "^sha256:[a-f0-9]{64}$"},
|
|
18
|
+
"namespace": {"type": "string", "minLength": 1},
|
|
19
|
+
"schemas": {"type": "array", "items": {"type": "string", "minLength": 1}, "uniqueItems": true},
|
|
20
|
+
"modelsDir": {"type": "string", "minLength": 1, "default": "models"},
|
|
21
|
+
"evidenceDir": {"type": "string", "minLength": 1},
|
|
22
|
+
"readOnlyRecommended": {"type": "boolean", "default": true}
|
|
23
|
+
},
|
|
24
|
+
"oneOf": [
|
|
25
|
+
{
|
|
26
|
+
"required": ["opaqueProfileId", "opaqueRevision"],
|
|
27
|
+
"not": {"anyOf": [
|
|
28
|
+
{"required": ["jdbcUrl"]},
|
|
29
|
+
{"required": ["username"]},
|
|
30
|
+
{"required": ["passwordEnv"]}
|
|
31
|
+
]}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"required": ["jdbcUrl"],
|
|
35
|
+
"not": {"anyOf": [
|
|
36
|
+
{"required": ["opaqueProfileId"]},
|
|
37
|
+
{"required": ["opaqueRevision"]}
|
|
38
|
+
]}
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"allOf": [
|
|
42
|
+
{
|
|
43
|
+
"if": {
|
|
44
|
+
"required": ["jdbcUrl"],
|
|
45
|
+
"properties": {"type": {"not": {"const": "sqlite"}}}
|
|
46
|
+
},
|
|
47
|
+
"then": {"required": ["passwordEnv"]}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "foggy-deepseek-connection/v1",
|
|
3
|
+
"profile": "business",
|
|
4
|
+
"name": "business-db",
|
|
5
|
+
"type": "mysql",
|
|
6
|
+
"opaqueProfileId": "fop_0123456789abcdef0123456789abcdef",
|
|
7
|
+
"opaqueRevision": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
|
|
8
|
+
"namespace": "business",
|
|
9
|
+
"schemas": ["public"],
|
|
10
|
+
"modelsDir": "models",
|
|
11
|
+
"evidenceDir": ".foggy/onboarding-command-evidence/business",
|
|
12
|
+
"readOnlyRecommended": true
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Copy only the variables you need into a private, gitignored env file.
|
|
2
|
+
# Never put provider keys or database passwords in DSH settings, Skill files, or evidence.
|
|
3
|
+
|
|
4
|
+
FOGGY_RUNTIME_API_URL=http://127.0.0.1:18066
|
|
5
|
+
FOGGY_NAMESPACE=default
|
|
6
|
+
|
|
7
|
+
# Optional when Runtime reports securityMode=auth-code.
|
|
8
|
+
# FOGGY_RUNTIME_API_AUTH_CODE=
|
|
9
|
+
|
|
10
|
+
# Optional data-plane authorization value.
|
|
11
|
+
# FOGGY_RUNTIME_AUTHORIZATION=
|
|
12
|
+
|
|
13
|
+
# Example datasource password reference. Use a datasource-specific variable name.
|
|
14
|
+
# FOGGY_DATASOURCE_PASSWORD=
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://foggy-projects.dev/schemas/deepseek-harness/onboarding-state.schema.json",
|
|
4
|
+
"title": "Foggy DeepSeek Harness resumable onboarding state",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "profile", "installRoot", "dataRoot", "projectRoot", "connection", "semantic", "steps", "artifacts"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": {"const": "foggy-deepseek-onboarding-state/v1"},
|
|
10
|
+
"profile": {"type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{0,62}$"},
|
|
11
|
+
"createdAt": {"type": "string", "format": "date-time"},
|
|
12
|
+
"updatedAt": {"type": "string", "format": "date-time"},
|
|
13
|
+
"installRoot": {"type": "string"},
|
|
14
|
+
"dataRoot": {"type": "string"},
|
|
15
|
+
"projectRoot": {"type": "string"},
|
|
16
|
+
"workspaceBindings": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": {"type": "string"},
|
|
19
|
+
"uniqueItems": true
|
|
20
|
+
},
|
|
21
|
+
"workspaceVerifications": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"required": ["projectRoot", "queryModel", "queryPayloadDigest", "verifiedAt"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"projectRoot": {"type": "string"},
|
|
28
|
+
"queryModel": {"type": "string"},
|
|
29
|
+
"queryPayloadDigest": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
|
|
30
|
+
"rowCount": {"type": ["integer", "null"], "minimum": 0},
|
|
31
|
+
"verifiedAt": {"type": "string", "format": "date-time"}
|
|
32
|
+
},
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"runtime": {"type": "object"},
|
|
37
|
+
"connection": {"$ref": "connection.schema.json"},
|
|
38
|
+
"semantic": {"type": "object"},
|
|
39
|
+
"steps": {"type": "object"},
|
|
40
|
+
"artifacts": {"type": "object"}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "foggy-deepseek-semantic-plan/v1",
|
|
3
|
+
"profile": "business",
|
|
4
|
+
"draftDir": ".foggy/onboarding-drafts/business",
|
|
5
|
+
"bundleName": "business-semantic",
|
|
6
|
+
"evidenceDir": ".foggy/onboarding-command-evidence/business",
|
|
7
|
+
"queryModels": ["FactOrderQueryModel"]
|
|
8
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://foggy-projects.dev/schemas/deepseek-harness/semantic-plan.schema.json",
|
|
4
|
+
"title": "Foggy DeepSeek Harness semantic draft plan",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "draftDir", "bundleName", "queryModels"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": {"const": "foggy-deepseek-semantic-plan/v1"},
|
|
10
|
+
"profile": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"},
|
|
11
|
+
"draftDir": {"type": "string", "minLength": 1},
|
|
12
|
+
"bundleName": {"type": "string", "minLength": 1},
|
|
13
|
+
"evidenceDir": {"type": "string", "minLength": 1},
|
|
14
|
+
"queryModels": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"minItems": 1,
|
|
17
|
+
"uniqueItems": true,
|
|
18
|
+
"items": {"type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,127}$"}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "foggy-deepseek-onboarding-versions/v1",
|
|
3
|
+
"packageVersion": "0.4.0-beta.10",
|
|
4
|
+
"validatedAt": "2026-09-04",
|
|
5
|
+
"components": {
|
|
6
|
+
"deepseekHarness": {
|
|
7
|
+
"version": "0.1.2-rc.1",
|
|
8
|
+
"minimumNodeVersion": "22.19.0"
|
|
9
|
+
},
|
|
10
|
+
"python": {
|
|
11
|
+
"version": "3.12.13",
|
|
12
|
+
"distribution": "astral-sh/python-build-standalone",
|
|
13
|
+
"buildRelease": "20260718",
|
|
14
|
+
"license": "Python-2.0 AND MPL-2.0",
|
|
15
|
+
"assets": {
|
|
16
|
+
"win32-x64": {
|
|
17
|
+
"file": "cpython-3.12.13+20260718-x86_64-pc-windows-msvc-install_only_stripped.tar.gz",
|
|
18
|
+
"url": "https://github.com/astral-sh/python-build-standalone/releases/download/20260718/cpython-3.12.13%2B20260718-x86_64-pc-windows-msvc-install_only_stripped.tar.gz",
|
|
19
|
+
"sha256": "0d422a1439ec308e03f47df551bc30f5994727c456e414b026d202bcda9b7c1c",
|
|
20
|
+
"size": 21932298
|
|
21
|
+
},
|
|
22
|
+
"win32-arm64": {
|
|
23
|
+
"file": "cpython-3.12.13+20260718-aarch64-pc-windows-msvc-install_only_stripped.tar.gz",
|
|
24
|
+
"url": "https://github.com/astral-sh/python-build-standalone/releases/download/20260718/cpython-3.12.13%2B20260718-aarch64-pc-windows-msvc-install_only_stripped.tar.gz",
|
|
25
|
+
"sha256": "596808d2592a282c45921a324d5503ef0d4f488d104c1c1f12a1d5e7dea9d463",
|
|
26
|
+
"size": 20652311
|
|
27
|
+
},
|
|
28
|
+
"linux-x64": {
|
|
29
|
+
"file": "cpython-3.12.13+20260718-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz",
|
|
30
|
+
"url": "https://github.com/astral-sh/python-build-standalone/releases/download/20260718/cpython-3.12.13%2B20260718-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz",
|
|
31
|
+
"sha256": "5854aa6ec71cad00334d5065633c210b2e7feb40956767a59a91791cadcf0b79",
|
|
32
|
+
"size": 34199823
|
|
33
|
+
},
|
|
34
|
+
"linux-arm64": {
|
|
35
|
+
"file": "cpython-3.12.13+20260718-aarch64-unknown-linux-gnu-install_only_stripped.tar.gz",
|
|
36
|
+
"url": "https://github.com/astral-sh/python-build-standalone/releases/download/20260718/cpython-3.12.13%2B20260718-aarch64-unknown-linux-gnu-install_only_stripped.tar.gz",
|
|
37
|
+
"sha256": "f226576b91491ffa5739aa85726521e9031f4d87f80627d64ed348ac77cb31e9",
|
|
38
|
+
"size": 29195696
|
|
39
|
+
},
|
|
40
|
+
"darwin-x64": {
|
|
41
|
+
"file": "cpython-3.12.13+20260718-x86_64-apple-darwin-install_only_stripped.tar.gz",
|
|
42
|
+
"url": "https://github.com/astral-sh/python-build-standalone/releases/download/20260718/cpython-3.12.13%2B20260718-x86_64-apple-darwin-install_only_stripped.tar.gz",
|
|
43
|
+
"sha256": "8e6b7e6533bdf746287008edf91102e7bee0a6ca1d24f16c4514237cafd706c5",
|
|
44
|
+
"size": 24685843
|
|
45
|
+
},
|
|
46
|
+
"darwin-arm64": {
|
|
47
|
+
"file": "cpython-3.12.13+20260718-aarch64-apple-darwin-install_only_stripped.tar.gz",
|
|
48
|
+
"url": "https://github.com/astral-sh/python-build-standalone/releases/download/20260718/cpython-3.12.13%2B20260718-aarch64-apple-darwin-install_only_stripped.tar.gz",
|
|
49
|
+
"sha256": "9a1e9e06175c10efd8378b904b07fa21bd791ab3345d7cdffeb4a76c9ff55903",
|
|
50
|
+
"size": 25000146
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"cli": {
|
|
55
|
+
"version": "0.1.23",
|
|
56
|
+
"minimumPythonVersion": "3.11.0",
|
|
57
|
+
"wheel": {
|
|
58
|
+
"file": "foggy_runtime_cli-0.1.23-py3-none-any.whl",
|
|
59
|
+
"url": "https://github.com/foggy-projects/foggy-runtime-cli/releases/download/v0.1.23/foggy_runtime_cli-0.1.23-py3-none-any.whl",
|
|
60
|
+
"sha256": "db428812039e5961db93b5c0dc35b53a21d5c349428e6830c96fbf3218cf8a45"
|
|
61
|
+
},
|
|
62
|
+
"checksums": {
|
|
63
|
+
"file": "SHA256SUMS",
|
|
64
|
+
"url": "https://github.com/foggy-projects/foggy-runtime-cli/releases/download/v0.1.23/SHA256SUMS",
|
|
65
|
+
"sha256": "1494d7f13af18bef321995509058a1ab43b1d0b2e9f9ea08230dd78028090221"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"launcher": {
|
|
69
|
+
"version": "0.1.18",
|
|
70
|
+
"minimumJavaVersion": "17.0.0",
|
|
71
|
+
"runtimeApiContract": "foggy-runtime-api/v1",
|
|
72
|
+
"assets": [
|
|
73
|
+
{
|
|
74
|
+
"file": "foggy-runtime-launcher-0.1.18.jar",
|
|
75
|
+
"url": "https://github.com/foggy-projects/foggy-data-mcp-bridge/releases/download/foggy-runtime-launcher-v0.1.18/foggy-runtime-launcher-0.1.18.jar",
|
|
76
|
+
"sha256": "2953d2fab39208b3fffefed033b34ec6f59da851920b533047a1d0909a1de049"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"file": "start-foggy-runtime.ps1",
|
|
80
|
+
"url": "https://github.com/foggy-projects/foggy-data-mcp-bridge/releases/download/foggy-runtime-launcher-v0.1.18/start-foggy-runtime.ps1",
|
|
81
|
+
"sha256": "b54f2f144cfdc38afcc3e9167d0700248f476c93adb3e9d95431490430f7b549"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"file": "start-foggy-runtime.sh",
|
|
85
|
+
"url": "https://github.com/foggy-projects/foggy-data-mcp-bridge/releases/download/foggy-runtime-launcher-v0.1.18/start-foggy-runtime.sh",
|
|
86
|
+
"sha256": "e801cc340bf0842e29045e5e24798921864114846b0e1aaff30640845c8f37d0"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"file": "README-foggy-runtime-launcher.md",
|
|
90
|
+
"url": "https://github.com/foggy-projects/foggy-data-mcp-bridge/releases/download/foggy-runtime-launcher-v0.1.18/README-foggy-runtime-launcher.md",
|
|
91
|
+
"sha256": "0202546c5221cbb9343cf7367ceb20bff785fd85c2ba77cd0dac5395f6362674"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"file": "runtime-launcher-manifest.json",
|
|
95
|
+
"url": "https://github.com/foggy-projects/foggy-data-mcp-bridge/releases/download/foggy-runtime-launcher-v0.1.18/runtime-launcher-manifest.json",
|
|
96
|
+
"sha256": "0065de9c516471b936927a0b13ed1b9380c484437352b2e589c5171932427326"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"file": "SHA256SUMS",
|
|
100
|
+
"url": "https://github.com/foggy-projects/foggy-data-mcp-bridge/releases/download/foggy-runtime-launcher-v0.1.18/SHA256SUMS",
|
|
101
|
+
"sha256": "26f65a7112c115ccd19c6f80336b4335ab7773d54841376aa81504d1c3fcd21f"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"analysisSkill": {
|
|
106
|
+
"name": "foggy-ai-analysis",
|
|
107
|
+
"version": "0.1.17",
|
|
108
|
+
"minimumCliVersion": "0.1.21",
|
|
109
|
+
"assets": [
|
|
110
|
+
{
|
|
111
|
+
"role": "zip",
|
|
112
|
+
"file": "foggy-ai-analysis-skill-0.1.17.zip",
|
|
113
|
+
"url": "https://github.com/foggy-projects/foggy-ai-analysis/releases/download/v0.1.17/foggy-ai-analysis-skill-0.1.17.zip",
|
|
114
|
+
"sha256": "2c5a10090befc38dd2cf8c3de5121d19c28682ca9c0fe72daf778d315c56c7ff"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"role": "manifest",
|
|
118
|
+
"file": "foggy-ai-analysis-skill-0.1.17-manifest.json",
|
|
119
|
+
"url": "https://github.com/foggy-projects/foggy-ai-analysis/releases/download/v0.1.17/foggy-ai-analysis-skill-0.1.17-manifest.json",
|
|
120
|
+
"sha256": "094b1401ff384f011ef80446dd639d8afb2585aa01d7a7ba49d39cb2968ae8bf"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"role": "checksums",
|
|
124
|
+
"file": "foggy-ai-analysis-skill-0.1.17-SHA256SUMS",
|
|
125
|
+
"url": "https://github.com/foggy-projects/foggy-ai-analysis/releases/download/v0.1.17/foggy-ai-analysis-skill-0.1.17-SHA256SUMS",
|
|
126
|
+
"sha256": "18804088cd7da7af6bbf70d658cb0d6a5a31e765470ed673dfd274f1789db240"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"defaults": {
|
|
132
|
+
"port": 18066,
|
|
133
|
+
"namespace": "default",
|
|
134
|
+
"readinessTimeoutSeconds": 180,
|
|
135
|
+
"securityMode": "none-dev-test-only"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Resumable database onboarding
|
|
2
|
+
|
|
3
|
+
Use the thin `scripts/onboard.ps1` or `scripts/onboard.sh` entrypoint. Every command emits one JSON
|
|
4
|
+
object. Preserve the returned `next` instruction and use `onboard-status` or `onboard-resume` after an
|
|
5
|
+
interruption.
|
|
6
|
+
|
|
7
|
+
The wrapper is mandatory for the entire sequence below. Until `onboard-status` returns
|
|
8
|
+
`next.status=completed`, do not substitute direct `foggy-runtime datasources`, `tables`, `sql`, `models`,
|
|
9
|
+
`bundles`, or `query` calls. A second Skill may help write draft TM/QM files, but must not take over
|
|
10
|
+
orchestration. Do not inspect sample rows to author the semantic layer; use schema metadata plus the
|
|
11
|
+
business definitions confirmed by the user.
|
|
12
|
+
|
|
13
|
+
## Conversation contract
|
|
14
|
+
|
|
15
|
+
Collect these non-secret values before creating a plan:
|
|
16
|
+
|
|
17
|
+
1. an opaque Foggy profile ID and its exact reviewed revision;
|
|
18
|
+
2. datasource name, database type, and namespace from the CLI's public profile summary;
|
|
19
|
+
3. optional schemas, the project-relative semantic model directory, and a project-relative evidence directory.
|
|
20
|
+
|
|
21
|
+
Create the private profile in a trusted operator session outside DeepSeek Harness. Do not ask the user
|
|
22
|
+
to paste a password and do not put a JDBC URL, username, password environment-variable name, or password in the JSON plan, command
|
|
23
|
+
line, logs, or evidence. For non-SQLite databases, ask the user to set the named environment variable
|
|
24
|
+
before Runtime starts so the Java process inherits it. Recommend a read-only database account.
|
|
25
|
+
|
|
26
|
+
Use the current DSH session workspace as `projectRoot`. Store approved non-secret contracts at
|
|
27
|
+
`.foggy/onboarding-contracts/<profile>/`, semantic drafts at `.foggy/onboarding-drafts/<profile>/`, and
|
|
28
|
+
command evidence at `.foggy/onboarding-command-evidence/<profile>/`. Do not split these files across the
|
|
29
|
+
session workspace and a separate example repository. The wrapper rejects a query payload outside the
|
|
30
|
+
recorded project root before any semantic validation or publication mutation occurs.
|
|
31
|
+
|
|
32
|
+
The wrapper defaults `FOGGY_RUNTIME_PROFILE_STORE` to the private persistent directory
|
|
33
|
+
`<dataRoot>/cli-profiles`. An explicit operator-provided value still wins. Do not use `/tmp` for a profile
|
|
34
|
+
that must survive a WSL or Harness restart.
|
|
35
|
+
|
|
36
|
+
If plugin settings detect profiles in the legacy temporary store, use **Move to persistent store**.
|
|
37
|
+
Migration validates the opaque profile schema, rejects embedded passwords and conflicts, writes the
|
|
38
|
+
destination with private permissions, verifies it, and moves the legacy JSON to a recoverable private
|
|
39
|
+
backup below the Foggy data root.
|
|
40
|
+
Do not manually copy or edit opaque profile JSON.
|
|
41
|
+
|
|
42
|
+
Treat every user-supplied identifier and bound as immutable input: profile, datasource, namespace,
|
|
43
|
+
models directory, bundle name, TM/QM name, query fields, and limit. Do not swap in demo names, add
|
|
44
|
+
fields, raise the limit, or introduce replacement flags. If one of these inputs is missing, pause for
|
|
45
|
+
that input rather than inventing it.
|
|
46
|
+
|
|
47
|
+
For composite Harness execution, persist `profile` and `evidenceDir` inside both approved contract
|
|
48
|
+
files. The wrapper derives them from the files and rejects conflicting command-line values. Present the
|
|
49
|
+
normalized contracts to the user before accepting mutation approvals; do not combine contract drafting
|
|
50
|
+
and approval into an unseen one-turn mutation.
|
|
51
|
+
|
|
52
|
+
Write the non-secret input using `assets/connection.schema.json`; `assets/datasource.example.json` is a
|
|
53
|
+
template. Then execute the sequence below.
|
|
54
|
+
|
|
55
|
+
## Deterministic sequence
|
|
56
|
+
|
|
57
|
+
For Harness-driven onboarding, use the two composite commands below. Each writes the numbered JSON
|
|
58
|
+
evidence internally and refuses to cross an unapproved mutation gate:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
onboard-datasource-run --project-root <current-session-workspace> \
|
|
62
|
+
--connection-file <approved-json> \
|
|
63
|
+
--approve-configure --approve-bind --include-indexes
|
|
64
|
+
|
|
65
|
+
# After authoring the registered TM/QM draft from schema metadata:
|
|
66
|
+
onboard-semantic-run --project-root <current-session-workspace> \
|
|
67
|
+
--semantic-plan <approved-json> --query-payload <approved-json> \
|
|
68
|
+
--approve-validate --approve-publish --approve-execute
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Include an approval flag only after the user approves that exact action. Without it, the composite
|
|
72
|
+
command stops after the corresponding dry-run and returns `phaseStatus=awaiting-...-approval`.
|
|
73
|
+
|
|
74
|
+
Both composite commands are resumable. When the approved contract is unchanged, they skip completed
|
|
75
|
+
checkpoints instead of re-adding an existing datasource, revalidating an already published draft, or
|
|
76
|
+
registering the same bundle twice. If query validation fails after publication, correct the project-local
|
|
77
|
+
payload and rerun `onboard-semantic-run`; it resumes at query verification and leaves the active bundle in
|
|
78
|
+
place. A same-name datasource is accepted idempotently only when its public name and database type match
|
|
79
|
+
the approved plan; otherwise replacement still requires explicit approval.
|
|
80
|
+
|
|
81
|
+
When a completed profile already belongs to another workspace, the datasource composite may add the
|
|
82
|
+
current workspace as a binding only if the approved connection contract is identical and the datasource,
|
|
83
|
+
schema, and semantic publication checkpoints are complete. The semantic composite then accepts the same
|
|
84
|
+
published draft digest from the bound workspace and performs a workspace-specific bounded verification
|
|
85
|
+
query. It refuses semantic replacement from the secondary workspace.
|
|
86
|
+
|
|
87
|
+
The granular commands below remain available for manual troubleshooting and resumption. Do not expand
|
|
88
|
+
the composite commands into this list during a normal Harness turn.
|
|
89
|
+
|
|
90
|
+
```text
|
|
91
|
+
onboard-plan --connection-file <json> --profile <profile>
|
|
92
|
+
datasource-configure --profile <profile>
|
|
93
|
+
datasource-configure --profile <profile> --apply
|
|
94
|
+
datasource-verify --profile <profile>
|
|
95
|
+
datasource-verify --profile <profile> --bind
|
|
96
|
+
schema-discover --profile <profile> --include-indexes
|
|
97
|
+
semantic-draft --profile <profile> --semantic-plan <json>
|
|
98
|
+
semantic-validate --profile <profile>
|
|
99
|
+
semantic-validate --profile <profile> --apply
|
|
100
|
+
semantic-publish --profile <profile>
|
|
101
|
+
semantic-publish --profile <profile> --apply
|
|
102
|
+
semantic-verify --profile <profile> --project-root <current-session-workspace> --query-payload <json>
|
|
103
|
+
semantic-verify --profile <profile> --project-root <current-session-workspace> --query-payload <json> --execute
|
|
104
|
+
onboard-status --profile <profile>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The first `datasource-configure` call is a dry run. Explain the concrete datasource mutation and get
|
|
108
|
+
approval before adding `--apply`. `datasource-verify` tests connectivity without binding; explain the
|
|
109
|
+
namespace binding mutation and get approval before adding `--bind`. Add `--replace` only when the user
|
|
110
|
+
explicitly approves replacing an existing datasource definition.
|
|
111
|
+
|
|
112
|
+
Schema discovery is metadata-only and inspects at most 25 tables by default. Use repeated `--schema` or
|
|
113
|
+
`--table` arguments to narrow scope, `--list-only` for inventory only, and raise `--max-tables` only when
|
|
114
|
+
the user needs broader inspection. The resulting evidence remains under the private Runtime data root.
|
|
115
|
+
|
|
116
|
+
## Semantic authoring and publishing
|
|
117
|
+
|
|
118
|
+
After `schemaDiscovered=completed`, review table names, columns, keys, and relationships with the user.
|
|
119
|
+
Use `foggy-ai-analysis` for TM/QM authoring in a separate project-local draft directory. Do not invent
|
|
120
|
+
business definitions, joins, units, enum meanings, or date semantics. Create a plan using
|
|
121
|
+
`assets/semantic-plan.schema.json`; its declared query-model names must exist in the draft `.qm` files.
|
|
122
|
+
|
|
123
|
+
`semantic-draft` records TM/QM hashes. Any later file change invalidates the recorded validation and must
|
|
124
|
+
be registered and validated again. `semantic-validate` is a dry run until `--apply`; applying it may
|
|
125
|
+
replace the Runtime validation catalog, so explain that mutation before approval.
|
|
126
|
+
|
|
127
|
+
`semantic-publish` shows added, updated, unchanged, preserved, and optionally removed files. Applying it:
|
|
128
|
+
|
|
129
|
+
1. backs up every overwritten or pruned project model file;
|
|
130
|
+
2. copies the registered draft;
|
|
131
|
+
3. validates the published directory;
|
|
132
|
+
4. registers the bundle;
|
|
133
|
+
5. refreshes only the declared query models.
|
|
134
|
+
|
|
135
|
+
Use `--prune` only when the user approves removing target-only TM/QM files. Use `--replace-bundle` only
|
|
136
|
+
when the user approves replacing an existing Runtime bundle, and `--watch` only when file watching is
|
|
137
|
+
desired. A failure before refresh restores project files; a refresh failure is reported as a partial
|
|
138
|
+
Runtime publication and must be diagnosed before retrying.
|
|
139
|
+
|
|
140
|
+
For verification, build a project-local query payload only from `models describe` field names. The helper
|
|
141
|
+
requires an integer `limit` from 1 through 100. The first `semantic-verify` call lists/describes models and
|
|
142
|
+
validates the query; only `--execute` reads business data. Full results stay in evidence and the command
|
|
143
|
+
returns only counts and paths.
|
|
144
|
+
|
|
145
|
+
Before the first semantic mutation, the composite command checks that the query payload is inside
|
|
146
|
+
`projectRoot`, has a bounded limit, and targets a query model declared in the approved semantic plan.
|
|
147
|
+
After publication, `semantic-verify` always describes the live model before validation. If a field is
|
|
148
|
+
rejected, update the payload from those described names and rerun the same composite command.
|
|
149
|
+
|
|
150
|
+
Do not open, summarize, or quote `query-execute.json` or the Runtime's generated SQL after execution.
|
|
151
|
+
The conversational result may contain only `queryValidated`, `queryExecuted`, `rowCount`, the model
|
|
152
|
+
name, and the evidence path. A successful direct CLI command is not proof that onboarding completed;
|
|
153
|
+
only the wrapper's persisted state with all steps `completed` is authoritative.
|
|
154
|
+
|
|
155
|
+
Do not bypass a failed step. If a command fails, report its structured error, fix only the relevant input
|
|
156
|
+
or environment, and run `onboard-resume` to continue from the first incomplete step.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
param(
|
|
2
|
+
[Parameter(ValueFromRemainingArguments = $true)]
|
|
3
|
+
[string[]]$OnboardingArgs
|
|
4
|
+
)
|
|
5
|
+
|
|
6
|
+
$pythonCommand = $env:FOGGY_ONBOARDING_PYTHON
|
|
7
|
+
if (-not $pythonCommand) {
|
|
8
|
+
$installRoot = if ($env:FOGGY_INSTALL_ROOT) {
|
|
9
|
+
$env:FOGGY_INSTALL_ROOT
|
|
10
|
+
} elseif ($env:LOCALAPPDATA) {
|
|
11
|
+
Join-Path $env:LOCALAPPDATA 'Foggy\DeepSeekHarness'
|
|
12
|
+
}
|
|
13
|
+
if ($installRoot) {
|
|
14
|
+
$statePath = Join-Path $installRoot 'install-state.json'
|
|
15
|
+
if (Test-Path -LiteralPath $statePath) {
|
|
16
|
+
try {
|
|
17
|
+
$state = Get-Content -Raw -LiteralPath $statePath | ConvertFrom-Json
|
|
18
|
+
$pythonCommand = $state.python.command
|
|
19
|
+
} catch {}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (-not $pythonCommand -or -not (Test-Path -LiteralPath $pythonCommand)) {
|
|
25
|
+
Write-Error 'Foggy private Python is unavailable. Initialize or repair it in DeepSeek Harness plugin settings, or set FOGGY_ONBOARDING_PYTHON explicitly.'
|
|
26
|
+
exit 1
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
& $pythonCommand (Join-Path $PSScriptRoot 'onboarding.py') @OnboardingArgs
|
|
30
|
+
exit $LASTEXITCODE
|