@springbrand/cli 0.1.7-alpha.1 → 0.1.7-alpha.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.
Files changed (98) hide show
  1. package/README.md +25 -12
  2. package/dist/commands/auth.d.ts.map +1 -1
  3. package/dist/commands/auth.js +156 -40
  4. package/dist/commands/auth.js.map +1 -1
  5. package/dist/commands/connect.d.ts +2 -0
  6. package/dist/commands/connect.d.ts.map +1 -1
  7. package/dist/commands/connect.js +36 -22
  8. package/dist/commands/connect.js.map +1 -1
  9. package/dist/commands/doctor.js +2 -2
  10. package/dist/commands/doctor.js.map +1 -1
  11. package/dist/lib/auth.d.ts +23 -12
  12. package/dist/lib/auth.d.ts.map +1 -1
  13. package/dist/lib/auth.js +243 -55
  14. package/dist/lib/auth.js.map +1 -1
  15. package/dist/lib/codex-plugin.d.ts +8 -0
  16. package/dist/lib/codex-plugin.d.ts.map +1 -1
  17. package/dist/lib/codex-plugin.js +191 -21
  18. package/dist/lib/codex-plugin.js.map +1 -1
  19. package/dist/lib/connect-all-uninstall.d.ts +2 -2
  20. package/dist/lib/connect-all-uninstall.d.ts.map +1 -1
  21. package/dist/lib/connect-all-uninstall.js +69 -31
  22. package/dist/lib/connect-all-uninstall.js.map +1 -1
  23. package/dist/lib/connect-all.d.ts +4 -0
  24. package/dist/lib/connect-all.d.ts.map +1 -1
  25. package/dist/lib/connect-all.js +12 -9
  26. package/dist/lib/connect-all.js.map +1 -1
  27. package/dist/lib/connect-auth.d.ts +4 -2
  28. package/dist/lib/connect-auth.d.ts.map +1 -1
  29. package/dist/lib/connect-auth.js +14 -9
  30. package/dist/lib/connect-auth.js.map +1 -1
  31. package/dist/lib/connect-clients.d.ts +1 -1
  32. package/dist/lib/connect-clients.d.ts.map +1 -1
  33. package/dist/lib/connect-clients.js +23 -14
  34. package/dist/lib/connect-clients.js.map +1 -1
  35. package/dist/lib/connect-fallback.d.ts.map +1 -1
  36. package/dist/lib/connect-fallback.js +13 -4
  37. package/dist/lib/connect-fallback.js.map +1 -1
  38. package/dist/lib/connect-generic.d.ts +12 -0
  39. package/dist/lib/connect-generic.d.ts.map +1 -0
  40. package/dist/lib/connect-generic.js +80 -0
  41. package/dist/lib/connect-generic.js.map +1 -0
  42. package/dist/lib/connect-preflight.d.ts +1 -0
  43. package/dist/lib/connect-preflight.d.ts.map +1 -1
  44. package/dist/lib/connect-preflight.js +31 -19
  45. package/dist/lib/connect-preflight.js.map +1 -1
  46. package/dist/lib/connect-result.d.ts +1 -1
  47. package/dist/lib/constants.d.ts +2 -0
  48. package/dist/lib/constants.d.ts.map +1 -1
  49. package/dist/lib/constants.js +4 -1
  50. package/dist/lib/constants.js.map +1 -1
  51. package/dist/lib/cursor-config.d.ts +2 -2
  52. package/dist/lib/cursor-config.d.ts.map +1 -1
  53. package/dist/lib/cursor-config.js +5 -5
  54. package/dist/lib/cursor-config.js.map +1 -1
  55. package/dist/lib/devin-config.d.ts +9 -0
  56. package/dist/lib/devin-config.d.ts.map +1 -0
  57. package/dist/lib/devin-config.js +32 -0
  58. package/dist/lib/devin-config.js.map +1 -0
  59. package/dist/lib/doctor-checks.d.ts +1 -1
  60. package/dist/lib/doctor-checks.d.ts.map +1 -1
  61. package/dist/lib/doctor-checks.js +7 -4
  62. package/dist/lib/doctor-checks.js.map +1 -1
  63. package/dist/lib/doctor-report.d.ts +2 -2
  64. package/dist/lib/install-report.d.ts +1 -1
  65. package/dist/lib/key-environment.d.ts +14 -0
  66. package/dist/lib/key-environment.d.ts.map +1 -0
  67. package/dist/lib/key-environment.js +8 -0
  68. package/dist/lib/key-environment.js.map +1 -0
  69. package/dist/lib/mcp-endpoint.d.ts +4 -1
  70. package/dist/lib/mcp-endpoint.d.ts.map +1 -1
  71. package/dist/lib/mcp-endpoint.js +5 -0
  72. package/dist/lib/mcp-endpoint.js.map +1 -1
  73. package/dist/lib/mcp-json-config.d.ts +2 -0
  74. package/dist/lib/mcp-json-config.d.ts.map +1 -1
  75. package/dist/lib/mcp-json-config.js +10 -4
  76. package/dist/lib/mcp-json-config.js.map +1 -1
  77. package/dist/lib/omp-config.d.ts +2 -2
  78. package/dist/lib/omp-config.d.ts.map +1 -1
  79. package/dist/lib/omp-config.js +5 -5
  80. package/dist/lib/omp-config.js.map +1 -1
  81. package/dist/lib/pi-config.d.ts +2 -2
  82. package/dist/lib/pi-config.d.ts.map +1 -1
  83. package/dist/lib/pi-config.js +5 -5
  84. package/dist/lib/pi-config.js.map +1 -1
  85. package/dist/lib/registration-detect.js +5 -5
  86. package/dist/lib/registration-detect.js.map +1 -1
  87. package/dist/lib/workbuddy-config.d.ts +1 -1
  88. package/dist/lib/workbuddy-config.d.ts.map +1 -1
  89. package/dist/lib/workbuddy-config.js +5 -5
  90. package/dist/lib/workbuddy-config.js.map +1 -1
  91. package/package.json +1 -1
  92. package/skill/springbrand-action-api/SKILL.md +20 -7
  93. package/skill/springbrand-action-api/references/action-discovery.md +20 -4
  94. package/skill/springbrand-connector/SKILL.md +3 -2
  95. package/skill/springbrand-gtm/SKILL.md +38 -5
  96. package/skill/springbrand-platform/SKILL.md +4 -2
  97. package/skill/springbrand-platform/references/plugin-discovery.md +5 -4
  98. package/skill/use-springbrand/SKILL.md +127 -18
