Skip to content

Commit 4c857b6

Browse files
authored
feat(console): sync graphql schema and cli commands (#9)
Bump lathe to v0.4.2 and regenerate console overlays, specs, and skill references. Add app-overview, control-plane-overview, and start-agent-run commands; drop deprecated agent-builder operations.
1 parent ff0fa70 commit 4c857b6

7 files changed

Lines changed: 88 additions & 15 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/langgenius/mosoo-cli-go
33
go 1.25.7
44

55
require (
6-
github.com/lathe-cli/lathe v0.4.1-0.20260622181552-ff1ffba66042
6+
github.com/lathe-cli/lathe v0.4.2-0.20260625075110-ff7dc639cf2b
77
github.com/spf13/cobra v1.10.2
88
)
99

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ github.com/lathe-cli/lathe v0.4.0 h1:W07DL+rEzyxsrKb69UDfflUA5wRIvCOBGWVYff5nBxs
77
github.com/lathe-cli/lathe v0.4.0/go.mod h1:R7LnEOMjrGHDutF3l2VyY5yc7AAoKLsFSj4JeSuLJRc=
88
github.com/lathe-cli/lathe v0.4.1-0.20260622181552-ff1ffba66042 h1:14K+sahUda+aQSVBf3pKZBc0ok50mcvcHWnJEf+m6lk=
99
github.com/lathe-cli/lathe v0.4.1-0.20260622181552-ff1ffba66042/go.mod h1:R7LnEOMjrGHDutF3l2VyY5yc7AAoKLsFSj4JeSuLJRc=
10+
github.com/lathe-cli/lathe v0.4.2-0.20260625075110-ff7dc639cf2b h1:YnUhHne8ffCysaDMzBLdf3ZW5mBtgbzigiclD98nleU=
11+
github.com/lathe-cli/lathe v0.4.2-0.20260625075110-ff7dc639cf2b/go.mod h1:R7LnEOMjrGHDutF3l2VyY5yc7AAoKLsFSj4JeSuLJRc=
1012
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
1113
github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=
1214
github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=

overlays/console.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ commands:
116116
known_errors:
117117
- status: 401
118118
cause: "Missing, invalid, or revoked personal access token."
119+
app-overview:
120+
short: "App overview"
121+
long: "App overview via the Mosoo Console GraphQL API (Apps surface). Requires a personal access token logged in to the /api host."
122+
notes:
123+
- "Uses POST /graphql on the console default hostname (/api)."
124+
known_errors:
125+
- status: 401
126+
cause: "Missing, invalid, or revoked personal access token."
119127
app-skill-list:
120128
short: "List app skills"
121129
long: "List app skills via the Mosoo Console GraphQL API (Skills surface). Requires a personal access token logged in to the /api host."
@@ -156,6 +164,14 @@ commands:
156164
known_errors:
157165
- status: 401
158166
cause: "Missing, invalid, or revoked personal access token."
167+
control-plane-overview:
168+
short: "Control plane overview"
169+
long: "Control plane overview via the Mosoo Console GraphQL API (Apps surface). Requires a personal access token logged in to the /api host."
170+
notes:
171+
- "Uses POST /graphql on the console default hostname (/api)."
172+
known_errors:
173+
- status: 401
174+
cause: "Missing, invalid, or revoked personal access token."
159175
create-agent:
160176
short: "Create an agent"
161177
long: "Create an agent via the Mosoo Console GraphQL API (Agents surface). Requires a personal access token logged in to the /api host."
@@ -556,6 +572,14 @@ commands:
556572
known_errors:
557573
- status: 401
558574
cause: "Missing, invalid, or revoked personal access token."
575+
start-agent-run:
576+
short: "Start agent run"
577+
long: "Start agent run via the Mosoo Console GraphQL API (Sessions surface). Requires a personal access token logged in to the /api host."
578+
notes:
579+
- "Uses POST /graphql on the console default hostname (/api)."
580+
known_errors:
581+
- status: 401
582+
cause: "Missing, invalid, or revoked personal access token."
559583
start-lark-agent-channel-registration:
560584
short: "Start lark agent channel registration"
561585
long: "Start lark agent channel registration via the Mosoo Console GraphQL API (Channels surface). Requires a personal access token logged in to the /api host."

publish/skills/mosoo/references/cli/modules/console-rest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- Backend: `openapi3`
66
- Default hostname: `http://127.0.0.1:8787/api`
7-
- Repository: file:///Users/xiaoke/new_mosoo/mosoo-cli-go/.cache/mosoo
7+
- Repository: file:///Users/x/git/lg/mosoo-cli/.cache/mosoo
88
- Pinned tag: `local-snapshot`
99
- Files: `docs/openapi/console-rest.openapi.json`
1010
- Resolved SHA: `local-snapshot`

publish/skills/mosoo/references/cli/modules/console.md

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
- Backend: `graphql`
66
- Default hostname: `http://127.0.0.1:8787/api`
7-
- Repository: file:///Users/xiaoke/new_mosoo/mosoo-cli-go/.cache/mosoo
7+
- Repository: file:///Users/x/git/lg/mosoo-cli/.cache/mosoo
88
- Pinned tag: `local-snapshot`
99
- Schema: `docs/graphql/console.graphql`
10-
- Expose queries: `accessibleAgentList`, `agent`, `agentChannelBindingList`, `agentCostCard`, `agentEditorState`, `agentManifest`, `agentSessionDiagnostics`, `agentSessionList`, `agentSessionRetrieve`, `appCostCard`, `appEnvironmentList`, `appInfo`, `appList`, `appSkillList`, `availableAgentModels`, `environment`, `exportAgentPackage`, `fileList`, `listSessionResources`, `mcpOAuthFlowStatus`, `mcpRegistry`, `organizationBillingCostCard`, `session`, `sessionList`, `sessionMessages`, `sessionProcessEvents`, `skillDetail`, `threadAgentSessionList`, `threadAgentSessionRetrieve`, `threadSessionMessages`, `threadSessionProcessEvents`, `vendorCredentialList`, `viewer`
11-
- Expose mutations: `addSessionResource`, `archiveAgentSession`, `autoTitleSession`, `connectMcpBearer`, `createAgent`, `createAgentFork`, `createAgentSession`, `createApp`, `createAppMcpServer`, `createDiscordAgentChannelBinding`, `createEnvironmentFork`, `createLarkAgentChannelBinding`, `createSkillFork`, `createSlackAgentChannelBinding`, `createTelegramAgentChannelBinding`, `createVendorCredential`, `deleteAgent`, `deleteAgentChannelBinding`, `deleteAgentSession`, `deleteEnvironment`, `deleteMcpServer`, `deleteOwnedSkill`, `deleteVendorCredential`, `importAgentPackage`, `onboardingBootstrap`, `pollLarkAgentChannelRegistration`, `pollWeChatAgentChannelPairing`, `prewarmAgentSession`, `publishAgent`, `recreateSandbox`, `removeSessionResource`, `renameApp`, `renameSession`, `resetAgentState`, `restartDriver`, `revokeMcpCredential`, `setAppDefaultEnvironment`, `setDefaultVendorCredential`, `setEnvironmentVariableValue`, `setMcpServerEnabled`, `setSystemAgentModel`, `startLarkAgentChannelRegistration`, `startMcpOAuth`, `startWeChatAgentChannelPairing`, `testVendorCredential`, `unarchiveAgentSession`, `unpublishAgent`, `updateAgentConfig`, `updateProfile`, `updateVendorCredential`
10+
- Expose queries: `accessibleAgentList`, `agent`, `agentChannelBindingList`, `agentCostCard`, `agentEditorState`, `agentManifest`, `agentSessionDiagnostics`, `agentSessionList`, `agentSessionRetrieve`, `appCostCard`, `appEnvironmentList`, `appInfo`, `appList`, `appOverview`, `appSkillList`, `availableAgentModels`, `controlPlaneOverview`, `environment`, `exportAgentPackage`, `fileList`, `listSessionResources`, `mcpOAuthFlowStatus`, `mcpRegistry`, `organizationBillingCostCard`, `session`, `sessionList`, `sessionMessages`, `sessionProcessEvents`, `skillDetail`, `threadAgentSessionList`, `threadAgentSessionRetrieve`, `threadSessionMessages`, `threadSessionProcessEvents`, `vendorCredentialList`, `viewer`
11+
- Expose mutations: `addSessionResource`, `archiveAgentSession`, `autoTitleSession`, `connectMcpBearer`, `createAgent`, `createAgentFork`, `createAgentSession`, `createApp`, `createAppMcpServer`, `createDiscordAgentChannelBinding`, `createEnvironmentFork`, `createLarkAgentChannelBinding`, `createSkillFork`, `createSlackAgentChannelBinding`, `createTelegramAgentChannelBinding`, `createVendorCredential`, `deleteAgent`, `deleteAgentChannelBinding`, `deleteAgentSession`, `deleteEnvironment`, `deleteMcpServer`, `deleteOwnedSkill`, `deleteVendorCredential`, `importAgentPackage`, `onboardingBootstrap`, `pollLarkAgentChannelRegistration`, `pollWeChatAgentChannelPairing`, `prewarmAgentSession`, `publishAgent`, `recreateSandbox`, `removeSessionResource`, `renameApp`, `renameSession`, `resetAgentState`, `restartDriver`, `revokeMcpCredential`, `setAppDefaultEnvironment`, `setDefaultVendorCredential`, `setEnvironmentVariableValue`, `setMcpServerEnabled`, `setSystemAgentModel`, `startAgentRun`, `startLarkAgentChannelRegistration`, `startMcpOAuth`, `startWeChatAgentChannelPairing`, `testVendorCredential`, `unarchiveAgentSession`, `unpublishAgent`, `updateAgentConfig`, `updateProfile`, `updateVendorCredential`
1212
- Group policies: `13`
1313
- Selection policy: max depth `3`
1414
- Resolved SHA: `local-snapshot`
@@ -282,6 +282,36 @@ mosoo console apps app-list \
282282
--organization-id <value>
283283
```
284284

285+
### `mosoo console apps app-overview`
286+
287+
- Summary: App overview
288+
- HTTP: `POST /graphql`
289+
- Auth: required
290+
- Body: required; templated body, set inputs under `variables` with --set/--set-str/--file
291+
- Flags:
292+
- `--app-id` (variable, required): appId
293+
- `--agent-limit` (variable): agentLimit
294+
- `--credential-limit` (variable): credentialLimit
295+
- Notes:
296+
- Uses POST /graphql on the console default hostname (/api).
297+
- Known errors:
298+
- HTTP 401: Missing, invalid, or revoked personal access token.
299+
300+
### `mosoo console apps control-plane-overview`
301+
302+
- Summary: Control plane overview
303+
- HTTP: `POST /graphql`
304+
- Auth: required
305+
- Body: required; templated body, set inputs under `variables` with --set/--set-str/--file
306+
- Flags:
307+
- `--app-limit` (variable): appLimit
308+
- `--agent-limit` (variable): agentLimit
309+
- `--credential-limit` (variable): credentialLimit
310+
- Notes:
311+
- Uses POST /graphql on the console default hostname (/api).
312+
- Known errors:
313+
- HTTP 401: Missing, invalid, or revoked personal access token.
314+
285315
### `mosoo console apps create-app`
286316

287317
- Summary: Create an app
@@ -749,7 +779,7 @@ mosoo console apps create-app \
749779
- Flags:
750780
- `--input-app-id` (variable, required): input.appId
751781
- `--input-scope-id` (variable): input.scopeId
752-
- `--input-scope-kind` (variable, one of: agent_package|app_draft|library|session): input.scopeKind
782+
- `--input-scope-kind` (variable, one of: account|agent_package|app_draft|library|session): input.scopeKind
753783
- `--input-session-id` (variable): input.sessionId
754784
- `--input-session-kind` (variable, one of: artifact|attachment): input.sessionKind
755785
- Notes:
@@ -1131,6 +1161,25 @@ mosoo console apps create-app \
11311161
- Known errors:
11321162
- HTTP 401: Missing, invalid, or revoked personal access token.
11331163

1164+
### `mosoo console sessions start-agent-run`
1165+
1166+
- Summary: Start agent run
1167+
- HTTP: `POST /graphql`
1168+
- Auth: required
1169+
- Body: required; templated body, set inputs under `variables` with --set/--set-str/--file
1170+
- Flags:
1171+
- `--input-agent-id` (variable): input.agentId
1172+
- `--input-app-id` (variable, required): input.appId
1173+
- `--input-client-request-id` (variable): input.clientRequestId
1174+
- `--input-prompt` (variable, required): input.prompt
1175+
- `--input-session-id` (variable): input.sessionId
1176+
- `--input-type` (variable, one of: api_channel|preview|ui): input.type
1177+
- `--input-wait-for-runtime-ready` (variable): input.waitForRuntimeReady
1178+
- Notes:
1179+
- Uses POST /graphql on the console default hostname (/api).
1180+
- Known errors:
1181+
- HTTP 401: Missing, invalid, or revoked personal access token.
1182+
11341183
### `mosoo console sessions thread-agent-session-list`
11351184

11361185
- Summary: List thread agent sessions

publish/skills/mosoo/references/cli/modules/public-thread-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- Backend: `openapi3`
66
- Default hostname: `http://127.0.0.1:8787/api/v1`
7-
- Repository: file:///Users/xiaoke/new_mosoo/mosoo-cli-go/.cache/mosoo
7+
- Repository: file:///Users/x/git/lg/mosoo-cli/.cache/mosoo
88
- Pinned tag: `local-snapshot`
99
- Files: `docs/openapi/public-thread-api.openapi.json`
1010
- Resolved SHA: `local-snapshot`

specs/sources.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ sources:
2020
queries:
2121
- accessibleAgentList
2222
- agent
23-
- agentBuilderMessages
2423
- agentChannelBindingList
2524
- agentCostCard
2625
- agentEditorState
@@ -32,8 +31,10 @@ sources:
3231
- appEnvironmentList
3332
- appInfo
3433
- appList
34+
- appOverview
3535
- appSkillList
3636
- availableAgentModels
37+
- controlPlaneOverview
3738
- environment
3839
- exportAgentPackage
3940
- fileList
@@ -76,8 +77,6 @@ sources:
7677
- deleteMcpServer
7778
- deleteOwnedSkill
7879
- deleteVendorCredential
79-
- ensureAgentBuilderThread
80-
- executeAgentBuilderControlPlaneAction
8180
- importAgentPackage
8281
- onboardingBootstrap
8382
- pollLarkAgentChannelRegistration
@@ -96,6 +95,7 @@ sources:
9695
- setEnvironmentVariableValue
9796
- setMcpServerEnabled
9897
- setSystemAgentModel
98+
- startAgentRun
9999
- startLarkAgentChannelRegistration
100100
- startMcpOAuth
101101
- startWeChatAgentChannelPairing
@@ -126,11 +126,6 @@ sources:
126126
- unpublishAgent
127127
- updateAgentConfig
128128
group: Agents
129-
- match:
130-
- agentBuilderMessages
131-
- ensureAgentBuilderThread
132-
- executeAgentBuilderControlPlaneAction
133-
group: Builder
134129
- match:
135130
- agentChannelBindingList
136131
- createDiscordAgentChannelBinding
@@ -174,6 +169,8 @@ sources:
174169
group: Onboarding
175170
- match:
176171
- appList
172+
- appOverview
173+
- controlPlaneOverview
177174
- createApp
178175
- renameApp
179176
group: Apps
@@ -193,6 +190,7 @@ sources:
193190
- addSessionResource
194191
- createAgentSession
195192
- prewarmAgentSession
193+
- startAgentRun
196194
- archiveAgentSession
197195
- autoTitleSession
198196
- deleteAgentSession

0 commit comments

Comments
 (0)