@foggy-projects/deepseek-harness-plugin 0.4.0-beta.9 → 0.4.0-rc.2
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/README.md +55 -20
- package/docs/PUBLIC-BETA-READINESS.md +71 -15
- package/docs/RELEASE-CANDIDATE-0.4.0-RC.2.md +38 -0
- package/docs/WINDOWS-BETA-ACCEPTANCE.md +57 -22
- package/experience/linux/prepare.sh +2 -2
- package/lib/client.js +249 -27
- package/lib/diagnostics.js +86 -0
- package/lib/index.js +113 -15
- package/lib/remote-descriptor.js +16 -2
- package/lib/runtime-settings.js +89 -0
- package/lib/skill-provider.js +13 -8
- package/package.json +11 -10
- package/skills/foggy-deepseek-onboarding/SKILL.md +126 -127
- package/skills/foggy-deepseek-onboarding/assets/connection.schema.json +6 -8
- package/skills/foggy-deepseek-onboarding/assets/datasource.example.json +3 -2
- package/skills/foggy-deepseek-onboarding/assets/env.example +4 -4
- package/skills/foggy-deepseek-onboarding/assets/onboarding-state.schema.json +30 -1
- package/skills/foggy-deepseek-onboarding/assets/versions.json +54 -29
- package/skills/foggy-deepseek-onboarding/references/onboarding-workflow.md +134 -122
- package/skills/foggy-deepseek-onboarding/scripts/invoke-onboarding.ps1 +2 -0
- package/skills/foggy-deepseek-onboarding/scripts/onboarding.py +689 -81
|
@@ -1,156 +1,168 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
Use the
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
# Development datasource and semantic-model workflow
|
|
2
|
+
|
|
3
|
+
Use this workflow after the Foggy plugin is initialized. It is designed for local experience and
|
|
4
|
+
model development in DeepSeek Harness, not for production deployment.
|
|
5
|
+
|
|
6
|
+
## Connection input
|
|
7
|
+
|
|
8
|
+
The simplest local connection contract may contain a direct password:
|
|
9
|
+
|
|
10
|
+
```json
|
|
11
|
+
{
|
|
12
|
+
"schemaVersion": "foggy-deepseek-connection/v1",
|
|
13
|
+
"profile": "business",
|
|
14
|
+
"name": "business-db",
|
|
15
|
+
"type": "mysql",
|
|
16
|
+
"jdbcUrl": "jdbc:mysql://127.0.0.1:3306/business",
|
|
17
|
+
"username": "business_dev",
|
|
18
|
+
"password": "local-development-password",
|
|
19
|
+
"namespace": "business",
|
|
20
|
+
"modelsDir": "models",
|
|
21
|
+
"evidenceDir": ".foggy/onboarding-command-evidence/business"
|
|
22
|
+
}
|
|
23
|
+
```
|
|
6
24
|
|
|
7
|
-
The wrapper
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
25
|
+
The wrapper uses the direct password only while submitting the datasource to the public Runtime API.
|
|
26
|
+
It does not copy it into onboarding state, command evidence, TM/QM files, or conversational output.
|
|
27
|
+
The source connection file is user-managed; do not commit it. The local Runtime currently stores a
|
|
28
|
+
direct password in its private datasource registry, so use `passwordRef`-style production credential
|
|
29
|
+
management when moving beyond local development.
|
|
30
|
+
|
|
31
|
+
An environment variable is an optional alternative:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"schemaVersion": "foggy-deepseek-connection/v1",
|
|
36
|
+
"profile": "business",
|
|
37
|
+
"name": "business-db",
|
|
38
|
+
"type": "mysql",
|
|
39
|
+
"jdbcUrl": "jdbc:mysql://127.0.0.1:3306/business",
|
|
40
|
+
"username": "business_dev",
|
|
41
|
+
"passwordEnv": "FOGGY_BUSINESS_DB_PASSWORD",
|
|
42
|
+
"namespace": "business",
|
|
43
|
+
"modelsDir": "models"
|
|
44
|
+
}
|
|
45
|
+
```
|
|
12
46
|
|
|
13
|
-
|
|
47
|
+
Here `passwordEnv` is read by the onboarding wrapper and submitted online to the already-running
|
|
48
|
+
Runtime. Do not restart Runtime merely to make the variable part of the Java process environment.
|
|
49
|
+
Opaque CLI profiles remain supported for users who already prefer them, but are not required for a
|
|
50
|
+
normal DSH experience.
|
|
14
51
|
|
|
15
|
-
|
|
52
|
+
## Normal sequence
|
|
16
53
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
3. optional schemas, the project-relative semantic model directory, and a project-relative evidence directory.
|
|
54
|
+
Run the platform-specific wrapper from this Skill directory. `onboard-datasource-run` performs the
|
|
55
|
+
online datasource setup, namespace binding, and schema discovery against the healthy Runtime:
|
|
20
56
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
57
|
+
```text
|
|
58
|
+
onboard-datasource-run --project-root <current-workspace> \
|
|
59
|
+
--connection-file <connection-json> \
|
|
60
|
+
--approve-configure --approve-bind --include-indexes
|
|
61
|
+
```
|
|
25
62
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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.
|
|
63
|
+
If the user already requested the complete connection experience, include both approval flags in the
|
|
64
|
+
first call. They refer only to adding the named development datasource and binding the requested
|
|
65
|
+
namespace. Do not add `--replace` unless replacement was explicitly requested.
|
|
31
66
|
|
|
32
|
-
The
|
|
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.
|
|
67
|
+
The command performs:
|
|
35
68
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
Do not manually copy or edit opaque profile JSON.
|
|
69
|
+
```text
|
|
70
|
+
datasource add -> datasource test -> namespace bind -> diagnostics
|
|
71
|
+
tables list -> bounded schema inspection
|
|
72
|
+
```
|
|
41
73
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
74
|
+
It does not stop or restart Runtime. Repeated calls reuse completed checkpoints when the public
|
|
75
|
+
connection contract is unchanged. Before reusing a datasource checkpoint, the wrapper verifies that
|
|
76
|
+
the named datasource still exists with the expected public type in the live Runtime. If it was
|
|
77
|
+
removed outside the wrapper, datasource configuration, verification, and schema discovery resume
|
|
78
|
+
automatically from the first affected step. Inline password values are excluded from the comparison.
|
|
79
|
+
Transient connection-pool readiness timeouts are retried a small, bounded number of times; invalid
|
|
80
|
+
credentials, invalid URLs, and other configuration errors fail immediately.
|
|
46
81
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
and
|
|
82
|
+
When the user's request clearly identifies a business subject or likely tables, add `--pattern` or
|
|
83
|
+
one or more `--table` arguments so discovery remains focused. Do not enumerate CLI help, inspect the
|
|
84
|
+
wrapper source, load unrelated examples, or fetch online documentation on the successful normal path.
|
|
85
|
+
Keep full command payloads in the numbered evidence files and use only their concise result fields in
|
|
86
|
+
the conversation.
|
|
51
87
|
|
|
52
|
-
|
|
53
|
-
|
|
88
|
+
After discovery, use `foggy-ai-analysis` to create TM/QM drafts from actual tables, columns, keys,
|
|
89
|
+
small read-only samples when useful, and the user's business questions. Keep the files in the current
|
|
90
|
+
workspace, normally:
|
|
54
91
|
|
|
55
|
-
|
|
92
|
+
```text
|
|
93
|
+
models/
|
|
94
|
+
model/
|
|
95
|
+
<Name>.tm
|
|
96
|
+
query/
|
|
97
|
+
<Name>QueryModel.qm
|
|
98
|
+
```
|
|
56
99
|
|
|
57
|
-
|
|
58
|
-
evidence internally and refuses to cross an unapproved mutation gate:
|
|
100
|
+
Then run the semantic composite:
|
|
59
101
|
|
|
60
102
|
```text
|
|
61
|
-
onboard-
|
|
62
|
-
--
|
|
63
|
-
--
|
|
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> \
|
|
103
|
+
onboard-semantic-run --project-root <current-workspace> \
|
|
104
|
+
--semantic-plan <semantic-json> \
|
|
105
|
+
--query-payload <bounded-query-json> \
|
|
68
106
|
--approve-validate --approve-publish --approve-execute
|
|
69
107
|
```
|
|
70
108
|
|
|
71
|
-
|
|
72
|
-
|
|
109
|
+
For an explicitly requested end-to-end local experience, these flags may be used together. The command
|
|
110
|
+
validates the model files, copies them to the approved model directory when needed, registers or
|
|
111
|
+
updates the local Runtime Bundle, refreshes/describes the declared QueryModels, validates the bounded
|
|
112
|
+
query, and executes it. It never means production publication.
|
|
73
113
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
114
|
+
The composite result keeps `success=true` when the Runtime safely continues with warnings and exposes
|
|
115
|
+
`warningCount`, `warningCodes`, and `warnings` to the Agent. The full Runtime responses remain in
|
|
116
|
+
`query-validate.json` and `query-execute.json`. Read the structured warning facts rather than relying
|
|
117
|
+
on free-text remediation alone: compare `path`, `suggestedNextAction`, `safeToAutoRepair`,
|
|
118
|
+
`normalizedFragment`, `docsRef`, and `details.allowedProperties` with the described
|
|
119
|
+
model, correct and revalidate when an equivalent supported query preserves the user's intent, or
|
|
120
|
+
clearly report the degraded interpretation. The wrapper accepts Runtime 0.1.21
|
|
121
|
+
`queryInputWarnings` and legacy `warnings` as separate warning kinds. In `IGNORE`, ordinary unknown
|
|
122
|
+
properties continue without `queryInputWarnings`; in `STRICT`, the Runtime rejects the query with the
|
|
123
|
+
complete violations. Protected and governance fields remain fail-closed in every mode.
|
|
80
124
|
|
|
81
|
-
|
|
82
|
-
|
|
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.
|
|
125
|
+
Use `--watch` only when the user wants the local Runtime to follow model-file edits. Use `--prune` or
|
|
126
|
+
bundle replacement only when the user clearly asks for those changes.
|
|
86
127
|
|
|
87
|
-
|
|
88
|
-
|
|
128
|
+
## Iteration and troubleshooting
|
|
129
|
+
|
|
130
|
+
The granular commands remain available when a specific stage needs repair:
|
|
89
131
|
|
|
90
132
|
```text
|
|
91
133
|
onboard-plan --connection-file <json> --profile <profile>
|
|
92
|
-
datasource-configure --profile <profile>
|
|
93
|
-
datasource-
|
|
94
|
-
|
|
95
|
-
datasource-verify --profile <profile> --bind
|
|
96
|
-
schema-discover --profile <profile> --include-indexes
|
|
134
|
+
datasource-configure --profile <profile> [--apply]
|
|
135
|
+
datasource-verify --profile <profile> [--bind]
|
|
136
|
+
schema-discover --profile <profile> [--include-indexes]
|
|
97
137
|
semantic-draft --profile <profile> --semantic-plan <json>
|
|
98
|
-
semantic-validate --profile <profile>
|
|
99
|
-
semantic-
|
|
100
|
-
semantic-
|
|
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
|
|
138
|
+
semantic-validate --profile <profile> [--apply]
|
|
139
|
+
semantic-publish --profile <profile> [--apply]
|
|
140
|
+
semantic-verify --profile <profile> --query-payload <json> [--execute]
|
|
104
141
|
onboard-status --profile <profile>
|
|
142
|
+
onboard-resume --profile <profile>
|
|
105
143
|
```
|
|
106
144
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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:
|
|
145
|
+
A standalone `datasource-configure --apply` can resolve `passwordEnv` from its current Agent process.
|
|
146
|
+
For a direct `password`, use the composite datasource command with the original connection file so the
|
|
147
|
+
secret stays ephemeral to that invocation.
|
|
128
148
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
4. registers the bundle;
|
|
133
|
-
5. refreshes only the declared query models.
|
|
149
|
+
When a failure occurs, repair only the failed input and rerun the same composite command. Do not remove
|
|
150
|
+
a successfully registered Bundle merely because later query validation failed. Keep SQL samples small,
|
|
151
|
+
read-only, and relevant to semantic authoring.
|
|
134
152
|
|
|
135
|
-
|
|
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.
|
|
153
|
+
## Git handoff
|
|
139
154
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
155
|
+
When validation and representative questions pass, recommend placing the model directory under the
|
|
156
|
+
user's existing Git repository. Git is the source of truth for model history; Runtime Bundle
|
|
157
|
+
registration only makes a selected local directory active. Do not create commits, remotes, tags, or
|
|
158
|
+
pushes without the user's request.
|
|
144
159
|
|
|
145
|
-
|
|
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.
|
|
160
|
+
## Production handoff
|
|
149
161
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
162
|
+
Stop the local onboarding flow when the user asks to publish or update a formal environment. A separate
|
|
163
|
+
manual or dedicated deployment workflow should collect the exact target, Launcher version, model Git
|
|
164
|
+
commit/tag, namespace, production datasource procedure, access credentials, verification plan, and
|
|
165
|
+
rollback point. It should then install/start Runtime if needed, prepare the target datasource, register
|
|
166
|
+
the versioned model directory, refresh, and run a narrow smoke check.
|
|
154
167
|
|
|
155
|
-
|
|
156
|
-
or environment, and run `onboard-resume` to continue from the first incomplete step.
|
|
168
|
+
Local onboarding credentials and approvals do not authorize production access or publication.
|