@@ -1,26 +1,127 @@
1
1
  ---
2
2
  name: use-springbrand
3
- description: Use SpringBrand through the configured MCP server when the user needs a Platform operation, an Action API, or a connected third-party service. Discover the operation with search_tools, then use its current schema and the appropriate Domain Skill.
3
+ description: Use SpringBrand through the configured MCP server for Agent creation and runs, Platform operations, Action APIs, or connected third-party services. Agent and crawler requests use build_agent directly; other operations use search_tools and their current schema.
4
4
  ---
5
5
 
6
6
  # SpringBrand MCP
7
7
 
8
- Use the configured MCP server named `springbrand` for SpringBrand work. The
9
- CLI owns installation, endpoint configuration, and API-key authentication. Do
10
- not ask the user to copy credentials into a prompt or configure a second MCP
11
- server.
8
+ {{SPRINGBRAND_SERVER_GUIDANCE}}
9
+
10
+ ## Build and run an Agent
11
+
12
+ The development Agent demo adds three direct tools alongside the five general
13
+ Meta Tools. Use this workflow when the user wants to create, build or set up
14
+ a SpringBrand Agent, a crawler or data collection Agent, or a repeatable or
15
+ recurring collection job such as "collect these topics every day".
16
+ These three tools are not returned by `search_tools`; call them directly
17
+ when the connected server exposes them.
18
+ Do not replace an Agent request with a one-off Action or search for Agent
19
+ creation as a business operation.
20
+
21
+ | Tool | Use |
22
+ | --- | --- |
23
+ | `build_agent` | List sites supported by current SpringBrand Actions, then create a crawler Agent. No run or Credit spend. |
24
+ | `run_agent` | Open a Chat with the created Agent and send the concrete task as its first message. Starting a run costs Credits. |
25
+ | `get_agent_result` | Block for up to 10 minutes for the final answer or current status. Read-only; no Credit spend. |
26
+
27
+ 1. Call `build_agent` with `step: "list_sites"` to discover supported sites.
28
+ Guide the user toward those sites or the listed general web scrapers.
29
+ 2. Ask at most one short round about the Agent's sites, data fields and output
30
+ format. Write complete English instructions, show a short summary and get
31
+ confirmation. Do not require this run's keywords, accounts or URLs yet.
32
+ 3. Call `build_agent` with `step: "create"` and the chosen site IDs in
33
+ `dataSources`. Only report creation after a successful response with the
34
+ actual Agent ID; preparing a local configuration file is not creation.
35
+ 4. Tell the user the Agent's name, sites and Agent Studio URL, then
36
+ ask what the user wants the Agent to do now:
37
+ concrete keywords, accounts, URLs, quantity or time range.
38
+ 5. After the user supplies the task and wants it run, call `run_agent` with
39
+ the returned `agent.id` as `agentId` and that task as `prompt`.
40
+ 6. If started successfully, tell the user the conversation has started.
41
+ Include the returned `chatId` and website URL: they can ask you to query
42
+ progress and results by ID or view the Chat on the SpringBrand website.
43
+ 7. Call `get_agent_result` with that Chat ID. It blocks for up to 10 minutes,
44
+ polling internally and returning early for a terminal or attention status.
45
+ If the wait expires with status `running`, repeat with the same ID;
46
+ do not start another run. For `completed`, return
47
+ the final answer and Chat URL. For `failed` or `cancelled`, report the
48
+ reason and URL. For `needs_attention`, show the question or approval and
49
+ ask the user to handle it in the web Chat before querying again.
50
+
51
+ ### Scheduled tasks
52
+
53
+ When the user asks for a scheduled task, first create an ordinary Agent using
54
+ the workflow above. No special scheduled-Agent type is needed. Then call
55
+ `run_agent` with a `prompt` explicitly asking the Agent to create the scheduled
56
+ task, rather than merely asking it to collect data once.
57
+
58
+ Include the actual task, frequency, run time, time zone and output requirements.
59
+ Reuse details the user has already supplied; after Agent creation, ask only for
60
+ missing task or timing details. For example:
61
+
62
+ ```text
63
+ Create a scheduled task that collects 20 Xiaohongshu posts about camping gear every day at 09:00 in Asia/Shanghai. Each report should include a table with titles, authors and source links, plus a short summary. Confirm the schedule and its time zone after creating it.
64
+ ```
65
+
66
+ Do not search for a separate scheduling MCP tool or create local cron jobs.
67
+ Creating an Agent or starting a Chat does not confirm that a scheduled task exists.
68
+ Read the Agent's response with `get_agent_result`; only report schedule creation
69
+ when that response confirms it. Relay the confirmed timing, any returned task
70
+ identifier and the Chat URL, or explain the unresolved request or failure.
71
+
72
+ Use the user's language for replies. Follow the current tool schemas and
73
+ returned guidance. Creating a reusable Agent does not configure a schedule
74
+ by itself; the explicit request in the subsequent Chat delegates that work
75
+ to the Agent.
76
+
77
+ The client's tool-call timeout must be longer than 10 minutes, for example
78
+ 15 minutes. This is a client requirement, not a setting the server can change.
79
+ The updated CLI sets at least 900 seconds in its generated Codex Plugin's
80
+ SpringBrand server configuration. Other clients and the older native Codex
81
+ fallback still need an equivalent timeout setting.
82
+ Do not inspect or modify local client configuration without user permission.
83
+
84
+ ## Check actual tool availability
85
+
86
+ Never infer loaded tool names or counts from this Skill. Use the client's
87
+ live tool list or tool-discovery interface when available. A successful CLI
88
+ installation or authentication check does not prove that the current
89
+ conversation has loaded any MCP tools.
90
+
91
+ If the direct Agent tools are unavailable, explain that creation cannot be
92
+ performed in this conversation; do not fall back to a one-off Action or
93
+ claim that an Agent was created. Do not report zero tools solely because
94
+ you have not inspected the client's live tool-discovery interface. Keep
95
+ "not yet discovered" distinct from "confirmed unavailable".
12
96
 
