@super-hands/connect 0.1.24 → 0.1.26
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/client.mjs +73 -37
- package/package.json +1 -1
package/client.mjs
CHANGED
|
@@ -42,11 +42,11 @@ function codexConfigBlock(args) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
// lib/connect-skill.ts
|
|
45
|
-
var CONNECT_SKILL_VERSION =
|
|
45
|
+
var CONNECT_SKILL_VERSION = 19;
|
|
46
46
|
var CONNECT_SKILL_DIR = MCP_SERVER_KEY;
|
|
47
47
|
var CONNECT_SKILL_FILENAME = "SKILL.md";
|
|
48
48
|
var VERSION_MARKER = `[//]: # (superhands-skill-version: ${CONNECT_SKILL_VERSION})`;
|
|
49
|
-
var CONNECT_SKILL_DESCRIPTION = `
|
|
49
|
+
var CONNECT_SKILL_DESCRIPTION = `Follow this team's instructions and trace decisions in any kind of work. Use BEFORE research, writing, analysis, planning, operations, design or code \u2014 "research this", "write a report", "analyze this data", "plan the launch", "build a page", "redesign this" \u2014 including work without a repository or UI. Reads the team's build-time Instructions from their Superhands MCP server, fetches task-wide requirements before starting and each part's selected instructions before building, including copy, and follows explicit requirements even when unusual or agent-specific.`;
|
|
50
50
|
var CONNECT_SKILL_CONTENT = `---
|
|
51
51
|
name: ${CONNECT_SKILL_DIR}
|
|
52
52
|
description: ${CONNECT_SKILL_DESCRIPTION}
|
|
@@ -59,24 +59,27 @@ ${VERSION_MARKER}
|
|
|
59
59
|
This machine is connected to the team's Superhands server over MCP (server
|
|
60
60
|
key \`${MCP_SERVER_KEY}\`). It holds the team's build-time **Instructions**:
|
|
61
61
|
team-authored decisions, imported procedures, examples and conventions that all
|
|
62
|
-
describe how agents should
|
|
62
|
+
describe how agents should work for this team. Source labels tell you where
|
|
63
63
|
an instruction came from and how to read it; they are not a choice about which
|
|
64
64
|
half to follow.
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
Work traces record explicit choices, stated reasons, sources, outputs and human
|
|
67
|
+
feedback for any kind of work. Create a stable task reference once (for example
|
|
68
|
+
a UUID). Call \`superhands_start_trace\` with \`taskId\` and a plain-language
|
|
69
|
+
\`task\`, even without a repository, UI or matching instruction. Reuse taskId on
|
|
70
|
+
retries and keep the returned runId. If this tool is unavailable, send the same
|
|
71
|
+
reference as \`trace.taskId\` on the first Instructions read instead.
|
|
72
|
+
Save the returned \`trace.runId\` and \`trace.decisionId\` when supplied;
|
|
70
73
|
send \`trace.runId\` on every later read and report. Do not use a transport
|
|
71
74
|
session or a shared credential as a task identity. Send \`trace.target\` for
|
|
72
|
-
known
|
|
75
|
+
known parts or work products, \`trace.phase\` (before or during), and \`trace.trigger\`
|
|
73
76
|
when an observation prompted guidance. Unknown scope stays unknown.
|
|
74
77
|
|
|
75
|
-
Before you build,
|
|
78
|
+
Before you build, research, write, analyze, plan or carry out other work:
|
|
76
79
|
|
|
77
80
|
1. Call the \`superhands_get_instructions\` MCP tool with \`intent\` set to what
|
|
78
|
-
you have been asked to
|
|
79
|
-
|
|
81
|
+
you have been asked to do, in plain language \u2014 for example "research customer
|
|
82
|
+
retention and write a findings report", and
|
|
80
83
|
\`skill_version: ${CONNECT_SKILL_VERSION}\` \u2014 the version of this file, so
|
|
81
84
|
the server can tell you when this file is out of date. The corpus comes
|
|
82
85
|
back narrowed to that work, with everything not chosen still named.
|
|
@@ -89,15 +92,16 @@ Before you build, change, or restyle any UI:
|
|
|
89
92
|
example \`["app/marketing/pricing.tsx"]\`. The team writes down where
|
|
90
93
|
Instructions apply, and a path answers that far better than a description
|
|
91
94
|
does. Leave it out if you do not know yet; it narrows nothing away.
|
|
92
|
-
2. Plan against
|
|
93
|
-
keys
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
2. Plan against the selected Instructions. The first answer names them under
|
|
96
|
+
**Reachable**, with keys and opening text; it does not render them in full.
|
|
97
|
+
Fetch every selected entry when its scope is reached, including review-enforced
|
|
98
|
+
decisions. Superhands has already selected these for the task: sequence their
|
|
99
|
+
use, not a second shortlist based on your preferences. Map every selected key
|
|
100
|
+
to the work it governs. The closing **Not selected** index is available for
|
|
101
|
+
anything selection missed; fetch an entry there if the work reaches its scope.
|
|
102
|
+
If no entry covers a part, say guidance was not found for it, rather than
|
|
103
|
+
assuming the team has never written any.
|
|
104
|
+
3. As you start each part \u2014 source selection, analysis, then the report; or the sidebar, table and form \u2014 call
|
|
101
105
|
\`superhands_get_instruction_modules\` with the reachable keys covering the
|
|
102
106
|
part you are starting now and \`part\` set to that part in a few words,
|
|
103
107
|
for example \`"the form's validation errors"\`. A key ending in \`*\` takes
|
|
@@ -114,40 +118,72 @@ Before you build, change, or restyle any UI:
|
|
|
114
118
|
the start. These are instructions to follow, not facts to know, so modules
|
|
115
119
|
for a part you are not building are a page of directions about the wrong
|
|
116
120
|
thing sitting in your context while you work.
|
|
117
|
-
-
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
- Fetch instructions governing the whole task, agent behaviour or communication
|
|
122
|
+
before starting that work, and continue applying them throughout the task.
|
|
123
|
+
Fetch copy instructions before writing text, including placeholder copy,
|
|
124
|
+
headings, buttons and footers, even during layout or styling work. A part
|
|
125
|
+
includes its copy, controls, accessibility and states as well as its styling.
|
|
126
|
+
- If an entry's full text excludes the actual work, or the task changes so its
|
|
127
|
+
scope is no longer reached, state the concrete reason it does not apply.
|
|
128
|
+
Do not silently omit it.
|
|
120
129
|
- If that tool is not available on this server,
|
|
121
130
|
build from what step 1 already returned and skip this step. Do not ask
|
|
122
131
|
for the whole library instead \u2014 that is the wall of text step 1 avoided.
|
|
132
|
+
Say which entries could not be read; never claim to have followed unavailable text.
|
|
123
133
|
4. Build to what comes back. Use the selected Instructions together. When two
|
|
124
134
|
entries pull in different directions, prefer the more specific instruction,
|
|
125
135
|
preserve explicit exceptions, and call out any conflict you cannot honestly
|
|
126
|
-
resolve.
|
|
127
|
-
|
|
136
|
+
resolve. Do not dismiss an explicit requirement as a leftover test, placeholder,
|
|
137
|
+
accidental entry or bad brand choice because it looks unusual. Do not ask for
|
|
138
|
+
confirmation merely because you would prefer a different result. An explicit
|
|
139
|
+
agent-specific text prefix is an exception to general copy style: apply the
|
|
140
|
+
prefix and follow the general style for the rest of the text. If requirements
|
|
141
|
+
remain incompatible after applying their scopes and exceptions, identify the
|
|
142
|
+
exact conflict and ask a focused question; continue work independent of the answer.
|
|
143
|
+
5. Record each consequential decision as it happens in any kind of work. Use \`superhands_report_trace\` with the
|
|
128
144
|
runId, a stable eventId and occurredAt timestamp (reuse both on retries).
|
|
129
|
-
Send a \`decision\` event
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
145
|
+
Send a \`decision\` event whose decision has id, key, title (the choice), target
|
|
146
|
+
(the affected work), provisional: false, a concise stated reason and optional
|
|
147
|
+
sources (title, URL, version or excerpt). Use returned delivery IDs when
|
|
148
|
+
instructions informed the choice, and \`deliveryIds: []\` otherwise. A choice
|
|
149
|
+
needs no existing instruction or output to be recorded. Use \`replaces\` to
|
|
150
|
+
refine a provisional group without counting both. Keep conflicting sources
|
|
151
|
+
and any explicit resolution. Cited sources remain agent reports.
|
|
133
152
|
Register each identifiable output with an \`output\` event: revision,
|
|
134
153
|
identity (commit:<sha>[:dirty-digest], deployment:<build-id>, or
|
|
135
|
-
artifact:<digest>), label and target.
|
|
154
|
+
artifact:<digest>), label and target. Documents, datasets, messages and plans
|
|
155
|
+
use artifact:<content-digest>; a URL is only a locator. Do not invent an output
|
|
156
|
+
for work that produced none. Match its target to the decision's affected work.
|
|
136
157
|
Later revisions name the preceding revision in \`supersedes\`.
|
|
137
158
|
Send \`response\` events with decisionId, revision, description and
|
|
138
159
|
\`reported_applied\`, \`reported_adapted\`, or \`reported_rejected\`.
|
|
139
160
|
Include a concise explicit reason when useful; never provide private reasoning.
|
|
140
161
|
Agent reports and agent-run checks are labelled **Agent reported**, not
|
|
141
162
|
independent verification. A screenshot is an artifact, not a passed check.
|
|
142
|
-
Use \`superhands_add_trace_artifact\` for
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
163
|
+
Use \`superhands_add_trace_artifact\` for plain text, images or evidence links.
|
|
164
|
+
Link other formats such as spreadsheets, PDFs, audio or video. Route, viewport
|
|
165
|
+
and UI state apply only to visual captures. Missing capture capability must
|
|
166
|
+
not stop work. Never invent a before image or an unguided baseline.
|
|
167
|
+
Read \`superhands_get_trace\` before responding to human feedback. Feedback
|
|
146
168
|
belongs to its reviewed revision. After addressing it, register the new output
|
|
147
|
-
and send a \`ready\` event naming feedbackId; only
|
|
148
|
-
Report interrupted/failed/resumed lifecycle explicitly
|
|
169
|
+
and send a \`ready\` event naming feedbackId; only a human may approve.
|
|
170
|
+
Report completed/interrupted/failed/resumed lifecycle explicitly for every
|
|
171
|
+
kind of work, even without outputs or instruction changes. To resume a terminal
|
|
149
172
|
run, read and supersede its lifecycleId. Later outputs do not inherit approval.
|
|
150
|
-
If trace recording fails,
|
|
173
|
+
If trace recording fails, tell the person and continue the task. Only reported
|
|
174
|
+
activity is covered; never claim every internal decision was captured.
|
|
175
|
+
When a person corrects or amends a decision, report a \`correction\` event with
|
|
176
|
+
decisionId, optional revision, title, the proposed reusable wording in body,
|
|
177
|
+
and usedWhen describing the similar decisions it should guide. Keep the
|
|
178
|
+
correction faithful to the person's request; respect requests not to retain it.
|
|
179
|
+
This is an agent-reported proposal, not human acceptance. The run page lets a
|
|
180
|
+
member edit and save it into the team's instructions. It never changes review
|
|
181
|
+
policy. Read acceptedCorrections from \`superhands_get_trace\` to see what
|
|
182
|
+
was saved. Before a consequential decision outside the opening task's scope,
|
|
183
|
+
call \`superhands_get_instructions\` with that decision as intent and the same
|
|
184
|
+
trace.runId, then fetch the relevant keys. Accepted corrections travel through
|
|
185
|
+
this same search and per-part fetch; do not assume an earlier read has newer
|
|
186
|
+
instructions. Link later responses to the exact returned key and delivery.
|
|
151
187
|
|
|
152
188
|
6. When you finish a part, call \`superhands_report_part\` with \`part\` \u2014 the
|
|
153
189
|
part you just finished, in the words you fetched it under \u2014 and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@super-hands/connect",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.26",
|
|
4
4
|
"description": "Connect the coding agents on this machine to your team's Superhands MCP server — with `start`, from a machine that has no Superhands account at all. Refresh it later with `update` (no token needed), and take it back off again with `uninstall`. Writes each client's own config; reads no repository, uploads nothing.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superhands-connect": "client.mjs"
|