@walkeros/mcp 4.6.0-next-1788817472881 → 4.6.0
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 +22 -7
- package/dist/index.d.ts +164 -1
- package/dist/index.js +1211 -688
- package/dist/index.js.map +1 -1
- package/dist/stdio.js +1228 -706
- package/dist/stdio.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -55,8 +55,23 @@ npm install @walkeros/mcp
|
|
|
55
55
|
|
|
56
56
|
The server starts, registers all tools, and runs the whole local loop without
|
|
57
57
|
any credentials. `auth` reports `{ "authenticated": false }` and the local tools
|
|
58
|
-
work regardless. Only the walkerOS cloud tools need a
|
|
59
|
-
|
|
58
|
+
work regardless. Only the walkerOS cloud tools need a credential.
|
|
59
|
+
|
|
60
|
+
Two ways to get one:
|
|
61
|
+
|
|
62
|
+
- **`auth` with `action: "login"`** runs the RFC 8628 device authorization
|
|
63
|
+
grant. It answers with a URL, you approve it in a browser you are already
|
|
64
|
+
signed in to, and a second call with the same `deviceCode` resumes polling
|
|
65
|
+
until the approval lands. The session that results refreshes itself, and it
|
|
66
|
+
appears in the app under Account, Connected apps, where disconnecting it takes
|
|
67
|
+
effect on the next call. `auth` with `action: "logout"` revokes it.
|
|
68
|
+
- **`WALKEROS_TOKEN`** carries an automation token (`wos_pat_...`) minted in the
|
|
69
|
+
app under Account, then Automation tokens. It is used as-is and never
|
|
70
|
+
refreshed, which is what a CI job or a headless server wants.
|
|
71
|
+
|
|
72
|
+
There is no endpoint that mints a token from another token, and nothing issues
|
|
73
|
+
`sk-walkeros-` or `mcp-walkeros-` values any more; rows carrying them keep
|
|
74
|
+
verifying until they expire.
|
|
60
75
|
|
|
61
76
|
## Quick start
|
|
62
77
|
|
|
@@ -133,11 +148,11 @@ Read these before writing a configuration by hand.
|
|
|
133
148
|
|
|
134
149
|
## Environment variables
|
|
135
150
|
|
|
136
|
-
| Variable | Required | Default | Purpose
|
|
137
|
-
| --------------------- | -------- | ------------------------- |
|
|
138
|
-
| `WALKEROS_TOKEN` | No | none |
|
|
139
|
-
| `WALKEROS_PROJECT_ID` | No | none | Active project ID (`proj_...`)
|
|
140
|
-
| `WALKEROS_APP_URL` | No | `https://app.walkeros.io` | Base URL override
|
|
151
|
+
| Variable | Required | Default | Purpose |
|
|
152
|
+
| --------------------- | -------- | ------------------------- | ------------------------------------------------------------------------- |
|
|
153
|
+
| `WALKEROS_TOKEN` | No | none | Automation token (`wos_pat_...`), an alternative to the `auth` tool login |
|
|
154
|
+
| `WALKEROS_PROJECT_ID` | No | none | Active project ID (`proj_...`) |
|
|
155
|
+
| `WALKEROS_APP_URL` | No | `https://app.walkeros.io` | Base URL override |
|
|
141
156
|
|
|
142
157
|
## Programmatic usage
|
|
143
158
|
|
package/dist/index.d.ts
CHANGED
|
@@ -528,6 +528,19 @@ interface ToolClient {
|
|
|
528
528
|
logout(): Promise<{
|
|
529
529
|
deleted: boolean;
|
|
530
530
|
}>;
|
|
531
|
+
/**
|
|
532
|
+
* The base URL of the walkerOS app this door talks to, without a trailing
|
|
533
|
+
* slash. REQUIRED: a tool that puts a link in front of a person has to name
|
|
534
|
+
* the backend it actually reached, and a door that cannot name itself would
|
|
535
|
+
* emit links into a chat transcript that point somewhere else. Making it
|
|
536
|
+
* required means the compiler, not a runtime surprise, catches that.
|
|
537
|
+
*
|
|
538
|
+
* Each door answers from its own world: the CLI-backed client resolves the
|
|
539
|
+
* user's machine (`WALKEROS_APP_URL`, then the CLI config file, then the
|
|
540
|
+
* built-in default), while an in-process host returns the URL it is served
|
|
541
|
+
* on. Never derive this from the local CLI inside a tool.
|
|
542
|
+
*/
|
|
543
|
+
appBaseUrl(): string;
|
|
531
544
|
checkHealth?(): Promise<{
|
|
532
545
|
reachable: boolean;
|
|
533
546
|
status?: string;
|
|
@@ -763,6 +776,14 @@ declare class HttpToolClient implements ToolClient {
|
|
|
763
776
|
logout(): Promise<{
|
|
764
777
|
deleted: boolean;
|
|
765
778
|
}>;
|
|
779
|
+
/**
|
|
780
|
+
* The app this local door talks to: `WALKEROS_APP_URL`, then the CLI config
|
|
781
|
+
* file, then the built-in default, which is exactly the chain every other
|
|
782
|
+
* method here already resolves its base URL through. Normalized, because
|
|
783
|
+
* neither the env var nor the config file is obliged to omit a trailing
|
|
784
|
+
* slash and the interface promises a base without one.
|
|
785
|
+
*/
|
|
786
|
+
appBaseUrl(): string;
|
|
766
787
|
/**
|
|
767
788
|
* Unauthenticated reachability probe of the app's PUBLIC `/api/health`
|
|
768
789
|
* route. Uses a plain `fetch` (no `createApiClient`, whose every request
|
|
@@ -992,6 +1013,19 @@ interface FlowCanvasPayload {
|
|
|
992
1013
|
reason: string;
|
|
993
1014
|
};
|
|
994
1015
|
suggestions?: SuggestionTile[];
|
|
1016
|
+
/**
|
|
1017
|
+
* Absolute link to this flow's page in the app, from `links.flow`.
|
|
1018
|
+
*
|
|
1019
|
+
* Named for the `appBaseUrl()` seam it is built from, and never `url`: that
|
|
1020
|
+
* is a field several app responses already use for something of their own
|
|
1021
|
+
* (a deployment's `url` is where it SERVES), and one key meaning one thing
|
|
1022
|
+
* across every tool is what keeps a link from ever landing on top of it.
|
|
1023
|
+
*
|
|
1024
|
+
* Optional because a tool that cannot name the project or the flow emits no
|
|
1025
|
+
* link rather than a guess, and because the in-app chat renders the canvas
|
|
1026
|
+
* itself and has no use for a link to the page it is already on.
|
|
1027
|
+
*/
|
|
1028
|
+
appUrl?: string;
|
|
995
1029
|
}
|
|
996
1030
|
interface FlowCanvasToolResult extends FlowCanvasPayload {
|
|
997
1031
|
kind: 'flow-canvas';
|
|
@@ -1013,6 +1047,135 @@ declare function flowCanvasResult(payload: FlowCanvasPayload): {
|
|
|
1013
1047
|
};
|
|
1014
1048
|
declare function isFlowCanvasResult(v: unknown): v is FlowCanvasToolResult;
|
|
1015
1049
|
|
|
1050
|
+
/**
|
|
1051
|
+
* Addresses of walkerOS app screens, built in one place so every tool hands a
|
|
1052
|
+
* person the same link for the same screen.
|
|
1053
|
+
*
|
|
1054
|
+
* WHY THIS EXISTS. A tool that names a release, a step, or a deployment in
|
|
1055
|
+
* prose leaves the person to go find it. A link ends that: the answer and the
|
|
1056
|
+
* screen it is about arrive together. Building the address in each tool would
|
|
1057
|
+
* instead give as many spellings of `/projects/.../flows/...` as there are
|
|
1058
|
+
* emission points, and the first one to drift would send someone to a 404 that
|
|
1059
|
+
* no test here could see.
|
|
1060
|
+
*
|
|
1061
|
+
* THE BASE URL IS CONSUMED RAW. `client.appBaseUrl()` is already normalized by
|
|
1062
|
+
* the door that answers it (the CLI-backed door wraps `resolveAppUrl()` in
|
|
1063
|
+
* `normalizeBaseUrl`; the hosted door returns the same expression it publishes
|
|
1064
|
+
* as its OAuth issuer, which cannot carry a trailing slash). Normalizing again
|
|
1065
|
+
* here would put a second opinion about the shape in the system, which is
|
|
1066
|
+
* exactly what one normalization point per door exists to prevent.
|
|
1067
|
+
*
|
|
1068
|
+
* ONE DEFINITION, BOTH DOORS. Nothing here branches on which door is calling.
|
|
1069
|
+
* The base URL is the only thing that differs between them, and it arrives as
|
|
1070
|
+
* an argument.
|
|
1071
|
+
*
|
|
1072
|
+
* EVERY LINK IS ABSOLUTE. These land in a chat transcript, where a path
|
|
1073
|
+
* relative to nothing is useless.
|
|
1074
|
+
*
|
|
1075
|
+
* AN UNBUILDABLE LINK IS `undefined`, NEVER A GUESS. Every builder returns
|
|
1076
|
+
* `undefined` when it cannot name a screen that exists, and callers spread the
|
|
1077
|
+
* field conditionally so the result simply carries no link. A link that lands
|
|
1078
|
+
* on a 404, or on the app's "can't open that" notice, is worse than no link:
|
|
1079
|
+
* it costs the person a click and teaches them the tool's links are unreliable.
|
|
1080
|
+
*
|
|
1081
|
+
* THE URL SHAPES ARE THE APP'S, NOT OURS. They mirror what the app routes
|
|
1082
|
+
* today: `/projects/{projectId}/flows/{flowId}` and
|
|
1083
|
+
* `/projects/{projectId}/deployments/{deploymentId}`, with a view on the flow
|
|
1084
|
+
* page addressed by the `view` query param whose value names a SUBJECT
|
|
1085
|
+
* (`variables`, `secrets`, `contract`, `history`, `releases`, `knowledge`,
|
|
1086
|
+
* `step`). A step is `?view=step&flow=<named flow>&step=<type.name>`, the same
|
|
1087
|
+
* vocabulary `hub_manage` already takes as its `flow` and `step` params.
|
|
1088
|
+
*/
|
|
1089
|
+
/** A flow page: the address every flow-scoped view hangs off. */
|
|
1090
|
+
interface FlowLinkTarget {
|
|
1091
|
+
/** From `client.appBaseUrl()`. Consumed as given. */
|
|
1092
|
+
baseUrl: string;
|
|
1093
|
+
projectId: string;
|
|
1094
|
+
flowId: string;
|
|
1095
|
+
}
|
|
1096
|
+
/**
|
|
1097
|
+
* One step inside a flow. `flow` is the named flow within the config ("web",
|
|
1098
|
+
* "server"); `step` is `"type.name"`, e.g. `"destination.ga4"`.
|
|
1099
|
+
*/
|
|
1100
|
+
interface StepLinkTarget extends FlowLinkTarget {
|
|
1101
|
+
step: string;
|
|
1102
|
+
/**
|
|
1103
|
+
* Null and undefined both mean "the caller did not name one", which is the
|
|
1104
|
+
* shape `hub_manage`'s step history answers with when it was not filtered by
|
|
1105
|
+
* flow.
|
|
1106
|
+
*/
|
|
1107
|
+
flow?: string | null;
|
|
1108
|
+
}
|
|
1109
|
+
/** One discussion thread, addressed by what it hangs on. */
|
|
1110
|
+
interface ThreadLinkTarget extends FlowLinkTarget {
|
|
1111
|
+
anchorType: string;
|
|
1112
|
+
}
|
|
1113
|
+
/**
|
|
1114
|
+
* One deployment.
|
|
1115
|
+
*
|
|
1116
|
+
* Pass the `dep_...` id, not the slug. The detail route resolves either, but
|
|
1117
|
+
* the page's live-status stream matches on the id alone, so a slug link opens a
|
|
1118
|
+
* page whose status stream fails while the deployment is still deploying. This
|
|
1119
|
+
* builder does not inspect the value: naming the id is the caller's job.
|
|
1120
|
+
*/
|
|
1121
|
+
interface DeploymentLinkTarget {
|
|
1122
|
+
baseUrl: string;
|
|
1123
|
+
projectId: string;
|
|
1124
|
+
deploymentId: string;
|
|
1125
|
+
}
|
|
1126
|
+
declare const links: {
|
|
1127
|
+
/** The flow page itself. `undefined` when any part of the address is empty. */
|
|
1128
|
+
flow(target: FlowLinkTarget): string | undefined;
|
|
1129
|
+
/**
|
|
1130
|
+
* The screen showing one step.
|
|
1131
|
+
*
|
|
1132
|
+
* A `contract` step, in any of its spellings, is answered with the CONTRACT
|
|
1133
|
+
* view rather than a step address. `?view=step&step=contract.checkout` is a
|
|
1134
|
+
* legitimate address in the vocabulary this tool speaks, but the app has
|
|
1135
|
+
* deliberately deferred opening ONE contract entry and refuses that link with
|
|
1136
|
+
* a notice. `?view=contract` opens the contract editor the entry lives in,
|
|
1137
|
+
* which is the nearest screen that actually exists. A `flow` alongside a
|
|
1138
|
+
* contract step is a caller mistake (contract entries are top-level) and is
|
|
1139
|
+
* ignored rather than turned into a refused link.
|
|
1140
|
+
*
|
|
1141
|
+
* Otherwise a step needs its named flow: `type.name` alone is not unique in a
|
|
1142
|
+
* config holding both a web and a server flow, and the app resolves an
|
|
1143
|
+
* address without one to nothing and says so on screen. So an unnamed flow
|
|
1144
|
+
* yields `undefined` here. Callers that want the link can re-ask with `flow`.
|
|
1145
|
+
*
|
|
1146
|
+
* What this cannot check is whether the step is still IN that flow. The
|
|
1147
|
+
* address is resolved against the live config when the page opens, and a step
|
|
1148
|
+
* since renamed or removed gets a notice there rather than a broken screen.
|
|
1149
|
+
*/
|
|
1150
|
+
step(target: StepLinkTarget): string | undefined;
|
|
1151
|
+
/**
|
|
1152
|
+
* The release history of a flow.
|
|
1153
|
+
*
|
|
1154
|
+
* The app has no address for ONE release: `?view=releases` declares no params
|
|
1155
|
+
* and opens the list the release is a row of. That is the screen a person
|
|
1156
|
+
* asking about a release wants to be on, so this takes the flow and nothing
|
|
1157
|
+
* else rather than pretending to a precision the app does not have.
|
|
1158
|
+
*/
|
|
1159
|
+
release(target: FlowLinkTarget): string | undefined;
|
|
1160
|
+
/**
|
|
1161
|
+
* The screen a thread is read on.
|
|
1162
|
+
*
|
|
1163
|
+
* Only a release anchor can be addressed from the wire shape this tool
|
|
1164
|
+
* holds. The app renders release-anchored discussions inside the release
|
|
1165
|
+
* history, beside the release they hang on. Step and entity-action anchors
|
|
1166
|
+
* have no surface at all yet. A TAG anchor does have one, the knowledge list
|
|
1167
|
+
* on `?view=knowledge`, but only when the thread was captured in Tag Mode
|
|
1168
|
+
* and carries a frame: `HubThreadWire` has no `frameId`, so nothing here can
|
|
1169
|
+
* tell such a thread from one written over MCP against a null frame, and a
|
|
1170
|
+
* knowledge link would open a list the thread may be absent from. So
|
|
1171
|
+
* everything but a release anchor gets no link rather than a possibly empty
|
|
1172
|
+
* one.
|
|
1173
|
+
*/
|
|
1174
|
+
thread(target: ThreadLinkTarget): string | undefined;
|
|
1175
|
+
/** One deployment's detail page. */
|
|
1176
|
+
deployment(target: DeploymentLinkTarget): string | undefined;
|
|
1177
|
+
};
|
|
1178
|
+
|
|
1016
1179
|
declare module '@walkeros/core' {
|
|
1017
1180
|
interface SourceMap {
|
|
1018
1181
|
mcp: {
|
|
@@ -1036,4 +1199,4 @@ declare module '@walkeros/core' {
|
|
|
1036
1199
|
*/
|
|
1037
1200
|
declare function createToolHandlers(client: ToolClient, packageVersion?: string): Record<string, ToolSpec>;
|
|
1038
1201
|
|
|
1039
|
-
export { type CreateServerOptions, type CreateStreamableHttpHandlerOptions, FEATURE_NOT_AVAILABLE, FRAME_HINT_EXTENDS_BASE, FRAME_HINT_MARK_SPACE, FRAME_HINT_NAMES_ARE_DOCUMENTATION, FRAME_HINT_NONE_ON_PAGE, FRAME_HINT_NONE_YET, FRAME_HINT_OPEN_PAGE_OR_GET, FRAME_HINT_READ_KNOWLEDGE, FRAME_MANAGE_DESCRIPTION, FRAME_MANAGE_INPUT_SCHEMA, FRAME_NOT_FOUND_HINT, type FlowCanvasPayload, type FlowCanvasToolResult, type FrameLeanListWire, type FrameLeanWire, type FrameListWire, type FrameWire, type GatedFeature, HINT_EMPTY_FEED, HINT_ENDED, HINT_NO_WINDOW, HINT_PREVIEW_STREAMS, HINT_READ, HINT_SIMULATE_FIRST, HINT_STOP, HUB_HINT_CONFIRM_INDEX, HUB_HINT_ENTRY_NAMES_FLOW, HUB_HINT_KEEP_ONE_THREAD, HUB_HINT_KNOWLEDGE_INDEX, HUB_HINT_KNOWLEDGE_PAGE_CAPPED, HUB_HINT_KNOWLEDGE_READ_ONLY, HUB_HINT_MASKED_ONLY, HUB_HINT_MESSAGES_TRUNCATED, HUB_HINT_MESSAGE_VISIBLE, HUB_HINT_NOTHING_DISCUSSED, HUB_HINT_NOTHING_WRITTEN, HUB_HINT_NO_MATCH, HUB_HINT_NO_THREAD_ON_ANCHOR, HUB_HINT_OPEN_RELEASE, HUB_HINT_RATIONALE_VISIBLE, HUB_HINT_READ_BACK, HUB_HINT_READ_FRAME, HUB_HINT_RELEASE_GET, HUB_HINT_REPLY_OR_OPEN, HUB_HINT_RESOLVE_IN_APP, HUB_HINT_ROWS_ARE_DEPLOYMENTS, HUB_HINT_SCAN_CAPPED, HUB_HINT_STAYS_RESOLVED, HUB_HINT_STEP_HISTORY, HUB_HINT_THREADS_INDEX, HUB_HINT_THREADS_PAGE_CAPPED, HUB_HINT_THREAD_OPEN, HUB_HINT_TRACE_STEP, HUB_HINT_WRITE_RATIONALE, HUB_MANAGE_DESCRIPTION, HUB_MANAGE_INPUT_SCHEMA, HUB_NOT_FOUND_HINT, HttpToolClient, type HubThreadWire, type JourneysResult, type KnowledgeEntryWire, type ListKnowledgeWire, type ListThreadsWire, type Logger, DESCRIPTION as OBSERVE_SESSION_DESCRIPTION, type RedactOptions, type ReleaseDetailWire, type ReleaseIndexWire, type ReleaseRef, type StepHistoryWire, type SuggestionTile, TOOL_DEFINITIONS, type ToolAnnotations, type ToolClient, type ToolDefinition, type ToolSpec, type VersionAnnotationWire, createStreamableHttpHandler, createToolHandlers, createWalkerOSMcpServer, featureDenialHint, flowCanvasResult, isFeatureDenial, isFlowCanvasResult, redactNestedStrings, wrapUserData };
|
|
1202
|
+
export { type CreateServerOptions, type CreateStreamableHttpHandlerOptions, type DeploymentLinkTarget, FEATURE_NOT_AVAILABLE, FRAME_HINT_EXTENDS_BASE, FRAME_HINT_MARK_SPACE, FRAME_HINT_NAMES_ARE_DOCUMENTATION, FRAME_HINT_NONE_ON_PAGE, FRAME_HINT_NONE_YET, FRAME_HINT_OPEN_PAGE_OR_GET, FRAME_HINT_READ_KNOWLEDGE, FRAME_MANAGE_DESCRIPTION, FRAME_MANAGE_INPUT_SCHEMA, FRAME_NOT_FOUND_HINT, type FlowCanvasPayload, type FlowCanvasToolResult, type FlowLinkTarget, type FrameLeanListWire, type FrameLeanWire, type FrameListWire, type FrameWire, type GatedFeature, HINT_EMPTY_FEED, HINT_ENDED, HINT_NO_WINDOW, HINT_PREVIEW_STREAMS, HINT_READ, HINT_SIMULATE_FIRST, HINT_STOP, HUB_HINT_CONFIRM_INDEX, HUB_HINT_ENTRY_NAMES_FLOW, HUB_HINT_KEEP_ONE_THREAD, HUB_HINT_KNOWLEDGE_INDEX, HUB_HINT_KNOWLEDGE_PAGE_CAPPED, HUB_HINT_KNOWLEDGE_READ_ONLY, HUB_HINT_MASKED_ONLY, HUB_HINT_MESSAGES_TRUNCATED, HUB_HINT_MESSAGE_VISIBLE, HUB_HINT_NOTHING_DISCUSSED, HUB_HINT_NOTHING_WRITTEN, HUB_HINT_NO_MATCH, HUB_HINT_NO_THREAD_ON_ANCHOR, HUB_HINT_OPEN_RELEASE, HUB_HINT_RATIONALE_VISIBLE, HUB_HINT_READ_BACK, HUB_HINT_READ_FRAME, HUB_HINT_RELEASE_GET, HUB_HINT_REPLY_OR_OPEN, HUB_HINT_RESOLVE_IN_APP, HUB_HINT_ROWS_ARE_DEPLOYMENTS, HUB_HINT_SCAN_CAPPED, HUB_HINT_STAYS_RESOLVED, HUB_HINT_STEP_HISTORY, HUB_HINT_THREADS_INDEX, HUB_HINT_THREADS_PAGE_CAPPED, HUB_HINT_THREAD_OPEN, HUB_HINT_TRACE_STEP, HUB_HINT_WRITE_RATIONALE, HUB_MANAGE_DESCRIPTION, HUB_MANAGE_INPUT_SCHEMA, HUB_NOT_FOUND_HINT, HttpToolClient, type HubThreadWire, type JourneysResult, type KnowledgeEntryWire, type ListKnowledgeWire, type ListThreadsWire, type Logger, DESCRIPTION as OBSERVE_SESSION_DESCRIPTION, type RedactOptions, type ReleaseDetailWire, type ReleaseIndexWire, type ReleaseRef, type StepHistoryWire, type StepLinkTarget, type SuggestionTile, TOOL_DEFINITIONS, type ThreadLinkTarget, type ToolAnnotations, type ToolClient, type ToolDefinition, type ToolSpec, type VersionAnnotationWire, createStreamableHttpHandler, createToolHandlers, createWalkerOSMcpServer, featureDenialHint, flowCanvasResult, isFeatureDenial, isFlowCanvasResult, links, redactNestedStrings, wrapUserData };
|