13
97
  ## Start with discovery
14
98
 
15
- When the user asks what SpringBrand can do or asks you to perform an external
16
- operation, call `search_tools` with one concise English query. Preserve the
99
+ For operations other than the direct Agent workflow, when the user asks what
100
+ SpringBrand can do or asks you to perform an external operation, call
101
+ `search_tools` with one concise English query. Preserve the
17
102
  requested service, operation, and important constraints. `search_tools` is a
18
103
  bounded relevant-operation search, not a complete catalog; only a complete
19
104
  empty result establishes no match.
20
105
 
21
- Use the returned opaque Tool ID unchanged. Call `get_tool_schemas` before an
22
- execution unless a current contract is already available. Build arguments
23
- strictly from that schema and ask the user for missing business values.
106
+ The five Meta Tools are general entry points, not the capability list or
107
+ an exhaustive MCP tool list. The development Agent tools are described
108
+ separately above. Plugins, Action APIs, and connected-service operations are
109
+ visible only through `search_tools`. For these discoverable operations, never
110
+ tell the user that SpringBrand lacks a capability unless you called
111
+ `search_tools` for it in this task and the result was empty with
112
+ `complete: true`. When a result is incomplete or has no fitting candidate,
113
+ narrow or revise the English query and search again, at most three searches
114
+ for one need; do not fan out synonym variants in parallel.
115
+
116
+ Use the returned opaque Tool ID unchanged. For a chargeable Action candidate,
117
+ read its current contract with `get_tool_schemas`, build arguments strictly
118
+ from that schema and the user's request, then call the returned read-only
119
+ Credit estimate operation before showing the candidate for selection. Report
120
+ `estimatedCredits` or an explicitly unavailable cost together with
121
+ `requiredReservationCredits`, and wait for the user's choice. Ask for missing
122
+ business values before estimating. For a known non-chargeable operation, call
123
+ `get_tool_schemas` before execution unless a current contract is already
124
+ available.
24
125
 
