@josephyan/qingflow-cli 1.1.4 → 1.1.6

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 (154) hide show
  1. package/README.md +7 -3
  2. package/docs/local-agent-install.md +57 -6
  3. package/entry_point.py +1 -1
  4. package/npm/bin/qingflow-skills.mjs +5 -0
  5. package/npm/bin/qingflow.mjs +1 -34
  6. package/npm/lib/runtime.mjs +21 -101
  7. package/npm/scripts/postinstall.mjs +1 -10
  8. package/package.json +3 -2
  9. package/pyproject.toml +1 -1
  10. package/skills/qingflow-cli/SKILL.md +58 -44
  11. package/skills/qingflow-cli/manifest.yaml +1 -1
  12. package/skills/qingflow-cli/reference/00-INDEX.md +35 -0
  13. package/skills/qingflow-cli/reference/builder/10-build-single-app.md +38 -0
  14. package/skills/qingflow-cli/reference/builder/20-build-complete-system.md +39 -0
  15. package/skills/qingflow-cli/reference/{QINGFLOW_CLI_SCHEMA_APPLY_FIELD_TYPES_AND_SCENARIOS.md → builder/30-schema-fields.md} +52 -10
  16. package/skills/qingflow-cli/reference/builder/40-layout.md +52 -0
  17. package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_VIEWS_WORKFLOW.md → builder/50-views.md} +39 -15
  18. package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_CHARTS_WORKFLOW.md → builder/60-charts.md} +36 -13
  19. package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_PORTAL_WORKFLOW.md → builder/70-portal.md} +36 -13
  20. package/skills/qingflow-cli/reference/builder/80-buttons-associated-resources.md +41 -0
  21. package/skills/qingflow-cli/reference/builder/90-workflow.md +34 -0
  22. package/skills/qingflow-cli/reference/builder/99-publish-verify.md +46 -0
  23. package/skills/qingflow-cli/reference/builder/README.md +41 -0
  24. package/skills/qingflow-cli/reference/builder/code-integrations/README.md +130 -0
  25. package/skills/qingflow-cli/reference/builder/code-integrations/code-block.md +66 -0
  26. package/skills/qingflow-cli/reference/builder/code-integrations/q-linker.md +77 -0
  27. package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_APP_DELIVERY_WORKFLOW.md → builder/reference/app-delivery-sop.md} +26 -16
  28. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/README.md +293 -0
  29. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/build-complete-system.md +809 -0
  30. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/build-single-app.md +830 -0
  31. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/complete-system-development-guide.md +123 -0
  32. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/create-app.md +182 -0
  33. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/environments.md +63 -0
  34. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/flow-actors-and-permissions.md +142 -0
  35. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/gotchas.md +108 -0
  36. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/match-rules.md +114 -0
  37. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/public-surface-sync.md +75 -0
  38. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/single-app-development-guide.md +58 -0
  39. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/solution-playbooks.md +52 -0
  40. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/tool-selection.md +107 -0
  41. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-flow.md +7 -0
  42. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-layout.md +7 -0
  43. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-schema.md +7 -0
  44. package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-views.md +7 -0
  45. package/skills/qingflow-cli/reference/builder/workflow/01-overview.md +45 -0
  46. package/skills/qingflow-cli/reference/builder/workflow/02-update-mode.md +53 -0
  47. package/skills/qingflow-cli/reference/builder/workflow/03-flow-patterns.md +57 -0
  48. package/skills/qingflow-cli/reference/builder/workflow/04-stage1-business-modeling.md +131 -0
  49. package/skills/qingflow-cli/reference/builder/workflow/05-stage2-members-roles.md +29 -0
  50. package/skills/qingflow-cli/reference/builder/workflow/06-stage3-build-spec.md +165 -0
  51. package/skills/qingflow-cli/reference/builder/workflow/07-stage4-validate-spec.md +33 -0
  52. package/skills/qingflow-cli/reference/builder/workflow/08-stage5-apply-verify.md +51 -0
  53. package/skills/qingflow-cli/reference/builder/workflow/09-stage6-summary.md +88 -0
  54. package/skills/qingflow-cli/reference/builder/workflow/10-node-config-reference.md +93 -0
  55. package/skills/qingflow-cli/reference/builder/workflow/11-troubleshooting.md +15 -0
  56. package/skills/qingflow-cli/reference/builder/workflow/README.md +88 -0
  57. package/skills/qingflow-cli/reference/builder/workflow/workflow-schema.json +1754 -0
  58. package/skills/qingflow-cli/reference/{QINGFLOW_CLI_ADMIN_CHEATSHEET.md → core/QINGFLOW_CLI_ADMIN_CHEATSHEET.md} +3 -3
  59. package/skills/qingflow-cli/reference/{QINGFLOW_CLI_DATA_RETRIEVAL_WORKFLOW.md → core/QINGFLOW_CLI_DATA_RETRIEVAL_WORKFLOW.md} +6 -6
  60. package/skills/qingflow-cli/reference/{QINGFLOW_CLI_EXPLORATION_REPORT.md → core/QINGFLOW_CLI_EXPLORATION_REPORT.md} +2 -2
  61. package/skills/qingflow-cli/reference/{QINGFLOW_CLI_FIELD_DATA_TYPES.md → core/QINGFLOW_CLI_FIELD_DATA_TYPES.md} +11 -11
  62. package/skills/qingflow-cli/reference/{QINGFLOW_CLI_MEMBER_CHEATSHEET.md → core/QINGFLOW_CLI_MEMBER_CHEATSHEET.md} +4 -4
  63. package/skills/qingflow-cli/reference/{QINGFLOW_CLI_ONE_SHOT_CHEATSHEET.md → core/QINGFLOW_CLI_ONE_SHOT_CHEATSHEET.md} +4 -4
  64. package/skills/qingflow-cli/reference/{QINGFLOW_CLI_RECORD_CREATE_WORKFLOW.md → record/QINGFLOW_CLI_RECORD_CREATE_WORKFLOW.md} +3 -3
  65. package/skills/qingflow-cli/reference/record/QINGFLOW_CLI_RECORD_DELETE_WORKFLOW.md +31 -0
  66. package/skills/qingflow-cli/reference/{QINGFLOW_CLI_RECORD_IMPORT_WORKFLOW.md → record/QINGFLOW_CLI_RECORD_IMPORT_WORKFLOW.md} +4 -4
  67. package/skills/qingflow-cli/reference/{QINGFLOW_CLI_RECORD_UPDATE_WORKFLOW.md → record/QINGFLOW_CLI_RECORD_UPDATE_WORKFLOW.md} +7 -7
  68. package/skills/qingflow-cli/reference/record/analysis/README.md +130 -0
  69. package/skills/qingflow-cli/reference/record/analysis/analysis-gotchas.md +91 -0
  70. package/skills/qingflow-cli/reference/record/analysis/analysis-patterns.md +112 -0
  71. package/skills/qingflow-cli/reference/record/analysis/business-context.md +74 -0
  72. package/skills/qingflow-cli/reference/record/analysis/confidence-reporting.md +69 -0
  73. package/skills/qingflow-cli/reference/record/analysis/data-access-playbook.md +106 -0
  74. package/skills/qingflow-cli/reference/record/analysis/pandas-recipes.md +172 -0
  75. package/skills/qingflow-cli/reference/record/analysis/report-format.md +76 -0
  76. package/skills/qingflow-cli/reference/record/insert/README.md +75 -0
  77. package/skills/qingflow-cli/reference/{QINGFLOW_CLI_TASK_CONTEXT_WORKFLOW.md → task/QINGFLOW_CLI_TASK_CONTEXT_WORKFLOW.md} +5 -5
  78. package/skills/qingflow-cli/reference/task/ops/README.md +131 -0
  79. package/skills/qingflow-cli/reference/task/ops/environments.md +43 -0
  80. package/skills/qingflow-cli/reference/task/ops/workflow-usage.md +26 -0
  81. package/skills/qingflow-cli/scripts/validate_system_build_summary.py +124 -0
  82. package/skills/qingflow-cli/scripts/workflow/diff_flow_spec.py +275 -0
  83. package/skills/qingflow-cli/scripts/workflow/validate_flow_spec.py +605 -0
  84. package/skills/qingflow-mcp-setup/SKILL.md +115 -0
  85. package/skills/qingflow-mcp-setup/agents/openai.yaml +4 -0
  86. package/skills/qingflow-mcp-setup/references/claude-desktop.md +34 -0
  87. package/skills/qingflow-mcp-setup/references/environments.md +62 -0
  88. package/skills/qingflow-mcp-setup/references/generic-stdio.md +32 -0
  89. package/skills/qingflow-mcp-setup/scripts/check_local_server.sh +38 -0
  90. package/src/qingflow_mcp/__init__.py +1 -1
  91. package/src/qingflow_mcp/__main__.py +6 -2
  92. package/src/qingflow_mcp/builder_facade/models.py +282 -102
  93. package/src/qingflow_mcp/builder_facade/service.py +4192 -935
  94. package/src/qingflow_mcp/cli/commands/builder.py +316 -298
  95. package/src/qingflow_mcp/cli/commands/chart.py +1 -1
  96. package/src/qingflow_mcp/cli/commands/common.py +12 -3
  97. package/src/qingflow_mcp/cli/commands/exports.py +2 -2
  98. package/src/qingflow_mcp/cli/commands/imports.py +3 -3
  99. package/src/qingflow_mcp/cli/commands/portal.py +2 -2
  100. package/src/qingflow_mcp/cli/commands/record.py +101 -27
  101. package/src/qingflow_mcp/cli/commands/task.py +28 -47
  102. package/src/qingflow_mcp/cli/commands/view.py +1 -1
  103. package/src/qingflow_mcp/cli/context.py +0 -3
  104. package/src/qingflow_mcp/cli/formatters.py +784 -16
  105. package/src/qingflow_mcp/cli/main.py +117 -33
  106. package/src/qingflow_mcp/errors.py +43 -2
  107. package/src/qingflow_mcp/public_surface.py +26 -17
  108. package/src/qingflow_mcp/response_trim.py +81 -17
  109. package/src/qingflow_mcp/server.py +14 -12
  110. package/src/qingflow_mcp/server_app_builder.py +65 -21
  111. package/src/qingflow_mcp/server_app_user.py +22 -16
  112. package/src/qingflow_mcp/session_store.py +11 -7
  113. package/src/qingflow_mcp/solution/compiler/__init__.py +3 -1
  114. package/src/qingflow_mcp/solution/compiler/workflow_compiler.py +173 -0
  115. package/src/qingflow_mcp/solution/executor.py +245 -18
  116. package/src/qingflow_mcp/tools/ai_builder_tools.py +1780 -406
  117. package/src/qingflow_mcp/tools/app_tools.py +184 -43
  118. package/src/qingflow_mcp/tools/approval_tools.py +197 -35
  119. package/src/qingflow_mcp/tools/auth_tools.py +92 -16
  120. package/src/qingflow_mcp/tools/code_block_tools.py +298 -40
  121. package/src/qingflow_mcp/tools/custom_button_tools.py +64 -10
  122. package/src/qingflow_mcp/tools/directory_tools.py +236 -72
  123. package/src/qingflow_mcp/tools/export_tools.py +244 -34
  124. package/src/qingflow_mcp/tools/feedback_tools.py +9 -0
  125. package/src/qingflow_mcp/tools/file_tools.py +9 -3
  126. package/src/qingflow_mcp/tools/import_tools.py +336 -49
  127. package/src/qingflow_mcp/tools/navigation_tools.py +91 -12
  128. package/src/qingflow_mcp/tools/package_tools.py +118 -6
  129. package/src/qingflow_mcp/tools/portal_tools.py +39 -3
  130. package/src/qingflow_mcp/tools/qingbi_report_tools.py +116 -7
  131. package/src/qingflow_mcp/tools/record_tools.py +1141 -356
  132. package/src/qingflow_mcp/tools/resource_read_tools.py +188 -39
  133. package/src/qingflow_mcp/tools/role_tools.py +80 -9
  134. package/src/qingflow_mcp/tools/solution_tools.py +59 -45
  135. package/src/qingflow_mcp/tools/task_context_tools.py +662 -158
  136. package/src/qingflow_mcp/tools/task_tools.py +113 -29
  137. package/src/qingflow_mcp/tools/view_tools.py +106 -3
  138. package/src/qingflow_mcp/tools/workflow_tools.py +48 -4
  139. package/src/qingflow_mcp/tools/workspace_tools.py +71 -3
  140. /package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_MATCH_RULES.md → builder/reference/match-rules.md} +0 -0
  141. /package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_WORKSPACE_ICONS.md → builder/reference/workspace-icons.md} +0 -0
  142. /package/skills/qingflow-cli/reference/{charts_remove.example.json → examples/charts/charts_remove.example.json} +0 -0
  143. /package/skills/qingflow-cli/reference/{charts_reorder.example.json → examples/charts/charts_reorder.example.json} +0 -0
  144. /package/skills/qingflow-cli/reference/{charts_upsert_bar.example.json → examples/charts/charts_upsert_bar.example.json} +0 -0
  145. /package/skills/qingflow-cli/reference/{charts_upsert_dashboard_starter.example.json → examples/charts/charts_upsert_dashboard_starter.example.json} +0 -0
  146. /package/skills/qingflow-cli/reference/{charts_upsert_minimal.example.json → examples/charts/charts_upsert_minimal.example.json} +0 -0
  147. /package/skills/qingflow-cli/reference/{portal_sections_all_types.example.json → examples/portal/portal_sections_all_types.example.json} +0 -0
  148. /package/skills/qingflow-cli/reference/{portal_sections_five_types.example.json → examples/portal/portal_sections_five_types.example.json} +0 -0
  149. /package/skills/qingflow-cli/reference/{portal_sections_standard_workbench.example.json → examples/portal/portal_sections_standard_workbench.example.json} +0 -0
  150. /package/skills/qingflow-cli/reference/{_batch_schema_complex.json → examples/schema/_batch_schema_complex.json} +0 -0
  151. /package/skills/qingflow-cli/reference/{_batch_schema_scalar.json → examples/schema/_batch_schema_scalar.json} +0 -0
  152. /package/skills/qingflow-cli/reference/{schema_add_fields_minimal.example.json → examples/schema/schema_add_fields_minimal.example.json} +0 -0
  153. /package/skills/qingflow-cli/reference/{schema_apply_add_fields_all_types.json → examples/schema/schema_apply_add_fields_all_types.json} +0 -0
  154. /package/skills/qingflow-cli/reference/{views_upsert_table_minimal.example.json → examples/views/views_upsert_table_minimal.example.json} +0 -0
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: qingflow-mcp-setup
3
+ description: Install, connect, authenticate, and troubleshoot the Qingflow MCP server in local AI clients such as Claude Desktop or any stdio-compatible MCP client. Use when the user wants to configure the MCP, verify local startup, log in with token/password, select a workspace, or fix connection/authentication issues.
4
+ metadata:
5
+ short-description: Install and connect the Qingflow MCP locally
6
+ ---
7
+
8
+ # Qingflow MCP Setup
9
+
10
+ > **Skill 版本**:`qingflow-skills-2026.06.24.2`(入口文档版本;如需确认 CLI 包版本,使用 `qingflow --version` 或 `qingflow --json version`)。
11
+
12
+ ## Overview
13
+
14
+ This skill sets up the local Qingflow MCP server, connects it to a local AI client, and verifies authentication and workspace selection. Use it for installation, client configuration, token login, and connection troubleshooting.
15
+
16
+ ## Workflow
17
+
18
+ Follow these steps in order.
19
+
20
+ `feedback_submit` is also available as a cross-cutting helper when setup or MCP capability gaps still block the user after reasonable troubleshooting. It does not require Qingflow login or workspace selection, and should be called only after explicit user confirmation.
21
+
22
+ Before configuration or live calls, identify the target environment explicitly as `test` or `prod`, then read [references/environments.md](references/environments.md). If the user did not specify one, default to `prod`.
23
+
24
+ ### Step 1: Verify the local project path
25
+
26
+ Resolve the repository root first. In this repo, the MCP server should live at:
27
+
28
+ - `<repo_root>/qingflow-support/mcp-server`
29
+
30
+ Key entrypoint:
31
+
32
+ - `<repo_root>/qingflow-support/mcp-server/qingflow-mcp`
33
+
34
+ If the path differs, stop and update all client config snippets before proceeding.
35
+ If the skill is installed under `$CODEX_HOME/skills` instead of the repo-local `.codex/skills`, set `QINGFLOW_MCP_ROOT=<repo_root>/qingflow-support/mcp-server` before running `scripts/check_local_server.sh`.
36
+
37
+ ### Step 2: Install local dependencies
38
+
39
+ Run:
40
+
41
+ ```bash
42
+ cd <repo_root>/qingflow-support/mcp-server
43
+ python3 -m venv .venv
44
+ ./.venv/bin/pip install -e '.[dev]'
45
+ ```
46
+
47
+ Use `scripts/check_local_server.sh` to verify the entrypoint and virtualenv. The script will first try `QINGFLOW_MCP_ROOT`, then the current git repo, then a repo-local `.codex/skills` layout.
48
+
49
+ ### Step 3: Configure the local AI client
50
+
51
+ For any stdio-compatible MCP client, map these values:
52
+
53
+ - `command`: `<repo_root>/qingflow-support/mcp-server/qingflow-mcp`
54
+ - `args`: `[]`
55
+ - `env.QINGFLOW_MCP_DEFAULT_BASE_URL`: the target backend URL for the active environment
56
+ - `env.QINGFLOW_MCP_DEFAULT_QF_VERSION`: set this when the environment must route to a specific version such as `canary`
57
+
58
+ Client-specific snippets:
59
+
60
+ - Claude Desktop: read [references/claude-desktop.md](references/claude-desktop.md)
61
+ - Generic stdio MCP clients: read [references/generic-stdio.md](references/generic-stdio.md)
62
+
63
+ When both test and production are in play, keep separate config snippets or clearly labeled `env` blocks so the user can switch without ambiguity.
64
+
65
+ ### Step 4: Validate startup
66
+
67
+ The server is a stdio MCP process. A direct terminal launch may print nothing and wait for a client. That is normal.
68
+
69
+ Manual startup command:
70
+
71
+ ```bash
72
+ cd <repo_root>/qingflow-support/mcp-server
73
+ ./qingflow-mcp
74
+ ```
75
+
76
+ Prefer validating through the client after config is added.
77
+
78
+ ### Step 5: Use injected session first; authenticate only for setup or recovery
79
+
80
+ For Wingent Momo runtime conversations, the session normally already carries the credential-derived token, workspace, and route context. Do not run `auth_use_credential`, `auth_login`, `workspace_list`, or `workspace_select` before ordinary business tools. Start with the smallest read-only business call that fits the task; if it succeeds, continue.
81
+
82
+ For a standalone local MCP client that has no injected session, use this setup order:
83
+
84
+ 1. `auth_use_credential` or `auth_login`
85
+ 2. `workspace_list`
86
+ 3. `workspace_select`
87
+ 4. Run a small read-only business tool
88
+
89
+ `auth_use_credential` gets the selected workspace from the credential context. If the user needs a different workspace after authentication, use `workspace_list` and then `workspace_select`.
90
+ After auth, prefer one read-only tool call that returns `request_route` so you can confirm the live `base_url` and `qf_version` before proceeding.
91
+ `auth_use_credential` is a tool call, not a custom HTTP header. It exchanges the createClaw credential for a Qingflow token, `wsId`, and when needed `Cookie: qfVersion=...` after the session is established.
92
+ Do not run `workspace_select` on production paths unless the user explicitly asks to switch workspace or a business tool clearly reports that no workspace is selected. If `/user` does not return a version lane, the session now falls back to the workspace `systemVersion`.
93
+
94
+ ### Step 6: Troubleshoot in the right layer
95
+
96
+ - If the client cannot launch the server, check path, execute permission, and `.venv`
97
+ - If tools return `auth required`, re-run `auth_use_credential` or `auth_login`
98
+ - If tools return `workspace not selected`, call `workspace_list` and `workspace_select`
99
+ - If calls fail after a working session, assume token expiry and re-authenticate
100
+ - If the browser shows data but MCP does not, compare `request_route` against the browser environment and check whether `qf_version` should be `canary`
101
+
102
+ ## Guardrails
103
+
104
+ - Never write tokens into the skill files
105
+ - In Wingent Momo runtime, trust injected workspace context until a business tool proves otherwise; for standalone clients, confirm workspace with `auth_whoami`, `workspace_select`, or a successful read-only business call.
106
+ - When debugging, distinguish server startup issues from Qingflow auth issues
107
+ - When the user mentions production, restate the exact `base_url`, `qf_version`, and workspace before any live validation
108
+ - If setup is complete but the current MCP capability is still unsupported or the user's need still cannot be satisfied, summarize the gap, ask whether to submit feedback, and call `feedback_submit` only after explicit user confirmation
109
+
110
+ ## Resources
111
+
112
+ - Environment switching: [references/environments.md](references/environments.md)
113
+ - Claude Desktop config: [references/claude-desktop.md](references/claude-desktop.md)
114
+ - Generic stdio config: [references/generic-stdio.md](references/generic-stdio.md)
115
+ - Local checks: [scripts/check_local_server.sh](scripts/check_local_server.sh)
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Qingflow MCP Setup"
3
+ short_description: "Install and connect the Qingflow MCP locally"
4
+ default_prompt: "Use $qingflow-mcp-setup to install and connect the Qingflow MCP in a local AI client, and to verify the active base_url, qf_version, auth state, and workspace selection."
@@ -0,0 +1,34 @@
1
+ # Claude Desktop
2
+
3
+ Use this when the user wants to install Qingflow MCP in Claude Desktop.
4
+
5
+ ## Config snippet
6
+
7
+ ```json
8
+ {
9
+ "mcpServers": {
10
+ "qingflow": {
11
+ "command": "<ABSOLUTE_PATH_TO_REPO>/qingflow-support/mcp-server/qingflow-mcp",
12
+ "args": [],
13
+ "env": {
14
+ "QINGFLOW_MCP_DEFAULT_BASE_URL": "<QINGFLOW_BASE_URL>"
15
+ }
16
+ }
17
+ }
18
+ }
19
+ ```
20
+
21
+ ## Environment examples
22
+
23
+ - `prod` (default): set `QINGFLOW_MCP_DEFAULT_BASE_URL` to `https://qingflow.com/api`
24
+ - `test`: if needed, set `QINGFLOW_MCP_DEFAULT_BASE_URL` to the explicitly provided non-production backend
25
+
26
+ Keep separate snippets for `test` and `prod` so switching environments does not require editing values in-place under pressure.
27
+
28
+ ## Notes
29
+
30
+ - After updating the config, restart Claude Desktop
31
+ - Replace `<ABSOLUTE_PATH_TO_REPO>` with the real checkout path on the current machine
32
+ - If the server path changes, update the `command` field
33
+ - The server is local stdio MCP, so no remote URL is required
34
+ - Do not store Qingflow credentials in Claude Desktop config; pass the createClaw credential through `auth_use_credential` inside the chat, or use `auth_login` when credential exchange is unavailable
@@ -0,0 +1,62 @@
1
+ # Environment Switching
2
+
3
+ Use this reference before any setup, authentication, or live validation flow.
4
+
5
+ ## Step 1: Resolve the active environment
6
+
7
+ Decide explicitly whether the user is targeting:
8
+
9
+ - `test`: for smoke tests, trial setup, DSL validation, mock data, and integration debugging
10
+ - `prod`: for real business usage in the formal environment
11
+
12
+ If the user did not specify an environment, default to `prod`.
13
+
14
+ ## Test Environment
15
+
16
+ Default characteristics:
17
+
18
+ - preferred for first-time setup and local MCP validation
19
+ - mock or smoke data is acceptable when the user asks for it
20
+ - use read/write verification freely inside the intended test workspace
21
+
22
+ Known values in the current workspace:
23
+
24
+ - use an explicitly provided non-production backend
25
+ - common test workspace example: `ws_id=2`
26
+ - `qf_version`: usually unset unless the user explicitly needs a routed version
27
+
28
+ Setup behavior:
29
+
30
+ - prefer this environment for Claude Desktop or local MCP client onboarding
31
+ - for Wingent Momo runtime, use the injected session and skip auth/workspace preflight
32
+ - for standalone MCP client setup, use `auth_use_credential` or `auth_login`, then `workspace_list`, then `workspace_select`
33
+ - if the user asks to verify installation, a real read-only smoke path is acceptable
34
+
35
+ ## Production Environment
36
+
37
+ Production is the default environment when the user does not specify one. If the user explicitly says `test`, switch to the dedicated non-production backend they provide.
38
+
39
+ Expected behavior:
40
+
41
+ - default `base_url`: `https://qingflow.com/api`
42
+ - confirm the production `qf_version` explicitly when browser traffic depends on routed versions such as `canary`
43
+ - confirm the exact workspace before any live validation
44
+ - prefer read-only checks first
45
+ - avoid mock data, smoke writes, or destructive tests unless the user explicitly asks for them
46
+
47
+ Production guardrails:
48
+
49
+ - do not store credentials in skill files or examples
50
+ - do not assume the same workspace ids as test
51
+ - treat startup verification and auth verification as separate steps
52
+ - when sharing snippets, label them as `prod` and `test` clearly
53
+ - when MCP and browser results diverge, compare `request_route` with the browser route before blaming the query logic
54
+
55
+ ## Reporting Rule
56
+
57
+ When you give setup instructions, always state:
58
+
59
+ - active environment
60
+ - selected `base_url`
61
+ - selected `qf_version` when relevant
62
+ - whether the next step is read-only or write-impacting
@@ -0,0 +1,32 @@
1
+ # Generic Stdio MCP Clients
2
+
3
+ Use this for any local AI client that supports MCP over stdio.
4
+
5
+ ## Required mapping
6
+
7
+ - `command`: `<ABSOLUTE_PATH_TO_REPO>/qingflow-support/mcp-server/qingflow-mcp`
8
+ - `args`: `[]`
9
+ - `env.QINGFLOW_MCP_DEFAULT_BASE_URL`: backend base URL for the active environment
10
+
11
+ Environment examples:
12
+
13
+ - `prod` (default): `https://qingflow.com/api`
14
+ - `test`: use the explicitly provided non-production backend
15
+
16
+ Keep separate client entries or separate config snippets for `test` and `prod`.
17
+
18
+ ## Validation sequence
19
+
20
+ 1. Start the client
21
+ 2. Confirm the `qingflow` MCP server is visible
22
+ 3. In Wingent Momo runtime, skip auth/workspace preflight and run a read-only tool such as `app_list`
23
+ 4. In a standalone client without injected credentials, run `auth_use_credential` or `auth_login`
24
+ 5. Then run `workspace_list`
25
+ 6. Then run `workspace_select`
26
+ 7. Run a read-only tool such as `app_list`
27
+
28
+ ## Common failures
29
+
30
+ - Launch failure: bad `command` path or missing `.venv`
31
+ - Auth failure: invalid or expired credential/token
32
+ - Business tool failure before setup: workspace not selected
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
5
+ ROOT="${QINGFLOW_MCP_ROOT:-}"
6
+
7
+ if [[ -z "$ROOT" ]]; then
8
+ if git_root="$(git rev-parse --show-toplevel 2>/dev/null)" && [[ -d "$git_root/qingflow-support/mcp-server" ]]; then
9
+ ROOT="$git_root/qingflow-support/mcp-server"
10
+ elif [[ -d "$PWD/qingflow-support/mcp-server" ]]; then
11
+ ROOT="$PWD/qingflow-support/mcp-server"
12
+ else
13
+ repo_root="$(cd "$SCRIPT_DIR/../../../.." && pwd)"
14
+ if [[ -d "$repo_root/qingflow-support/mcp-server" ]]; then
15
+ ROOT="$repo_root/qingflow-support/mcp-server"
16
+ fi
17
+ fi
18
+ fi
19
+
20
+ if [[ -z "$ROOT" ]]; then
21
+ echo "Unable to locate qingflow-support/mcp-server. Set QINGFLOW_MCP_ROOT to the repo copy of the MCP server." >&2
22
+ exit 1
23
+ fi
24
+
25
+ ENTRY="$ROOT/qingflow-mcp"
26
+ PY="$ROOT/.venv/bin/python"
27
+
28
+ echo "ROOT=$ROOT"
29
+ test -d "$ROOT"
30
+ echo "OK root exists"
31
+
32
+ test -x "$ENTRY"
33
+ echo "OK entrypoint exists and is executable"
34
+
35
+ test -x "$PY"
36
+ echo "OK virtualenv python exists"
37
+
38
+ PYTHONPATH="$ROOT/src" "$PY" -c "import qingflow_mcp.server; print('OK import qingflow_mcp.server')"
@@ -5,7 +5,7 @@ from pathlib import Path
5
5
 
6
6
  __all__ = ["__version__"]
7
7
 
8
- _FALLBACK_VERSION = "0.2.0b1099"
8
+ _FALLBACK_VERSION = "0.2.0b1017"
9
9
 
10
10
 
11
11
  def _resolve_local_pyproject_version() -> str | None:
@@ -1,5 +1,9 @@
1
- """Entry point for running qingflow_mcp as a module."""
2
- from qingflow_mcp.server import main
1
+ """Entry point for running qingflow_mcp as a module.
2
+
3
+ Default to the curated user-facing MCP surface. Split package and console
4
+ entrypoints can still start the builder server explicitly.
5
+ """
6
+ from qingflow_mcp.server_app_user import main
3
7
 
4
8
  if __name__ == "__main__":
5
9
  main()