@foggy-projects/deepseek-harness-plugin 0.4.0-beta.13 → 0.4.0-beta.15

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": "foggy-deepseek-onboarding-versions/v1",
3
- "packageVersion": "0.4.0-beta.13",
3
+ "packageVersion": "0.4.0-beta.15",
4
4
  "validatedAt": "2026-09-04",
5
5
  "components": {
6
6
  "deepseekHarness": {
@@ -129,7 +129,7 @@
129
129
  }
130
130
  },
131
131
  "defaults": {
132
- "port": 18066,
132
+ "port": 18166,
133
133
  "namespace": "default",
134
134
  "readinessTimeoutSeconds": 180,
135
135
  "securityMode": "none-dev-test-only"
@@ -1,156 +1,146 @@
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.
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
+ ```
12
24
 
13
- ## Conversation contract
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
+ ```
14
46
 
15
- Collect these non-secret values before creating a plan:
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.
16
51
 
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.
52
+ ## Normal sequence
20
53
 
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.
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:
25
56
 
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.
57
+ ```text
58
+ onboard-datasource-run --project-root <current-workspace> \
59
+ --connection-file <connection-json> \
60
+ --approve-configure --approve-bind --include-indexes
61
+ ```
31
62
 
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.
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.
35
66
 
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.
67
+ The command performs:
41
68
 
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.
69
+ ```text
70
+ datasource add -> datasource test -> namespace bind -> diagnostics
71
+ tables list -> bounded schema inspection
72
+ ```
46
73
 
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.
74
+ It does not stop or restart Runtime. Repeated calls reuse completed checkpoints when the public
75
+ connection contract is unchanged. Inline password values are excluded from the comparison.
51
76
 
52
- Write the non-secret input using `assets/connection.schema.json`; `assets/datasource.example.json` is a
53
- template. Then execute the sequence below.
77
+ After discovery, use `foggy-ai-analysis` to create TM/QM drafts from actual tables, columns, keys,
78
+ small read-only samples when useful, and the user's business questions. Keep the files in the current
79
+ workspace, normally:
54
80
 
55
- ## Deterministic sequence
81
+ ```text
82
+ models/
83
+ model/
84
+ <Name>.tm
85
+ query/
86
+ <Name>QueryModel.qm
87
+ ```
56
88
 
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:
89
+ Then run the semantic composite:
59
90
 
60
91
  ```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> \
92
+ onboard-semantic-run --project-root <current-workspace> \
93
+ --semantic-plan <semantic-json> \
94
+ --query-payload <bounded-query-json> \
68
95
  --approve-validate --approve-publish --approve-execute
69
96
  ```
70
97
 
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`.
98
+ For an explicitly requested end-to-end local experience, these flags may be used together. The command
99
+ validates the model files, copies them to the approved model directory when needed, registers or
100
+ updates the local Runtime Bundle, refreshes/describes the declared QueryModels, validates the bounded
101
+ query, and executes it. It never means production publication.
73
102
 
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.
103
+ Use `--watch` only when the user wants the local Runtime to follow model-file edits. Use `--prune` or
104
+ bundle replacement only when the user clearly asks for those changes.
80
105
 
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.
106
+ ## Iteration and troubleshooting
86
107
 
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.
108
+ The granular commands remain available when a specific stage needs repair:
89
109
 
90
110
  ```text
91
111
  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
112
+ datasource-configure --profile <profile> [--apply]
113
+ datasource-verify --profile <profile> [--bind]
114
+ schema-discover --profile <profile> [--include-indexes]
97
115
  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
116
+ semantic-validate --profile <profile> [--apply]
117
+ semantic-publish --profile <profile> [--apply]
118
+ semantic-verify --profile <profile> --query-payload <json> [--execute]
104
119
  onboard-status --profile <profile>
120
+ onboard-resume --profile <profile>
105
121
  ```
106
122
 
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:
123
+ A standalone `datasource-configure --apply` can resolve `passwordEnv` from its current Agent process.
124
+ For a direct `password`, use the composite datasource command with the original connection file so the
125
+ secret stays ephemeral to that invocation.
128
126
 
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.
127
+ When a failure occurs, repair only the failed input and rerun the same composite command. Do not remove
128
+ a successfully registered Bundle merely because later query validation failed. Keep SQL samples small,
129
+ read-only, and relevant to semantic authoring.
134
130
 
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.
131
+ ## Git handoff
139
132
 
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.
133
+ When validation and representative questions pass, recommend placing the model directory under the
134
+ user's existing Git repository. Git is the source of truth for model history; Runtime Bundle
135
+ registration only makes a selected local directory active. Do not create commits, remotes, tags, or
136
+ pushes without the user's request.
144
137
 
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.
138
+ ## Production handoff
149
139
 
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.
140
+ Stop the local onboarding flow when the user asks to publish or update a formal environment. A separate
141
+ manual or dedicated deployment workflow should collect the exact target, Launcher version, model Git
142
+ commit/tag, namespace, production datasource procedure, access credentials, verification plan, and
143
+ rollback point. It should then install/start Runtime if needed, prepare the target datasource, register
144
+ the versioned model directory, refresh, and run a narrow smoke check.
154
145
 
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.
146
+ Local onboarding credentials and approvals do not authorize production access or publication.