25
126
  ## The five Meta Tools
26
127
 
@@ -32,9 +133,10 @@ strictly from that schema and ask the user for missing business values.
32
133
  | `execute_tools` | Run one discovered operation with schema-valid arguments and a stable idempotency key. |
33
134
  | `get_execution` | Read an exact saved execution result or status. |
34
135
 
35
- The tools are independently composable. Do not invent a fixed sequence when
36
- the user already has a current Tool ID, schema, connection pointer, or
37
- execution ID.
136
+ The tools remain independently composable when the user already has the exact
137
+ Tool ID, current contract, connection pointer, or execution ID. For a new
138
+ chargeable Action choice, preserve the search → schema → estimate → user
139
+ choice → execute order so the user sees the cost before any charge.
38
140
 
39
141
  ## Choose the workflow guidance
40
142
 
@@ -54,9 +156,14 @@ workflow.
54
156
 
55
157
  - Copy Tool IDs, execution IDs, connection IDs, and authorization attempt IDs
56
158
  exactly as returned. Never parse or reconstruct them.
57
- - Execute only with the current contract, schema-valid arguments, and a stable
58
- idempotency key for the logical run.
159
+ - Execute discovered operations only with the current contract, schema-valid
160
+ arguments, and a stable idempotency key for the logical run. Direct Agent
161
+ calls follow their own schemas and the workflow above.
59
162
  - Explain known cost, risk, approval, and access requirements before a write.
163
+ - re-estimate a chargeable Action when its target, arguments, or revision
164
+ changes. A result-dependent or unavailable estimate is not a price; wait for
165
+ the user's explicit decision before executing it. Report `chargedCredits`
166
+ from the completed result when present.
60
167
  - Treat `outcome_unknown` as uncertain. Preserve its idempotency identity and
61
168
  verify the external effect; never retry automatically.
62
169
  - A lookup failure is not proof that an operation failed, and a missing
@@ -64,6 +171,8 @@ workflow.
64
171
 
65
172
  ## Results
66
173
 
67
- Only `succeeded` means an operation completed. A running or queued execution
68
- remains in progress; use `get_execution` only with the exact returned ID. Use
69
- the selected Tool description and returned contract to interpret its result.
174
+ For discovered operations, only `succeeded` means an operation completed.
175
+ A running or queued execution remains in progress; use `get_execution` only
176
+ with the exact returned ID. Use the selected Tool description and returned
177
+ contract to interpret its result.
178
+ Agent runs instead use `get_agent_result` and its statuses described above.