@burdenoff/cli-sdk 2026.504.1
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 +60 -0
- package/dist/chunk-KTKHJORN.js +1 -0
- package/dist/chunk-MRONTCXQ.js +879 -0
- package/dist/chunk-RNWXATAC.js +32 -0
- package/dist/core/index.cjs +32 -0
- package/dist/core/index.d.cts +57 -0
- package/dist/core/index.d.ts +57 -0
- package/dist/core/index.js +1 -0
- package/dist/index.cjs +32 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -0
- package/dist/module-Bv5zhYt2.d.cts +166 -0
- package/dist/module-Bv5zhYt2.d.ts +166 -0
- package/dist/modules/auth/index.cjs +183 -0
- package/dist/modules/auth/index.d.cts +7 -0
- package/dist/modules/auth/index.d.ts +7 -0
- package/dist/modules/auth/index.js +160 -0
- package/dist/modules/billing/index.cjs +105 -0
- package/dist/modules/billing/index.d.cts +7 -0
- package/dist/modules/billing/index.d.ts +7 -0
- package/dist/modules/billing/index.js +105 -0
- package/dist/modules/channels/index.cjs +70 -0
- package/dist/modules/channels/index.d.cts +7 -0
- package/dist/modules/channels/index.d.ts +7 -0
- package/dist/modules/channels/index.js +70 -0
- package/dist/modules/conversations/index.cjs +37 -0
- package/dist/modules/conversations/index.d.cts +7 -0
- package/dist/modules/conversations/index.d.ts +7 -0
- package/dist/modules/conversations/index.js +37 -0
- package/dist/modules/devportal/index.cjs +133 -0
- package/dist/modules/devportal/index.d.cts +7 -0
- package/dist/modules/devportal/index.d.ts +7 -0
- package/dist/modules/devportal/index.js +133 -0
- package/dist/modules/export/index.cjs +37 -0
- package/dist/modules/export/index.d.cts +7 -0
- package/dist/modules/export/index.d.ts +7 -0
- package/dist/modules/export/index.js +37 -0
- package/dist/modules/files/index.cjs +49 -0
- package/dist/modules/files/index.d.cts +7 -0
- package/dist/modules/files/index.d.ts +7 -0
- package/dist/modules/files/index.js +49 -0
- package/dist/modules/groups/index.cjs +67 -0
- package/dist/modules/groups/index.d.cts +7 -0
- package/dist/modules/groups/index.d.ts +7 -0
- package/dist/modules/groups/index.js +67 -0
- package/dist/modules/health/index.cjs +1 -0
- package/dist/modules/health/index.d.cts +7 -0
- package/dist/modules/health/index.d.ts +7 -0
- package/dist/modules/health/index.js +1 -0
- package/dist/modules/integrations/index.cjs +44 -0
- package/dist/modules/integrations/index.d.cts +7 -0
- package/dist/modules/integrations/index.d.ts +7 -0
- package/dist/modules/integrations/index.js +44 -0
- package/dist/modules/notifications/index.cjs +26 -0
- package/dist/modules/notifications/index.d.cts +7 -0
- package/dist/modules/notifications/index.d.ts +7 -0
- package/dist/modules/notifications/index.js +26 -0
- package/dist/modules/organizations/index.cjs +53 -0
- package/dist/modules/organizations/index.d.cts +7 -0
- package/dist/modules/organizations/index.d.ts +7 -0
- package/dist/modules/organizations/index.js +53 -0
- package/dist/modules/products/index.cjs +102 -0
- package/dist/modules/products/index.d.cts +7 -0
- package/dist/modules/products/index.d.ts +7 -0
- package/dist/modules/products/index.js +102 -0
- package/dist/modules/rbac/index.cjs +63 -0
- package/dist/modules/rbac/index.d.cts +7 -0
- package/dist/modules/rbac/index.d.ts +7 -0
- package/dist/modules/rbac/index.js +63 -0
- package/dist/modules/sandbox/index.cjs +33 -0
- package/dist/modules/sandbox/index.d.cts +7 -0
- package/dist/modules/sandbox/index.d.ts +7 -0
- package/dist/modules/sandbox/index.js +1 -0
- package/dist/modules/scheduler/index.cjs +32 -0
- package/dist/modules/scheduler/index.d.cts +7 -0
- package/dist/modules/scheduler/index.d.ts +7 -0
- package/dist/modules/scheduler/index.js +32 -0
- package/dist/modules/security/index.cjs +69 -0
- package/dist/modules/security/index.d.cts +7 -0
- package/dist/modules/security/index.d.ts +7 -0
- package/dist/modules/security/index.js +69 -0
- package/dist/modules/store/index.cjs +63 -0
- package/dist/modules/store/index.d.cts +7 -0
- package/dist/modules/store/index.d.ts +7 -0
- package/dist/modules/store/index.js +63 -0
- package/dist/modules/support/index.cjs +45 -0
- package/dist/modules/support/index.d.cts +7 -0
- package/dist/modules/support/index.d.ts +7 -0
- package/dist/modules/support/index.js +45 -0
- package/dist/modules/tags/index.cjs +54 -0
- package/dist/modules/tags/index.d.cts +7 -0
- package/dist/modules/tags/index.d.ts +7 -0
- package/dist/modules/tags/index.js +54 -0
- package/dist/modules/tours/index.cjs +48 -0
- package/dist/modules/tours/index.d.cts +7 -0
- package/dist/modules/tours/index.d.ts +7 -0
- package/dist/modules/tours/index.js +48 -0
- package/dist/modules/vibecontrols/index.cjs +844 -0
- package/dist/modules/vibecontrols/index.d.cts +7 -0
- package/dist/modules/vibecontrols/index.d.ts +7 -0
- package/dist/modules/vibecontrols/index.js +2 -0
- package/dist/modules/workspaces/index.cjs +90 -0
- package/dist/modules/workspaces/index.d.cts +7 -0
- package/dist/modules/workspaces/index.d.ts +7 -0
- package/dist/modules/workspaces/index.js +77 -0
- package/package.json +104 -0
|
@@ -0,0 +1,844 @@
|
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var W=["workspaceEndpoint","globalEndpoint","oidcIssuer","clientId","defaultFormat","verbose","authServiceEndpoint"];var u=class extends Error{exitCode;hint;constructor(o,e){super(o),this.name="CliUserError",this.exitCode=e?.exitCode??1,this.hint=e?.hint;}},_=class extends u{constructor(o,e){super(o,{exitCode:2,hint:e?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},C=class extends Error{cause;constructor(o,e){super(o),this.name="CliInternalError",this.cause=e;}};var K=null;function Q(d){K=d;}function S(){if(!K)throw new C("vibecontrols module helpers used before setHelpersContext was called");return K}function ui(){let d=S();if(!d.auth.isAuthenticated())throw new _(`Authentication required. Run \`${d.productName} auth login\`.`)}async function i(d,o){return ui(),S().gql.workspace.request(d,o)}function r(d){let o=d instanceof Error?d.message:String(d);throw new u(o)}function c(d,o,e){S().output.formatAndOutput(d,o,e);}function a(d){S().output.printSuccess(d);}function T(d){S().output.printError(d);}function Z(d){S().output.printJson(d);}function y(d){return S().output.formatStatus(d)}function I(d){return S().output.formatDate(d)}function m(d,o){return S().output.truncate(d,o)}function g(d,o){return S().output.confirm(d,o)}function tt(d,o){S().output.printTable(d,o);}function P(){return S().auth.read()}function et(){return S().config.read()}function nt(d){return S().config.get(d)}function ot(d,o){S().config.set(d,o);}function it(){return S().config.path()}var j=W;var k=`
|
|
2
|
+
id name hostname platform architecture version
|
|
3
|
+
tunnelUrl tunnelStatus apiUrl isActive lastHeartbeat
|
|
4
|
+
workspaceId createdAt updatedAt
|
|
5
|
+
`,h=`
|
|
6
|
+
id name description path type status agentId parentId
|
|
7
|
+
gitBranch gitRemote tags metadata
|
|
8
|
+
workspaceId archivedAt createdAt updatedAt
|
|
9
|
+
`,D=`
|
|
10
|
+
id name command workingDirectory type status agentId vibeId
|
|
11
|
+
providerSessionName pid exitCode ttydUrl lastOutput autoStart
|
|
12
|
+
startedAt stoppedAt workspaceId createdAt updatedAt
|
|
13
|
+
`,b=`
|
|
14
|
+
id title content isPinned vibeId createdBy
|
|
15
|
+
workspaceId createdAt updatedAt
|
|
16
|
+
`,G=`
|
|
17
|
+
id key value scope scopeId isSecret
|
|
18
|
+
workspaceId createdAt updatedAt
|
|
19
|
+
`,$=`
|
|
20
|
+
id name url events agentIds isActive signingKey retryPolicy
|
|
21
|
+
deliveryCount failureCount lastDelivery lastError
|
|
22
|
+
workspaceId createdAt updatedAt
|
|
23
|
+
`,O=`
|
|
24
|
+
id userId state activeVibeId activeSessionId
|
|
25
|
+
recentVibes recentSessions workspaceId createdAt updatedAt
|
|
26
|
+
`,A=`
|
|
27
|
+
id workspaceId slug name description
|
|
28
|
+
providerKey protocol localPort localHost tlsMode
|
|
29
|
+
status lastError agentId
|
|
30
|
+
hasBasicAuth
|
|
31
|
+
primaryDomain { id hostname type verificationStatus isPrimary }
|
|
32
|
+
createdAt updatedAt
|
|
33
|
+
`,mi=`
|
|
34
|
+
id key displayName description isEnabled
|
|
35
|
+
capabilities {
|
|
36
|
+
supportsHttp supportsHttps supportsTcp supportsUdp
|
|
37
|
+
supportsCustomDomains supportsManagedSubdomains
|
|
38
|
+
supportsReservedSubdomain supportsSessionTokens
|
|
39
|
+
supportsLiveLogs supportsUsageMetrics supportsRotateCredentials
|
|
40
|
+
supportedVisibilities platforms
|
|
41
|
+
}
|
|
42
|
+
`,B=`
|
|
43
|
+
id workspaceId tunnelId type hostname environment
|
|
44
|
+
verificationStatus challengeRecordName challengeToken
|
|
45
|
+
verifiedAt lastCheckedAt lastCheckError isPrimary
|
|
46
|
+
dnsTargetHint createdAt updatedAt
|
|
47
|
+
`,rt=`
|
|
48
|
+
id workspaceId tunnelId shardId agentId status
|
|
49
|
+
tokenFingerprint issuedAt expiresAt connectedAt disconnectedAt
|
|
50
|
+
revokedAt revokedReason clientIp bytesIn bytesOut
|
|
51
|
+
`,x=`
|
|
52
|
+
id name type host port username status
|
|
53
|
+
workspaceId createdAt updatedAt
|
|
54
|
+
`,J=`
|
|
55
|
+
id sourceAgentId targetId protocol status permissions
|
|
56
|
+
createdAt updatedAt
|
|
57
|
+
`,w=`
|
|
58
|
+
id name description isDefault
|
|
59
|
+
workspaceId createdAt updatedAt
|
|
60
|
+
`,N=`
|
|
61
|
+
id vibeDeckId label icon actionType command script webhookUrl
|
|
62
|
+
row column color category tags
|
|
63
|
+
confirmationRequired keyboardShortcut style sortOrder
|
|
64
|
+
createdAt updatedAt
|
|
65
|
+
`,q=`
|
|
66
|
+
id agentId source eventType payload
|
|
67
|
+
workspaceId createdAt
|
|
68
|
+
`,v=`
|
|
69
|
+
id vibeId name visibility runtime
|
|
70
|
+
workspaceId createdAt updatedAt
|
|
71
|
+
`,L=`
|
|
72
|
+
id siteId title slug content parentId sidebarPosition status
|
|
73
|
+
createdAt updatedAt
|
|
74
|
+
`,F=`
|
|
75
|
+
id siteId revisionNumber status buildDurationMs artifactSizeBytes
|
|
76
|
+
errorMessage publishedAt
|
|
77
|
+
createdAt updatedAt
|
|
78
|
+
`,st=`
|
|
79
|
+
id action resourceType resourceId actorId actorType
|
|
80
|
+
status description ipAddress userAgent requestId
|
|
81
|
+
workspaceId createdAt
|
|
82
|
+
`,H=`
|
|
83
|
+
id sessionId sharedWithId permission createdBy
|
|
84
|
+
createdAt updatedAt
|
|
85
|
+
`,at=`
|
|
86
|
+
id sessionId token permission expiresAt
|
|
87
|
+
createdAt
|
|
88
|
+
`,ct=`
|
|
89
|
+
query VibecontrolsAgents($filter: VibecontrolsAgentFilterInput) {
|
|
90
|
+
vibecontrolsAgents(filter: $filter) { ${k} }
|
|
91
|
+
}
|
|
92
|
+
`,dt=`
|
|
93
|
+
query VibecontrolsAgent($id: ID!) {
|
|
94
|
+
vibecontrolsAgent(id: $id) { ${k} }
|
|
95
|
+
}
|
|
96
|
+
`,pt=`
|
|
97
|
+
mutation UpdateVibecontrolsAgent($id: ID!, $input: UpdateVibecontrolsAgentInput!) {
|
|
98
|
+
updateVibecontrolsAgent(id: $id, input: $input) { ${k} }
|
|
99
|
+
}
|
|
100
|
+
`,ut=`
|
|
101
|
+
mutation DeleteVibecontrolsAgent($id: ID!) { deleteVibecontrolsAgent(id: $id) }
|
|
102
|
+
`,mt=`
|
|
103
|
+
mutation VibecontrolsAgentHeartbeat($id: ID!) {
|
|
104
|
+
vibecontrolsAgentHeartbeat(id: $id) { id isActive lastHeartbeat }
|
|
105
|
+
}
|
|
106
|
+
`,gt=`
|
|
107
|
+
query ProbeAgentConnection($id: ID!) {
|
|
108
|
+
probeAgentConnection(id: $id) {
|
|
109
|
+
healthOk healthStatus agentVersion hostname platform architecture uptime
|
|
110
|
+
healthError identityOk identityError
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
`,lt=`
|
|
114
|
+
query { vibecontrolsAgentHealthProbes {
|
|
115
|
+
agentId agentName healthy tunnelUrl agentVersion uptime errorMessage
|
|
116
|
+
}}
|
|
117
|
+
`,ft=`
|
|
118
|
+
query AgentPlugins($agentId: ID!) {
|
|
119
|
+
agentPlugins(agentId: $agentId) {
|
|
120
|
+
installed { pluginName packageName version loaded isCore tags }
|
|
121
|
+
available { name packageName version installed }
|
|
122
|
+
error
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
`,It=`
|
|
126
|
+
mutation InstallAgentPlugin($agentId: ID!, $packageName: String!) {
|
|
127
|
+
installAgentPlugin(agentId: $agentId, packageName: $packageName) { success error }
|
|
128
|
+
}
|
|
129
|
+
`,St=`
|
|
130
|
+
mutation RemoveAgentPlugin($agentId: ID!, $packageName: String!) {
|
|
131
|
+
removeAgentPlugin(agentId: $agentId, packageName: $packageName) { success error }
|
|
132
|
+
}
|
|
133
|
+
`,Y=`
|
|
134
|
+
mutation RegisterVibecontrolsAgent($input: CreateVibecontrolsAgentInput!) {
|
|
135
|
+
registerVibecontrolsAgent(input: $input) { ${k} }
|
|
136
|
+
}
|
|
137
|
+
`,Et=`
|
|
138
|
+
mutation DeactivateVibecontrolsAgent($id: ID!) {
|
|
139
|
+
deactivateVibecontrolsAgent(id: $id) { ${k} }
|
|
140
|
+
}
|
|
141
|
+
`,Tt=`
|
|
142
|
+
mutation PushAgentGatewayAuth($input: PushAgentGatewayAuthInput!) {
|
|
143
|
+
pushAgentGatewayAuth(input: $input)
|
|
144
|
+
}
|
|
145
|
+
`,yt=`
|
|
146
|
+
mutation SetupAgentGatewayAuth($input: SetupAgentGatewayAuthInput!) {
|
|
147
|
+
setupAgentGatewayAuth(input: $input)
|
|
148
|
+
}
|
|
149
|
+
`,ht=`
|
|
150
|
+
mutation UpdateAgentVersion($agentId: ID!, $version: String!) {
|
|
151
|
+
updateAgentVersion(agentId: $agentId, version: $version) { ${k} }
|
|
152
|
+
}
|
|
153
|
+
`,Dt=`
|
|
154
|
+
mutation ConnectAgentToTarget($sourceAgentId: ID!, $targetId: ID!, $protocol: String!) {
|
|
155
|
+
connectAgentToTarget(sourceAgentId: $sourceAgentId, targetId: $targetId, protocol: $protocol) { ${J} }
|
|
156
|
+
}
|
|
157
|
+
`,bt=`
|
|
158
|
+
mutation DisconnectAgentFromTarget($connectionId: ID!) {
|
|
159
|
+
disconnectAgentFromTarget(connectionId: $connectionId)
|
|
160
|
+
}
|
|
161
|
+
`,At=`
|
|
162
|
+
query AgentGraph($workspaceId: ID!, $rootAgentId: ID) {
|
|
163
|
+
agentGraph(workspaceId: $workspaceId, rootAgentId: $rootAgentId) {
|
|
164
|
+
agents { ${k} }
|
|
165
|
+
connections { ${J} }
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
`,kt=`
|
|
169
|
+
query Vibes($filter: VibeFilterInput, $pagination: PaginationInput) {
|
|
170
|
+
vibes(filter: $filter, pagination: $pagination) {
|
|
171
|
+
items { ${h} } total hasMore
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
`,Ct=`
|
|
175
|
+
query Vibe($id: ID!) { vibe(id: $id) { ${h} } }
|
|
176
|
+
`,$t=`
|
|
177
|
+
mutation CreateVibe($input: CreateVibeInput!) {
|
|
178
|
+
createVibe(input: $input) { ${h} }
|
|
179
|
+
}
|
|
180
|
+
`,Ot=`
|
|
181
|
+
mutation UpdateVibe($id: ID!, $input: UpdateVibeInput!) {
|
|
182
|
+
updateVibe(id: $id, input: $input) { ${h} }
|
|
183
|
+
}
|
|
184
|
+
`,wt="mutation DeleteVibe($id: ID!) { deleteVibe(id: $id) }",_t=`
|
|
185
|
+
mutation ArchiveVibe($id: ID!) { archiveVibe(id: $id) { ${h} } }
|
|
186
|
+
`,Nt=`
|
|
187
|
+
mutation RestoreVibe($id: ID!) { restoreVibe(id: $id) { ${h} } }
|
|
188
|
+
`,vt=`
|
|
189
|
+
query VibeHierarchy($rootId: ID) {
|
|
190
|
+
vibeHierarchy(rootId: $rootId) { ${h} }
|
|
191
|
+
}
|
|
192
|
+
`,Rt=`
|
|
193
|
+
query SearchVibes($query: String!, $limit: Int) {
|
|
194
|
+
searchVibes(query: $query, limit: $limit) { ${h} }
|
|
195
|
+
}
|
|
196
|
+
`,xt=`
|
|
197
|
+
mutation MoveVibe($id: ID!, $newParentId: ID) {
|
|
198
|
+
moveVibe(id: $id, newParentId: $newParentId) { ${h} }
|
|
199
|
+
}
|
|
200
|
+
`,Lt=`
|
|
201
|
+
mutation UpdateVibeStatus($id: ID!, $status: VibeStatus!) {
|
|
202
|
+
updateVibeStatus(id: $id, status: $status) { ${h} }
|
|
203
|
+
}
|
|
204
|
+
`,Ut=`
|
|
205
|
+
mutation UpdateVibeGit($id: ID!, $gitBranch: String, $gitRemote: String, $gitStatus: JSON) {
|
|
206
|
+
updateVibeGit(id: $id, gitBranch: $gitBranch, gitRemote: $gitRemote, gitStatus: $gitStatus) { ${h} }
|
|
207
|
+
}
|
|
208
|
+
`,Vt=`
|
|
209
|
+
query Sessions($filter: SessionFilterInput, $pagination: PaginationInput) {
|
|
210
|
+
sessions(filter: $filter, pagination: $pagination) {
|
|
211
|
+
items { ${D} } total hasMore
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
`,Pt=`
|
|
215
|
+
query Session($id: ID!) { session(id: $id) { ${D} } }
|
|
216
|
+
`,Gt=`
|
|
217
|
+
mutation CreateSession($input: CreateSessionInput!) {
|
|
218
|
+
createSession(input: $input) { ${D} }
|
|
219
|
+
}
|
|
220
|
+
`,Bt=`
|
|
221
|
+
mutation StartSession($id: ID!) { startSession(id: $id) { ${D} } }
|
|
222
|
+
`,qt=`
|
|
223
|
+
mutation StopSession($id: ID!) { stopSession(id: $id) { ${D} } }
|
|
224
|
+
`,Ft=`
|
|
225
|
+
mutation RestartSession($id: ID!) { restartSession(id: $id) { ${D} } }
|
|
226
|
+
`,Ht=`
|
|
227
|
+
mutation TerminateSession($id: ID!) { terminateSession(id: $id) }
|
|
228
|
+
`,Mt=`
|
|
229
|
+
query SessionOutput($id: ID!, $lines: Int) { sessionOutput(id: $id, lines: $lines) }
|
|
230
|
+
`,Wt=`
|
|
231
|
+
mutation SendSessionInput($id: ID!, $input: String!) {
|
|
232
|
+
sendSessionInput(id: $id, input: $input)
|
|
233
|
+
}
|
|
234
|
+
`,Kt=`
|
|
235
|
+
mutation StartSessionTerminal($id: ID!) {
|
|
236
|
+
startSessionTerminal(id: $id) { ${D} }
|
|
237
|
+
}
|
|
238
|
+
`,jt=`
|
|
239
|
+
mutation StopSessionTerminal($id: ID!) {
|
|
240
|
+
stopSessionTerminal(id: $id) { ${D} }
|
|
241
|
+
}
|
|
242
|
+
`,Jt=`
|
|
243
|
+
mutation RestartSessionTerminal($id: ID!) {
|
|
244
|
+
restartSessionTerminal(id: $id) { ${D} }
|
|
245
|
+
}
|
|
246
|
+
`,Yt=`
|
|
247
|
+
query ActiveSessions($vibeId: ID) {
|
|
248
|
+
activeSessions(vibeId: $vibeId) { ${D} }
|
|
249
|
+
}
|
|
250
|
+
`,zt=`
|
|
251
|
+
mutation CheckSessionHealth {
|
|
252
|
+
checkSessionHealth { checked updated errors }
|
|
253
|
+
}
|
|
254
|
+
`,Xt=`
|
|
255
|
+
mutation ShareSession($input: ShareSessionInput!) {
|
|
256
|
+
shareSession(input: $input) { ${H} }
|
|
257
|
+
}
|
|
258
|
+
`,Qt=`
|
|
259
|
+
mutation CreateSessionShareLink($input: CreateSessionShareLinkInput!) {
|
|
260
|
+
createSessionShareLink(input: $input) { ${at} }
|
|
261
|
+
}
|
|
262
|
+
`,Zt=`
|
|
263
|
+
mutation RevokeSessionShare($id: ID!) { revokeSessionShare(id: $id) }
|
|
264
|
+
`,te=`
|
|
265
|
+
mutation RevokeSessionShareLink($id: ID!) { revokeSessionShareLink(id: $id) }
|
|
266
|
+
`,ee=`
|
|
267
|
+
mutation UpdateSessionShare($id: ID!, $input: UpdateSessionShareInput!) {
|
|
268
|
+
updateSessionShare(id: $id, input: $input) { ${H} }
|
|
269
|
+
}
|
|
270
|
+
`,ne=`
|
|
271
|
+
mutation JoinSharedSession($input: JoinSharedSessionInput!) {
|
|
272
|
+
joinSharedSession(input: $input)
|
|
273
|
+
}
|
|
274
|
+
`,oe=`
|
|
275
|
+
mutation LeaveSharedSession($sessionId: ID!) { leaveSharedSession(sessionId: $sessionId) }
|
|
276
|
+
`,ie=`
|
|
277
|
+
mutation RequestSessionControl($sessionId: ID!) { requestSessionControl(sessionId: $sessionId) }
|
|
278
|
+
`,re=`
|
|
279
|
+
mutation ReleaseSessionControl($sessionId: ID!) { releaseSessionControl(sessionId: $sessionId) }
|
|
280
|
+
`,se=`
|
|
281
|
+
mutation TransferSessionControl($sessionId: ID!, $toUserId: ID!) {
|
|
282
|
+
transferSessionControl(sessionId: $sessionId, toUserId: $toUserId)
|
|
283
|
+
}
|
|
284
|
+
`,ae=`
|
|
285
|
+
query SessionShares($sessionId: ID!) {
|
|
286
|
+
sessionShares(sessionId: $sessionId) { ${H} }
|
|
287
|
+
}
|
|
288
|
+
`,ce=`
|
|
289
|
+
query SessionShareLinks($sessionId: ID!) {
|
|
290
|
+
sessionShareLinks(sessionId: $sessionId) { ${at} }
|
|
291
|
+
}
|
|
292
|
+
`,de=`
|
|
293
|
+
query SessionCollaborators($sessionId: ID!) {
|
|
294
|
+
sessionCollaborators(sessionId: $sessionId) { userId hasControl joinedAt }
|
|
295
|
+
}
|
|
296
|
+
`,pe=`
|
|
297
|
+
query SessionsSharedWithMe($filter: SessionShareFilterInput, $pagination: PaginationInput) {
|
|
298
|
+
sessionsSharedWithMe(filter: $filter, pagination: $pagination) { ${H} }
|
|
299
|
+
}
|
|
300
|
+
`,ue=`
|
|
301
|
+
mutation BulkRestartSessions($ids: [ID!]!) {
|
|
302
|
+
bulkRestartSessions(ids: $ids) { succeeded failed }
|
|
303
|
+
}
|
|
304
|
+
`,me=`
|
|
305
|
+
mutation BulkStopSessions($ids: [ID!]!) {
|
|
306
|
+
bulkStopSessions(ids: $ids) { succeeded failed }
|
|
307
|
+
}
|
|
308
|
+
`,ge=`
|
|
309
|
+
mutation BulkTerminateSessions($ids: [ID!]!) {
|
|
310
|
+
bulkTerminateSessions(ids: $ids) { succeeded failed }
|
|
311
|
+
}
|
|
312
|
+
`,le=`
|
|
313
|
+
query Notes($filter: VibecontrolsNoteFilterInput, $pagination: PaginationInput) {
|
|
314
|
+
notes(filter: $filter, pagination: $pagination) {
|
|
315
|
+
items { ${b} } total hasMore
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
`,fe=`
|
|
319
|
+
query Note($id: ID!) { note(id: $id) { ${b} } }
|
|
320
|
+
`,Ie=`
|
|
321
|
+
mutation CreateNote($input: CreateVibecontrolsNoteInput!) {
|
|
322
|
+
createNote(input: $input) { ${b} }
|
|
323
|
+
}
|
|
324
|
+
`,Se=`
|
|
325
|
+
mutation UpdateNote($id: ID!, $input: UpdateVibecontrolsNoteInput!) {
|
|
326
|
+
updateNote(id: $id, input: $input) { ${b} }
|
|
327
|
+
}
|
|
328
|
+
`,Ee="mutation DeleteNote($id: ID!) { deleteNote(id: $id) }",Te=`
|
|
329
|
+
query SearchNotes($query: String!, $vibeId: ID, $limit: Int) {
|
|
330
|
+
searchNotes(query: $query, vibeId: $vibeId, limit: $limit) { ${b} }
|
|
331
|
+
}
|
|
332
|
+
`,ye=`
|
|
333
|
+
mutation PinNote($id: ID!) { pinNote(id: $id) { ${b} } }
|
|
334
|
+
`,he=`
|
|
335
|
+
mutation UnpinNote($id: ID!) { unpinNote(id: $id) { ${b} } }
|
|
336
|
+
`,De=`
|
|
337
|
+
mutation TagNote($input: TagNoteInput!) {
|
|
338
|
+
tagNote(input: $input) { ${b} }
|
|
339
|
+
}
|
|
340
|
+
`,be=`
|
|
341
|
+
mutation UntagNote($input: UntagNoteInput!) {
|
|
342
|
+
untagNote(input: $input) { ${b} }
|
|
343
|
+
}
|
|
344
|
+
`,Ae=`
|
|
345
|
+
mutation ReplaceNoteTags($input: ReplaceNoteTagsInput!) {
|
|
346
|
+
replaceNoteTags(input: $input) { ${b} }
|
|
347
|
+
}
|
|
348
|
+
`,ke=`
|
|
349
|
+
mutation CreateNoteTag($input: CreateNoteTagInput!) {
|
|
350
|
+
createNoteTag(input: $input) { id name }
|
|
351
|
+
}
|
|
352
|
+
`,Ce=`
|
|
353
|
+
query AvailableNoteTags($query: String, $limit: Int) {
|
|
354
|
+
availableNoteTags(query: $query, limit: $limit) { id name }
|
|
355
|
+
}
|
|
356
|
+
`,$e=`
|
|
357
|
+
query GetNoteTags($noteId: ID!) { getNoteTags(noteId: $noteId) }
|
|
358
|
+
`,Oe=`
|
|
359
|
+
query GetRelatedNoteTags($noteId: ID!, $limit: Int) {
|
|
360
|
+
getRelatedNoteTags(noteId: $noteId, limit: $limit) { id name }
|
|
361
|
+
}
|
|
362
|
+
`,we=`
|
|
363
|
+
mutation BulkDeleteNotes($ids: [ID!]!) { bulkDeleteNotes(ids: $ids) }
|
|
364
|
+
`,_e=`
|
|
365
|
+
query ConfigurationsByScope($scope: ConfigScope!, $scopeId: ID) {
|
|
366
|
+
configurationsByScope(scope: $scope, scopeId: $scopeId) { ${G} }
|
|
367
|
+
}
|
|
368
|
+
`,Ne=`
|
|
369
|
+
query Configuration($key: String!, $scope: ConfigScope!, $scopeId: ID) {
|
|
370
|
+
configuration(key: $key, scope: $scope, scopeId: $scopeId) { ${G} }
|
|
371
|
+
}
|
|
372
|
+
`,ve=`
|
|
373
|
+
query ConfigurationValue($key: String!, $scope: ConfigScope!, $scopeId: ID) {
|
|
374
|
+
configurationValue(key: $key, scope: $scope, scopeId: $scopeId)
|
|
375
|
+
}
|
|
376
|
+
`,Re=`
|
|
377
|
+
mutation SetConfiguration($key: String!, $scope: ConfigScope!, $scopeId: ID, $value: JSON!, $isSecret: Boolean) {
|
|
378
|
+
setConfiguration(key: $key, scope: $scope, scopeId: $scopeId, value: $value, isSecret: $isSecret) { ${G} }
|
|
379
|
+
}
|
|
380
|
+
`,xe=`
|
|
381
|
+
mutation DeleteConfiguration($key: String!, $scope: ConfigScope!, $scopeId: ID) {
|
|
382
|
+
deleteConfiguration(key: $key, scope: $scope, scopeId: $scopeId)
|
|
383
|
+
}
|
|
384
|
+
`,Le=`
|
|
385
|
+
mutation BulkSetConfigurations($configurations: [BulkSetConfigurationInput!]!, $scope: ConfigScope!, $scopeId: ID) {
|
|
386
|
+
bulkSetConfigurations(configurations: $configurations, scope: $scope, scopeId: $scopeId) { ${G} }
|
|
387
|
+
}
|
|
388
|
+
`,Ue=`
|
|
389
|
+
mutation BulkDeleteConfigurations($keys: [String!]!, $scope: ConfigScope!, $scopeId: ID) {
|
|
390
|
+
bulkDeleteConfigurations(keys: $keys, scope: $scope, scopeId: $scopeId)
|
|
391
|
+
}
|
|
392
|
+
`,Ve=`
|
|
393
|
+
query Webhooks($filter: WebhookFilterInput, $pagination: PaginationInput) {
|
|
394
|
+
webhooks(filter: $filter, pagination: $pagination) {
|
|
395
|
+
items { ${$} } total hasMore
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
`,Pe=`
|
|
399
|
+
query Webhook($id: ID!) { webhook(id: $id) { ${$} } }
|
|
400
|
+
`,Ge=`
|
|
401
|
+
mutation CreateWebhook($input: CreateWebhookInput!) {
|
|
402
|
+
createWebhook(input: $input) { ${$} }
|
|
403
|
+
}
|
|
404
|
+
`,Be=`
|
|
405
|
+
mutation UpdateWebhook($id: ID!, $input: UpdateWebhookInput!) {
|
|
406
|
+
updateWebhook(id: $id, input: $input) { ${$} }
|
|
407
|
+
}
|
|
408
|
+
`,qe=`
|
|
409
|
+
mutation DeleteWebhook($id: ID!) { deleteWebhook(id: $id) }
|
|
410
|
+
`,Fe=`
|
|
411
|
+
mutation TestWebhook($id: ID!) { testWebhook(id: $id) }
|
|
412
|
+
`,He=`
|
|
413
|
+
query { activeWebhooks { ${$} } }
|
|
414
|
+
`,Me=`
|
|
415
|
+
query WebhooksByEvent($event: String!) {
|
|
416
|
+
webhooksByEvent(event: $event) { ${$} }
|
|
417
|
+
}
|
|
418
|
+
`,We=`
|
|
419
|
+
mutation TriggerWebhook($id: ID!, $payload: JSON) {
|
|
420
|
+
triggerWebhook(id: $id, payload: $payload)
|
|
421
|
+
}
|
|
422
|
+
`,Ke=`
|
|
423
|
+
mutation ResetWebhookFailures($id: ID!) {
|
|
424
|
+
resetWebhookFailures(id: $id) { ${$} }
|
|
425
|
+
}
|
|
426
|
+
`,je=`
|
|
427
|
+
query ListTunnels($filter: TunnelFilterInput, $pagination: PaginationInput) {
|
|
428
|
+
tunnels(filter: $filter, pagination: $pagination) {
|
|
429
|
+
items { ${A} }
|
|
430
|
+
total
|
|
431
|
+
hasMore
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
`,Je=`
|
|
435
|
+
query GetTunnel($id: ID!) {
|
|
436
|
+
tunnel(id: $id) { ${A} }
|
|
437
|
+
}
|
|
438
|
+
`,Ye=`
|
|
439
|
+
query ListTunnelProviders {
|
|
440
|
+
tunnelProviders { ${mi} }
|
|
441
|
+
}
|
|
442
|
+
`,ze=`
|
|
443
|
+
mutation CreateTunnel($input: CreateTunnelInput!) {
|
|
444
|
+
createTunnel(input: $input) { ${A} }
|
|
445
|
+
}
|
|
446
|
+
`,Xe=`
|
|
447
|
+
mutation DeleteTunnel($id: ID!) {
|
|
448
|
+
deleteTunnel(id: $id)
|
|
449
|
+
}
|
|
450
|
+
`,Qe=`
|
|
451
|
+
mutation StartTunnel($id: ID!) {
|
|
452
|
+
startTunnel(id: $id) { ${A} }
|
|
453
|
+
}
|
|
454
|
+
`,Ze=`
|
|
455
|
+
mutation StopTunnel($id: ID!) {
|
|
456
|
+
stopTunnel(id: $id) { ${A} }
|
|
457
|
+
}
|
|
458
|
+
`,tn=`
|
|
459
|
+
mutation RotateTunnelCredentials($id: ID!) {
|
|
460
|
+
rotateTunnelCredentials(id: $id) { ${A} }
|
|
461
|
+
}
|
|
462
|
+
`,en=`
|
|
463
|
+
mutation IssueTunnelSession($tunnelId: ID!, $ttlSeconds: Int) {
|
|
464
|
+
issueTunnelSession(tunnelId: $tunnelId, ttlSeconds: $ttlSeconds) {
|
|
465
|
+
session { ${rt} }
|
|
466
|
+
token
|
|
467
|
+
agentConfigHint
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
`,nn=`
|
|
471
|
+
query ListTunnelSessions($tunnelId: ID!, $pagination: PaginationInput) {
|
|
472
|
+
tunnelSessions(tunnelId: $tunnelId, pagination: $pagination) {
|
|
473
|
+
items { ${rt} }
|
|
474
|
+
total
|
|
475
|
+
hasMore
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
`,on=`
|
|
479
|
+
mutation RevokeTunnelSession($sessionId: ID!, $reason: String) {
|
|
480
|
+
revokeTunnelSession(sessionId: $sessionId, reason: $reason)
|
|
481
|
+
}
|
|
482
|
+
`,rn=`
|
|
483
|
+
mutation ReserveTunnelSubdomain($input: ReserveTunnelSubdomainInput!) {
|
|
484
|
+
reserveTunnelSubdomain(input: $input) { ${B} }
|
|
485
|
+
}
|
|
486
|
+
`,sn=`
|
|
487
|
+
mutation RegisterCustomTunnelDomain($input: RegisterCustomDomainInput!) {
|
|
488
|
+
registerCustomTunnelDomain(input: $input) { ${B} }
|
|
489
|
+
}
|
|
490
|
+
`,an=`
|
|
491
|
+
mutation AttachTunnelDomain($tunnelId: ID!, $domainId: ID!, $makePrimary: Boolean) {
|
|
492
|
+
attachTunnelDomain(tunnelId: $tunnelId, domainId: $domainId, makePrimary: $makePrimary) {
|
|
493
|
+
${A}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
`,cn=`
|
|
497
|
+
mutation DetachTunnelDomain($tunnelId: ID!, $domainId: ID!) {
|
|
498
|
+
detachTunnelDomain(tunnelId: $tunnelId, domainId: $domainId) { ${A} }
|
|
499
|
+
}
|
|
500
|
+
`,dn=`
|
|
501
|
+
mutation VerifyTunnelDomain($domainId: ID!) {
|
|
502
|
+
verifyTunnelDomain(domainId: $domainId) { ${B} }
|
|
503
|
+
}
|
|
504
|
+
`,pn=`
|
|
505
|
+
query ListTunnelDomains($tunnelId: ID, $filter: TunnelDomainFilterInput, $pagination: PaginationInput) {
|
|
506
|
+
tunnelDomains(tunnelId: $tunnelId, filter: $filter, pagination: $pagination) {
|
|
507
|
+
items { ${B} }
|
|
508
|
+
total
|
|
509
|
+
hasMore
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
`,un=`
|
|
513
|
+
query { uiSession { ${O} } }
|
|
514
|
+
`,mn=`
|
|
515
|
+
query UiSessionById($id: ID!) { uiSessionById(id: $id) { ${O} } }
|
|
516
|
+
`,gn=`
|
|
517
|
+
mutation { clearUISession }
|
|
518
|
+
`,ln=`
|
|
519
|
+
mutation UpdateActiveVibe($vibeId: ID!) {
|
|
520
|
+
updateActiveVibe(vibeId: $vibeId) { ${O} }
|
|
521
|
+
}
|
|
522
|
+
`,fn=`
|
|
523
|
+
mutation UpdateActiveSession($sessionId: ID!) {
|
|
524
|
+
updateActiveSession(sessionId: $sessionId) { ${O} }
|
|
525
|
+
}
|
|
526
|
+
`,In=`
|
|
527
|
+
mutation AddRecentVibe($vibeId: ID!) {
|
|
528
|
+
addRecentVibe(vibeId: $vibeId) { ${O} }
|
|
529
|
+
}
|
|
530
|
+
`,Sn=`
|
|
531
|
+
mutation AddRecentSession($sessionId: ID!) {
|
|
532
|
+
addRecentSession(sessionId: $sessionId) { ${O} }
|
|
533
|
+
}
|
|
534
|
+
`,En=`
|
|
535
|
+
query Targets($workspaceId: ID!, $filter: TargetFilterInput, $limit: Int, $offset: Int) {
|
|
536
|
+
targets(workspaceId: $workspaceId, filter: $filter, limit: $limit, offset: $offset) {
|
|
537
|
+
items { ${x} } total hasMore
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
`,Tn=`
|
|
541
|
+
query Target($id: ID!) { target(id: $id) { ${x} } }
|
|
542
|
+
`,yn=`
|
|
543
|
+
mutation CreateTarget($workspaceId: ID!, $input: CreateTargetInput!) {
|
|
544
|
+
createTarget(workspaceId: $workspaceId, input: $input) { ${x} }
|
|
545
|
+
}
|
|
546
|
+
`,hn=`
|
|
547
|
+
mutation UpdateTarget($id: ID!, $input: UpdateTargetInput!) {
|
|
548
|
+
updateTarget(id: $id, input: $input) { ${x} }
|
|
549
|
+
}
|
|
550
|
+
`,Dn=`
|
|
551
|
+
mutation DeleteTarget($id: ID!) { deleteTarget(id: $id) }
|
|
552
|
+
`,bn=`
|
|
553
|
+
mutation TestTarget($id: ID!) {
|
|
554
|
+
testTarget(id: $id) { success error latencyMs }
|
|
555
|
+
}
|
|
556
|
+
`,An=`
|
|
557
|
+
mutation ScanSSHConfig($agentId: ID!, $configPath: String) {
|
|
558
|
+
scanSSHConfig(agentId: $agentId, configPath: $configPath) {
|
|
559
|
+
configPath total hosts { name hostname port user identityFile proxyJump }
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
`,kn=`
|
|
563
|
+
mutation InstallAgentOnTarget($sourceAgentId: ID!, $targetId: ID!, $agentPort: Int) {
|
|
564
|
+
installAgentOnTarget(sourceAgentId: $sourceAgentId, targetId: $targetId, agentPort: $agentPort) { success error }
|
|
565
|
+
}
|
|
566
|
+
`,Cn=`
|
|
567
|
+
mutation UninstallAgentFromTarget($targetId: ID!) {
|
|
568
|
+
uninstallAgentFromTarget(targetId: $targetId) { success error }
|
|
569
|
+
}
|
|
570
|
+
`,$n=`
|
|
571
|
+
mutation StartTerminal($targetId: ID!, $shell: String) {
|
|
572
|
+
startTerminal(targetId: $targetId, shell: $shell) { sessionId ttydUrl }
|
|
573
|
+
}
|
|
574
|
+
`,On=`
|
|
575
|
+
mutation StopTerminal($sessionId: ID!) { stopTerminal(sessionId: $sessionId) }
|
|
576
|
+
`,wn=`
|
|
577
|
+
query VibeDecks($filter: VibeDeckFilterInput, $pagination: PaginationInput) {
|
|
578
|
+
vibeDecks(filter: $filter, pagination: $pagination) {
|
|
579
|
+
items { ${w} } total hasMore
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
`,_n=`
|
|
583
|
+
query VibeDeck($id: ID!) { vibeDeck(id: $id) { ${w} } }
|
|
584
|
+
`,Nn=`
|
|
585
|
+
query { defaultVibeDeck { ${w} } }
|
|
586
|
+
`,vn=`
|
|
587
|
+
mutation CreateVibeDeck($input: CreateVibeDeckInput!) {
|
|
588
|
+
createVibeDeck(input: $input) { ${w} }
|
|
589
|
+
}
|
|
590
|
+
`,Rn=`
|
|
591
|
+
mutation UpdateVibeDeck($id: ID!, $input: UpdateVibeDeckInput!) {
|
|
592
|
+
updateVibeDeck(id: $id, input: $input) { ${w} }
|
|
593
|
+
}
|
|
594
|
+
`,xn=`
|
|
595
|
+
mutation DuplicateVibeDeck($id: ID!, $name: String) {
|
|
596
|
+
duplicateVibeDeck(id: $id, name: $name) { ${w} }
|
|
597
|
+
}
|
|
598
|
+
`,Ln=`
|
|
599
|
+
mutation DeleteVibeDeck($id: ID!) { deleteVibeDeck(id: $id) }
|
|
600
|
+
`,Un=`
|
|
601
|
+
mutation SetDefaultVibeDeck($id: ID!) {
|
|
602
|
+
setDefaultVibeDeck(id: $id) { ${w} }
|
|
603
|
+
}
|
|
604
|
+
`,Vn=`
|
|
605
|
+
query VibeDeckButtons($filter: VibeDeckButtonFilterInput, $pagination: PaginationInput) {
|
|
606
|
+
vibeDeckButtons(filter: $filter, pagination: $pagination) {
|
|
607
|
+
items { ${N} } total hasMore
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
`,Pn=`
|
|
611
|
+
query VibeDeckButton($id: ID!) { vibeDeckButton(id: $id) { ${N} } }
|
|
612
|
+
`,Gn=`
|
|
613
|
+
mutation CreateVibeDeckButton($input: CreateVibeDeckButtonInput!) {
|
|
614
|
+
createVibeDeckButton(input: $input) { ${N} }
|
|
615
|
+
}
|
|
616
|
+
`,Bn=`
|
|
617
|
+
mutation UpdateVibeDeckButton($id: ID!, $input: UpdateVibeDeckButtonInput!) {
|
|
618
|
+
updateVibeDeckButton(id: $id, input: $input) { ${N} }
|
|
619
|
+
}
|
|
620
|
+
`,qn=`
|
|
621
|
+
mutation DeleteVibeDeckButton($id: ID!) { deleteVibeDeckButton(id: $id) }
|
|
622
|
+
`,Fn=`
|
|
623
|
+
mutation MoveVibeDeckButton($id: ID!, $input: MoveVibeDeckButtonInput!) {
|
|
624
|
+
moveVibeDeckButton(id: $id, input: $input) { ${N} }
|
|
625
|
+
}
|
|
626
|
+
`,Hn=`
|
|
627
|
+
mutation ReorderVibeDeckButtons($vibeDeckId: ID!, $positions: [VibeDeckButtonPositionInput!]!) {
|
|
628
|
+
reorderVibeDeckButtons(vibeDeckId: $vibeDeckId, positions: $positions) { ${N} }
|
|
629
|
+
}
|
|
630
|
+
`,Mn=`
|
|
631
|
+
mutation ExecuteVibeDeckButton($id: ID!, $agentId: ID!) {
|
|
632
|
+
executeVibeDeckButton(id: $id, agentId: $agentId) { success output error }
|
|
633
|
+
}
|
|
634
|
+
`,R=`
|
|
635
|
+
id workspaceId name displayName description icon color
|
|
636
|
+
actionType sourceType triggerType
|
|
637
|
+
command workingDirectory environmentVariables
|
|
638
|
+
targetAgentId script scriptInterpreter
|
|
639
|
+
webhookUrl webhookMethod webhookHeaders webhookBody webhookAuthType
|
|
640
|
+
schedule eventFilters timeoutMs retryCount confirmationRequired
|
|
641
|
+
category tags metadata storeItemId storeVersion
|
|
642
|
+
createdAt updatedAt deletedAt
|
|
643
|
+
`,M=`
|
|
644
|
+
id actionId workspaceId
|
|
645
|
+
triggerType triggerSource status
|
|
646
|
+
agentId command script output exitCode
|
|
647
|
+
webhookStatusCode errorMessage metadata
|
|
648
|
+
startedAt completedAt durationMs
|
|
649
|
+
createdAt
|
|
650
|
+
`,Wn=`
|
|
651
|
+
query Actions($filter: ActionFilterInput, $pagination: PaginationInput) {
|
|
652
|
+
actions(filter: $filter, pagination: $pagination) {
|
|
653
|
+
items { ${R} } total hasMore
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
`,Kn=`
|
|
657
|
+
query Action($id: ID!) { action(id: $id) { ${R} } }
|
|
658
|
+
`,jn=`
|
|
659
|
+
mutation CreateAction($input: CreateActionInput!) {
|
|
660
|
+
createAction(input: $input) { ${R} }
|
|
661
|
+
}
|
|
662
|
+
`,Jn=`
|
|
663
|
+
mutation UpdateAction($id: ID!, $input: UpdateActionInput!) {
|
|
664
|
+
updateAction(id: $id, input: $input) { ${R} }
|
|
665
|
+
}
|
|
666
|
+
`,Yn=`
|
|
667
|
+
mutation DeleteAction($id: ID!) { deleteAction(id: $id) }
|
|
668
|
+
`,zn=`
|
|
669
|
+
mutation DuplicateAction($id: ID!, $name: String) {
|
|
670
|
+
duplicateAction(id: $id, name: $name) { ${R} }
|
|
671
|
+
}
|
|
672
|
+
`,Xn=`
|
|
673
|
+
mutation ExecuteAction($id: ID!, $input: ExecuteActionInput) {
|
|
674
|
+
executeAction(id: $id, input: $input) { ${M} }
|
|
675
|
+
}
|
|
676
|
+
`,Qn=`
|
|
677
|
+
mutation InstallActionFromStore($storeItemId: ID!, $version: String, $name: String) {
|
|
678
|
+
installActionFromStore(storeItemId: $storeItemId, version: $version, name: $name) { ${R} }
|
|
679
|
+
}
|
|
680
|
+
`,Zn=`
|
|
681
|
+
mutation CancelActionExecution($id: ID!) {
|
|
682
|
+
cancelActionExecution(id: $id) { ${M} }
|
|
683
|
+
}
|
|
684
|
+
`,to=`
|
|
685
|
+
query ActionExecutions($filter: ActionExecutionFilterInput, $pagination: PaginationInput) {
|
|
686
|
+
actionExecutions(filter: $filter, pagination: $pagination) {
|
|
687
|
+
items { ${M} } total hasMore
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
`,eo=`
|
|
691
|
+
query ActionExecution($id: ID!) { actionExecution(id: $id) { ${M} } }
|
|
692
|
+
`,no=`
|
|
693
|
+
id name scheduleType status actionId
|
|
694
|
+
cronExpression timezone scheduledAt
|
|
695
|
+
interval intervalUnit startDate endDate
|
|
696
|
+
nextExecutionAt lastExecutionAt
|
|
697
|
+
priority tags
|
|
698
|
+
`,oo=`
|
|
699
|
+
mutation CreateScheduledJob($workspaceId: ID!, $input: CreateScheduledJobInput!) {
|
|
700
|
+
createScheduledJob(workspaceId: $workspaceId, input: $input) { ${no} }
|
|
701
|
+
}
|
|
702
|
+
`,io=`
|
|
703
|
+
mutation DeleteScheduledJob($id: ID!) { deleteScheduledJob(id: $id) }
|
|
704
|
+
`,ro=`
|
|
705
|
+
query ScheduledJobs($workspaceId: ID!, $filter: JobFilterInput, $pagination: SchedulerPaginationInput) {
|
|
706
|
+
scheduledJobs(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {
|
|
707
|
+
jobs { ${no} }
|
|
708
|
+
total hasMore
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
`,so=`
|
|
712
|
+
query AiToolEvents($filter: AiToolEventFilterInput, $pagination: PaginationInput) {
|
|
713
|
+
aiToolEvents(filter: $filter, pagination: $pagination) {
|
|
714
|
+
items { ${q} } total hasMore
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
`,ao=`
|
|
718
|
+
query AiToolEvent($id: ID!) { aiToolEvent(id: $id) { ${q} } }
|
|
719
|
+
`,co=`
|
|
720
|
+
query RecentAiToolEvents($agentId: ID!, $limit: Int) {
|
|
721
|
+
recentAiToolEvents(agentId: $agentId, limit: $limit) { ${q} }
|
|
722
|
+
}
|
|
723
|
+
`,po=`
|
|
724
|
+
mutation CreateAiToolEvent($input: CreateAiToolEventInput!) {
|
|
725
|
+
createAiToolEvent(input: $input) { ${q} }
|
|
726
|
+
}
|
|
727
|
+
`,uo=`
|
|
728
|
+
mutation DeleteOldAiToolEvents($beforeDate: DateTime!) {
|
|
729
|
+
deleteOldAiToolEvents(beforeDate: $beforeDate)
|
|
730
|
+
}
|
|
731
|
+
`,mo=`
|
|
732
|
+
query DocsSites($filter: VibecontrolsDocsSiteFilterInput, $pagination: PaginationInput) {
|
|
733
|
+
docsSites(filter: $filter, pagination: $pagination) {
|
|
734
|
+
items { ${v} } total hasMore
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
`,go=`
|
|
738
|
+
query DocsSite($vibeId: ID!) { docsSite(vibeId: $vibeId) { ${v} } }
|
|
739
|
+
`,lo=`
|
|
740
|
+
mutation CreateDocsSite($input: CreateVibecontrolsDocsSiteInput!) {
|
|
741
|
+
createDocsSite(input: $input) { ${v} }
|
|
742
|
+
}
|
|
743
|
+
`,fo=`
|
|
744
|
+
mutation UpdateDocsSite($id: ID!, $input: UpdateVibecontrolsDocsSiteInput!) {
|
|
745
|
+
updateDocsSite(id: $id, input: $input) { ${v} }
|
|
746
|
+
}
|
|
747
|
+
`,Io=`
|
|
748
|
+
mutation UpdateDocsSiteVisibility($id: ID!, $visibility: VibecontrolsDocsSiteVisibility!) {
|
|
749
|
+
updateDocsSiteVisibility(id: $id, visibility: $visibility) { ${v} }
|
|
750
|
+
}
|
|
751
|
+
`,So=`
|
|
752
|
+
mutation DeleteDocsSite($id: ID!) { deleteDocsSite(id: $id) }
|
|
753
|
+
`,Eo=`
|
|
754
|
+
query DocsPages($siteId: ID!, $filter: VibecontrolsDocsPageFilterInput) {
|
|
755
|
+
docsPages(siteId: $siteId, filter: $filter) { ${L} }
|
|
756
|
+
}
|
|
757
|
+
`,To=`
|
|
758
|
+
query DocsPage($id: ID!) { docsPage(id: $id) { ${L} } }
|
|
759
|
+
`,yo=`
|
|
760
|
+
mutation CreateDocsPage($input: CreateVibecontrolsDocsPageInput!) {
|
|
761
|
+
createDocsPage(input: $input) { ${L} }
|
|
762
|
+
}
|
|
763
|
+
`,ho=`
|
|
764
|
+
mutation UpdateDocsPage($id: ID!, $input: UpdateVibecontrolsDocsPageInput!) {
|
|
765
|
+
updateDocsPage(id: $id, input: $input) { ${L} }
|
|
766
|
+
}
|
|
767
|
+
`,Do=`
|
|
768
|
+
mutation DeleteDocsPage($id: ID!) { deleteDocsPage(id: $id) }
|
|
769
|
+
`,bo=`
|
|
770
|
+
mutation ReorderDocsPages($siteId: ID!, $input: ReorderVibecontrolsDocsPagesInput!) {
|
|
771
|
+
reorderDocsPages(siteId: $siteId, input: $input) { ${L} }
|
|
772
|
+
}
|
|
773
|
+
`,Ao=`
|
|
774
|
+
query DocsRevisions($siteId: ID!, $pagination: PaginationInput) {
|
|
775
|
+
docsRevisions(siteId: $siteId, pagination: $pagination) {
|
|
776
|
+
items { ${F} } total hasMore
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
`,ko=`
|
|
780
|
+
query DocsRevision($id: ID!) { docsRevision(id: $id) { ${F} } }
|
|
781
|
+
`,Co=`
|
|
782
|
+
query DocsContent($siteId: ID!, $path: String) { docsContent(siteId: $siteId, path: $path) { html contentType } }
|
|
783
|
+
`,$o=`
|
|
784
|
+
mutation CompileDocsSite($siteId: ID!, $publish: Boolean) {
|
|
785
|
+
compileDocsSite(siteId: $siteId, publish: $publish) { ${F} }
|
|
786
|
+
}
|
|
787
|
+
`,Oo=`
|
|
788
|
+
mutation PublishDocsRevision($revisionId: ID!) {
|
|
789
|
+
publishDocsRevision(revisionId: $revisionId) { ${F} }
|
|
790
|
+
}
|
|
791
|
+
`,wo=`
|
|
792
|
+
mutation RollbackDocsRevision($siteId: ID!, $revisionId: ID!) {
|
|
793
|
+
rollbackDocsRevision(siteId: $siteId, revisionId: $revisionId) { ${v} }
|
|
794
|
+
}
|
|
795
|
+
`,_o=`
|
|
796
|
+
mutation GenerateDocsSignedUrl($siteId: ID!) {
|
|
797
|
+
generateDocsSignedUrl(siteId: $siteId) { url expiresAt }
|
|
798
|
+
}
|
|
799
|
+
`,No=`
|
|
800
|
+
query VibeAuditLogs($filter: VibeAuditLogFilterInput, $pagination: PaginationInput) {
|
|
801
|
+
vibeAuditLogs(filter: $filter, pagination: $pagination) {
|
|
802
|
+
items { ${st} } total hasMore
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
`,vo=`
|
|
806
|
+
query VibeAuditLog($id: ID!) { vibeAuditLog(id: $id) { ${st} } }
|
|
807
|
+
`,Ro=`
|
|
808
|
+
query VibeAuditLogStats($filter: VibeAuditLogFilterInput) {
|
|
809
|
+
vibeAuditLogStats(filter: $filter) {
|
|
810
|
+
totalLogs
|
|
811
|
+
logsByAction { action count }
|
|
812
|
+
logsByResourceType { resourceType count }
|
|
813
|
+
logsByStatus { status count }
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
`,xo=`
|
|
817
|
+
mutation DeleteVibeAuditLog($id: ID!, $reason: String) { deleteVibeAuditLog(id: $id, reason: $reason) }
|
|
818
|
+
`,Lo=`
|
|
819
|
+
mutation BulkDeleteVibeAuditLogs($ids: [ID!]!, $reason: String) { bulkDeleteVibeAuditLogs(ids: $ids, reason: $reason) }
|
|
820
|
+
`,Uo=`
|
|
821
|
+
mutation ExportVibeAuditLogs($filter: VibeAuditLogFilterInput, $format: String) {
|
|
822
|
+
exportVibeAuditLogs(filter: $filter, format: $format)
|
|
823
|
+
}
|
|
824
|
+
`;var V=`
|
|
825
|
+
query VibecontrolsAnalytics($input: VibecontrolsAnalyticsInput!) {
|
|
826
|
+
vibecontrolsAnalytics(input: $input) {
|
|
827
|
+
agents { total active inactive staleHeartbeatCount byPlatform { key count } byArchitecture { key count } createdOverTime { timestamp value } }
|
|
828
|
+
targets { total connectionCount byType { key count } byStatus { key count } }
|
|
829
|
+
sessions { total active avgDurationMs totalCollaborators totalShares totalShareLinks byType { key count } byStatus { key count } createdOverTime { timestamp value } }
|
|
830
|
+
vibes { total withAgent withoutAgent byType { key count } byStatus { key count } createdOverTime { timestamp value } }
|
|
831
|
+
actions { total totalExecutions successRate avgDurationMs byActionType { key count } byTriggerType { key count } bySourceType { key count } executionsByStatus { key count } executionsOverTime { timestamp value } }
|
|
832
|
+
webhooks { total active inactive totalDeliveries totalFailures deliverySuccessRate }
|
|
833
|
+
aiEvents { total bySource { key count } byEventType { key count } eventsOverTime { timestamp value } }
|
|
834
|
+
vibeDecks { totalDecks totalButtons buttonsByActionType { key count } }
|
|
835
|
+
audit { total byAction { key count } byResourceType { key count } byStatus { key count } eventsOverTime { timestamp value } }
|
|
836
|
+
docs { totalSites totalPages totalRevisions buildSuccessRate totalBuildImages pagesByStatus { key count } revisionsByStatus { key count } }
|
|
837
|
+
notes { total pinned unpinned createdOverTime { timestamp value } }
|
|
838
|
+
configurations { total secretCount byScope { key count } }
|
|
839
|
+
executionTimeMs
|
|
840
|
+
cached
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
`;function Vo(d){let o=d.command("agents").description("Agent management");o.command("list").description("List agents").option("--active","Only active agents").option("--platform <p>","Filter by platform").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.active&&(t.isActive=!0),e.platform&&(t.platform=e.platform);let n=await i(ct,{filter:Object.keys(t).length?t:void 0});c(e,n.vibecontrolsAgents,{headers:["ID","Name","Hostname","Platform","Status","Last Heartbeat"],rows:n.vibecontrolsAgents.map(s=>[m(s.id,12),s.name,s.hostname,s.platform,y(s.isActive?"ACTIVE":"INACTIVE"),I(s.lastHeartbeat)])});}catch(t){r(t);}}),o.command("get").description("Get agent by ID").argument("<id>","Agent ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(dt,{id:e});if(!n.vibecontrolsAgent)throw new u("Agent not found");c(t,n.vibecontrolsAgent);}catch(n){r(n);}}),o.command("create").description("Create agent").requiredOption("--name <n>","Name").requiredOption("--hostname <h>","Hostname").requiredOption("--platform <p>","Platform").requiredOption("--arch <a>","Architecture").requiredOption("--agent-version <v>","Agent version").option("--tunnel-url <u>","Tunnel URL").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Y,{input:{name:e.name,hostname:e.hostname,platform:e.platform,architecture:e.arch,version:e.agentVersion,tunnelUrl:e.tunnelUrl}});a("Agent created"),c(e,t.registerVibecontrolsAgent);}catch(t){r(t);}}),o.command("update").description("Update agent").argument("<id>","Agent ID").option("--name <n>","Name").option("--tunnel-url <u>","Tunnel URL").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.tunnelUrl&&(n.tunnelUrl=t.tunnelUrl),!Object.keys(n).length)throw new u("No updates specified");let s=await i(pt,{id:e,input:n});a("Agent updated"),c(t,s.updateVibecontrolsAgent);}catch(n){r(n);}}),o.command("delete").description("Delete agent").argument("<id>","Agent ID").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this agent?",t.force))return;await i(ut,{id:e}),a("Agent deleted");}catch(n){r(n);}}),o.command("probe").description("Probe agent connectivity").argument("<id>","Agent ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(gt,{id:e});c(t,n.probeAgentConnection);}catch(n){r(n);}}),o.command("health").description("Health check all agents").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await i(lt)).vibecontrolsAgentHealthProbes;c(e,n,{headers:["Agent","Name","Healthy","Version","Uptime"],rows:n.map(s=>[m(s.agentId,12),s.agentName,y(s.healthy?"HEALTHY":"ERROR"),s.agentVersion??"-",s.uptime!=null?Math.round(s.uptime)+"s":"-"])});}catch(t){r(t);}}),o.command("heartbeat").description("Send heartbeat").argument("<id>","Agent ID").action(async e=>{try{await i(mt,{id:e}),a("Heartbeat sent");}catch(t){r(t);}}),o.command("plugins").description("List plugins").argument("<id>","Agent ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(ft,{agentId:e});c(t,n.agentPlugins);}catch(n){r(n);}}),o.command("install-plugin").description("Install plugin").argument("<agentId>").argument("<packageName>").action(async(e,t)=>{try{let n=await i(It,{agentId:e,packageName:t});n.installAgentPlugin.success?a(`Plugin ${t} installed`):T(n.installAgentPlugin.error??"Failed");}catch(n){r(n);}}),o.command("remove-plugin").description("Remove plugin").argument("<agentId>").argument("<packageName>").action(async(e,t)=>{try{let n=await i(St,{agentId:e,packageName:t});n.removeAgentPlugin.success?a(`Plugin ${t} removed`):T(n.removeAgentPlugin.error??"Failed");}catch(n){r(n);}}),o.command("register").description("Register a new agent").requiredOption("--hostname <h>","Hostname").requiredOption("--name <n>","Name").option("--platform <p>","Platform").option("--arch <a>","Architecture").option("--agent-version <v>","Agent version").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Y,{input:{hostname:e.hostname,name:e.name,platform:e.platform,architecture:e.arch,version:e.agentVersion}});a("Agent registered"),c(e,t.registerAgent);}catch(t){r(t);}}),o.command("deactivate").description("Deactivate agent").argument("<id>","Agent ID").action(async e=>{try{await i(Et,{id:e}),a("Agent deactivated");}catch(t){r(t);}}),o.command("push-gateway-auth").description("Push gateway auth credentials").requiredOption("--agent-id <id>","Agent ID").requiredOption("--client-id <cid>","Client ID").requiredOption("--client-secret <cs>","Client secret").action(async e=>{try{await i(Tt,{input:{agentId:e.agentId,clientId:e.clientId,clientSecret:e.clientSecret}}),a("Gateway auth pushed");}catch(t){r(t);}}),o.command("setup-gateway-auth").description("Setup gateway auth for agent").requiredOption("--agent-id <id>","Agent ID").action(async e=>{try{await i(yt,{input:{agentId:e.agentId}}),a("Gateway auth setup complete");}catch(t){r(t);}}),o.command("update-version").description("Update agent version").argument("<agentId>","Agent ID").argument("<version>","Version").action(async(e,t)=>{try{await i(ht,{agentId:e,version:t}),a("Agent version updated");}catch(n){r(n);}}),o.command("connect-target").description("Connect agent to target").argument("<sourceAgentId>","Source agent ID").argument("<targetId>","Target ID").requiredOption("--protocol <p>","Protocol").action(async(e,t,n)=>{try{await i(Dt,{sourceAgentId:e,targetId:t,protocol:n.protocol}),a("Agent connected to target");}catch(s){r(s);}}),o.command("disconnect-target").description("Disconnect agent from target").argument("<connectionId>","Connection ID").action(async e=>{try{await i(bt,{connectionId:e}),a("Agent disconnected from target");}catch(t){r(t);}}),o.command("graph").description("Get agent graph").option("--root-agent-id <id>","Root agent ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=P(),n=await i(At,{rootAgentId:e.rootAgentId,workspaceId:t?.workspaceId});c(e,n.agentGraph);}catch(t){r(t);}});}function Po(d){let o=d.command("vibes").description("Vibe management");o.command("list").description("List vibes").option("--status <s>","Filter by status").option("--type <t>","Filter by type").option("--agent <id>","Filter by agent").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.status&&(t.status=e.status.toUpperCase()),e.type&&(t.type=e.type.toUpperCase()),e.agent&&(t.agentId=e.agent);let s=(await i(kt,{filter:Object.keys(t).length?t:void 0})).vibes.items;c(e,s,{headers:["ID","Name","Type","Status","Path","Created"],rows:s.map(p=>[m(p.id,12),p.name,p.type,y(p.status),m(p.path,30),I(p.createdAt)])});}catch(t){r(t);}}),o.command("get").description("Get vibe by ID").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Ct,{id:e});if(!n.vibe)throw new u("Vibe not found");c(t,n.vibe);}catch(n){r(n);}}),o.command("create").description("Create vibe").requiredOption("--name <n>","Name").requiredOption("--path <p>","Path").requiredOption("--type <t>","Type (PROJECT, REPOSITORY, etc.)").option("--agent <id>","Agent ID").option("--description <d>","Description").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i($t,{input:{name:e.name,path:e.path,type:e.type.toUpperCase(),agentId:e.agent,description:e.description}});a("Vibe created"),c(e,t.createVibe);}catch(t){r(t);}}),o.command("update").description("Update vibe").argument("<id>").option("--name <n>","Name").option("--description <d>","Description").option("--status <s>","Status").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.description&&(n.description=t.description),t.status&&(n.status=t.status.toUpperCase()),!Object.keys(n).length)throw new u("No updates specified");let s=await i(Ot,{id:e,input:n});a("Vibe updated"),c(t,s.updateVibe);}catch(n){r(n);}}),o.command("delete").description("Delete vibe").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this vibe?",t.force))return;await i(wt,{id:e}),a("Vibe deleted");}catch(n){r(n);}}),o.command("archive").description("Archive vibe").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(_t,{id:e});a("Vibe archived"),c(t,n.archiveVibe);}catch(n){r(n);}}),o.command("restore").description("Restore archived vibe").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Nt,{id:e});a("Vibe restored"),c(t,n.restoreVibe);}catch(n){r(n);}}),o.command("hierarchy").description("Get vibe hierarchy").option("--root <id>","Root vibe ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(vt,{rootId:e.root});c(e,t.vibeHierarchy);}catch(t){r(t);}}),o.command("search").description("Search vibes").argument("<query>").option("--limit <n>","Max results",parseInt).option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Rt,{query:e,limit:t.limit});c(t,n.searchVibes);}catch(n){r(n);}}),o.command("move").description("Move vibe to new parent").argument("<id>","Vibe ID").option("--parent <parentId>","New parent ID (omit to remove parent)").action(async(e,t)=>{try{let n=await i(xt,{id:e,newParentId:t.parent||null});a("Vibe moved"),c({},n.moveVibe);}catch(n){r(n);}}),o.command("set-status").description("Set vibe status").argument("<id>","Vibe ID").argument("<status>","New status").action(async(e,t)=>{try{await i(Lt,{id:e,status:t.toUpperCase()}),a("Vibe status updated");}catch(n){r(n);}}),o.command("update-git").description("Update vibe git info").argument("<id>","Vibe ID").option("--branch <b>","Branch").option("--remote <r>","Remote").option("--status <s>","Status").action(async(e,t)=>{try{let n={};t.branch&&(n.branch=t.branch),t.remote&&(n.remote=t.remote),t.status&&(n.status=t.status);let s=await i(Ut,{id:e,input:n});a("Vibe git info updated"),c({},s.updateVibeGit);}catch(n){r(n);}});}function Go(d){let o=d.command("sessions").description("Session management");o.command("list").description("List sessions").option("--status <s>","Filter by status").option("--type <t>","Filter by type").option("--vibe <id>","Filter by vibe").option("--agent <id>","Filter by agent").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.status&&(t.status=e.status.toUpperCase()),e.type&&(t.type=e.type.toUpperCase()),e.vibe&&(t.vibeId=e.vibe),e.agent&&(t.agentId=e.agent);let s=(await i(Vt,{filter:Object.keys(t).length?t:void 0})).sessions.items;c(e,s,{headers:["ID","Name","Type","Status","Agent","Started"],rows:s.map(p=>[m(p.id,12),p.name,p.type,y(p.status),m(p.agentId,12),I(p.startedAt)])});}catch(t){r(t);}}),o.command("get").description("Get session").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Pt,{id:e});if(!n.session)throw new u("Session not found");c(t,n.session);}catch(n){r(n);}}),o.command("create").description("Create session").requiredOption("--name <n>","Name").requiredOption("--agent <id>","Agent ID").requiredOption("--type <t>","Type (TMUX, SSH, TERMINAL, SCRIPT, CUSTOM)").option("--vibe <id>","Vibe ID").option("--command <c>","Command").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Gt,{input:{name:e.name,agentId:e.agent,type:e.type.toUpperCase(),vibeId:e.vibe,command:e.command}});a("Session created"),c(e,t.createSession);}catch(t){r(t);}}),o.command("start").description("Start session").argument("<id>").action(async e=>{try{await i(Bt,{id:e}),a("Session started");}catch(t){r(t);}}),o.command("stop").description("Stop session").argument("<id>").action(async e=>{try{await i(qt,{id:e}),a("Session stopped");}catch(t){r(t);}}),o.command("restart").description("Restart session").argument("<id>").action(async e=>{try{await i(Ft,{id:e}),a("Session restarted");}catch(t){r(t);}}),o.command("terminate").description("Terminate session").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Terminate this session?",t.force))return;await i(Ht,{id:e}),a("Session terminated");}catch(n){r(n);}}),o.command("output").description("Get session output").argument("<id>").option("--lines <n>","Number of lines",parseInt).option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Mt,{id:e,lines:t.lines});n.sessionOutput?console.log(n.sessionOutput):T("No output");}catch(n){r(n);}}),o.command("send-input").description("Send input to session").argument("<id>").argument("<input>").action(async(e,t)=>{try{await i(Wt,{id:e,input:t}),a("Input sent");}catch(n){r(n);}}),o.command("start-terminal").description("Start web terminal").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Kt,{id:e});a("Terminal started"),c(t,n.startSessionTerminal);}catch(n){r(n);}}),o.command("stop-terminal").description("Stop web terminal").argument("<id>").action(async e=>{try{await i(jt,{id:e}),a("Terminal stopped");}catch(t){r(t);}}),o.command("active").description("List active sessions").option("--vibe <id>","Filter by vibe").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Yt,{vibeId:e.vibe});c(e,t.activeSessions);}catch(t){r(t);}}),o.command("health-check").description("Check health of all sessions").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(zt);a("Health check complete"),c(e,t.checkSessionHealth);}catch(t){r(t);}}),o.command("share").description("Share session with user").argument("<sessionId>","Session ID").requiredOption("--user-id <uid>","User ID").option("--permission <p>","Permission (VIEW/INTERACT)","VIEW").action(async(e,t)=>{try{await i(Xt,{input:{sessionId:e,sharedWithId:t.userId,permission:t.permission}}),a("Session shared");}catch(n){r(n);}}),o.command("create-share-link").description("Create share link").argument("<sessionId>","Session ID").option("--permission <p>","Permission (VIEW/INTERACT)","VIEW").action(async(e,t)=>{try{let n=await i(Qt,{input:{sessionId:e,permission:t.permission}});a("Share link created"),c({},n.createSessionShareLink);}catch(n){r(n);}}),o.command("revoke-share").description("Revoke session share").argument("<id>","Share ID").action(async e=>{try{await i(Zt,{id:e}),a("Session share revoked");}catch(t){r(t);}}),o.command("revoke-share-link").description("Revoke session share link").argument("<id>","Share link ID").action(async e=>{try{await i(te,{id:e}),a("Share link revoked");}catch(t){r(t);}}),o.command("update-share").description("Update session share permission").argument("<id>","Share ID").requiredOption("--permission <p>","Permission (VIEW/INTERACT)").action(async(e,t)=>{try{await i(ee,{id:e,input:{permission:t.permission}}),a("Session share updated");}catch(n){r(n);}}),o.command("join").description("Join shared session").argument("<sessionId>","Session ID").action(async e=>{try{await i(ne,{input:{sessionId:e}}),a("Joined session");}catch(t){r(t);}}),o.command("leave").description("Leave shared session").argument("<sessionId>","Session ID").action(async e=>{try{await i(oe,{sessionId:e}),a("Left session");}catch(t){r(t);}}),o.command("request-control").description("Request session control").argument("<sessionId>","Session ID").action(async e=>{try{await i(ie,{sessionId:e}),a("Control requested");}catch(t){r(t);}}),o.command("release-control").description("Release session control").argument("<sessionId>","Session ID").action(async e=>{try{await i(re,{sessionId:e}),a("Control released");}catch(t){r(t);}}),o.command("transfer-control").description("Transfer session control").argument("<sessionId>","Session ID").requiredOption("--to-user <uid>","Target user ID").action(async(e,t)=>{try{await i(se,{sessionId:e,toUserId:t.toUser}),a("Control transferred");}catch(n){r(n);}}),o.command("shares").description("List session shares").argument("<sessionId>","Session ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(ae,{sessionId:e});c(t,n.sessionShares);}catch(n){r(n);}}),o.command("share-links").description("List session share links").argument("<sessionId>","Session ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(ce,{sessionId:e});c(t,n.sessionShareLinks);}catch(n){r(n);}}),o.command("collaborators").description("List session collaborators").argument("<sessionId>","Session ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(de,{sessionId:e});c(t,n.sessionCollaborators);}catch(n){r(n);}}),o.command("shared-with-me").description("List sessions shared with me").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(pe);c(e,t.sessionsSharedWithMe);}catch(t){r(t);}}),o.command("restart-terminal").description("Restart session terminal").argument("<id>","Session ID").action(async e=>{try{await i(Jt,{id:e}),a("Terminal restarted");}catch(t){r(t);}}),o.command("bulk-restart").description("Bulk restart sessions").requiredOption("--ids <ids>","Session IDs (comma-separated)").option("--force","Skip confirmation").action(async e=>{try{await i(ue,{ids:e.ids.split(",").map(t=>t.trim()),force:e.force}),a("Sessions restarted");}catch(t){r(t);}}),o.command("bulk-stop").description("Bulk stop sessions").requiredOption("--ids <ids>","Session IDs (comma-separated)").option("--force","Skip confirmation").action(async e=>{try{await i(me,{ids:e.ids.split(",").map(t=>t.trim()),force:e.force}),a("Sessions stopped");}catch(t){r(t);}}),o.command("bulk-terminate").description("Bulk terminate sessions").requiredOption("--ids <ids>","Session IDs (comma-separated)").option("--force","Skip confirmation").action(async e=>{try{if(!await g("Terminate these sessions?",e.force))return;await i(ge,{ids:e.ids.split(",").map(t=>t.trim())}),a("Sessions terminated");}catch(t){r(t);}});}function Bo(d){let o=d.command("notes").description("Note management");o.command("list").description("List notes").option("--vibe <id>","Filter by vibe").option("--pinned","Show only pinned").option("--tags <tags>","Filter by tags (comma-separated)").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.vibe&&(t.vibeId=e.vibe),e.pinned&&(t.isPinned=!0),e.tags&&(t.tags=e.tags.split(",").map(s=>s.trim()));let n=await i(le,{filter:Object.keys(t).length?t:void 0});c(e,n.notes.items,{headers:["ID","Title","Pinned","Tags","Created"],rows:n.notes.items.map(s=>[m(s.id,12),s.title,s.isPinned?"Yes":"No",(s.tags??[]).join(", "),I(s.createdAt)])});}catch(t){r(t);}}),o.command("get").description("Get note").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(fe,{id:e});if(!n.note)throw new u("Note not found");c(t,n.note);}catch(n){r(n);}}),o.command("create").description("Create note").requiredOption("--title <t>","Title").requiredOption("--content <c>","Content").option("--vibe <id>","Vibe ID").option("--tags <tags>","Tags (comma-separated)").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Ie,{input:{title:e.title,content:e.content,vibeId:e.vibe,tags:e.tags?.split(",").map(n=>n.trim())}});a("Note created"),c(e,t.createNote);}catch(t){r(t);}}),o.command("update").description("Update note").argument("<id>").option("--title <t>","Title").option("--content <c>","Content").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.title&&(n.title=t.title),t.content&&(n.content=t.content),!Object.keys(n).length)throw new u("No updates specified");let s=await i(Se,{id:e,input:n});a("Note updated"),c(t,s.updateNote);}catch(n){r(n);}}),o.command("delete").description("Delete note").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this note?",t.force))return;await i(Ee,{id:e}),a("Note deleted");}catch(n){r(n);}}),o.command("search").description("Search notes").argument("<query>").option("--vibe <id>","Scope to vibe").option("--limit <n>","Max results",parseInt).option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Te,{query:e,vibeId:t.vibe,limit:t.limit});c(t,n.searchNotes);}catch(n){r(n);}}),o.command("pin").description("Pin a note").argument("<id>").action(async e=>{try{await i(ye,{id:e}),a("Note pinned");}catch(t){r(t);}}),o.command("unpin").description("Unpin a note").argument("<id>").action(async e=>{try{await i(he,{id:e}),a("Note unpinned");}catch(t){r(t);}}),o.command("tag").description("Tag a note").argument("<noteId>","Note ID").argument("<tag>","Tag").action(async(e,t)=>{try{await i(De,{input:{noteId:e,tag:t}}),a("Note tagged");}catch(n){r(n);}}),o.command("untag").description("Remove tag from note").argument("<noteId>","Note ID").argument("<tag>","Tag").action(async(e,t)=>{try{await i(be,{input:{noteId:e,tag:t}}),a("Tag removed");}catch(n){r(n);}}),o.command("replace-tags").description("Replace all tags on a note").argument("<noteId>","Note ID").requiredOption("--tags <tags>","Tags (comma-separated)").action(async(e,t)=>{try{await i(Ae,{input:{noteId:e,tags:t.tags.split(",").map(n=>n.trim())}}),a("Tags replaced");}catch(n){r(n);}}),o.command("create-tag").description("Create a note tag").argument("<name>","Tag name").action(async e=>{try{await i(ke,{input:{name:e}}),a("Tag created");}catch(t){r(t);}}),o.command("available-tags").description("List available note tags").option("--query <q>","Search query").option("--limit <n>","Max results",parseInt).option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Ce,{query:e.query,limit:e.limit});c(e,t.availableNoteTags);}catch(t){r(t);}}),o.command("get-tags").description("Get tags for a note").argument("<noteId>","Note ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i($e,{noteId:e});c(t,n.noteTags);}catch(n){r(n);}}),o.command("related-tags").description("Get related tags for a note").argument("<noteId>","Note ID").option("--limit <n>","Max results",parseInt).option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Oe,{noteId:e,limit:t.limit});c(t,n.relatedNoteTags);}catch(n){r(n);}}),o.command("bulk-delete").description("Bulk delete notes").requiredOption("--ids <ids>","Note IDs (comma-separated)").option("--force","Skip confirmation").action(async e=>{try{if(!await g("Delete these notes?",e.force))return;await i(we,{ids:e.ids.split(",").map(t=>t.trim())}),a("Notes deleted");}catch(t){r(t);}});}function qo(d){let o=d.command("config").description("Backend configuration management");o.command("list").description("List configs").requiredOption("--scope <s>","Scope (WORKSPACE, VIBE, SESSION, AGENT, USER, GLOBAL)").option("--scope-id <id>","Scope entity ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(_e,{scope:e.scope.toUpperCase(),scopeId:e.scopeId});c(e,t.configurationsByScope);}catch(t){r(t);}}),o.command("get").description("Get config value").argument("<key>").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Ne,{key:e,scope:t.scope.toUpperCase(),scopeId:t.scopeId});if(!n.configuration)throw new u("Config not found");c(t,n.configuration);}catch(n){r(n);}}),o.command("set").description("Set config value").argument("<key>").argument("<value>").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").option("--secret","Mark as secret").option("-f, --format <format>","Output format").action(async(e,t,n)=>{try{let s;try{s=JSON.parse(t);}catch{s=t;}let p=await i(Re,{key:e,scope:n.scope.toUpperCase(),scopeId:n.scopeId,value:s,isSecret:n.secret});a("Config set"),c(n,p.setConfiguration);}catch(s){r(s);}}),o.command("delete").description("Delete config").argument("<key>").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").action(async(e,t)=>{try{await i(xe,{key:e,scope:t.scope.toUpperCase(),scopeId:t.scopeId}),a("Config deleted");}catch(n){r(n);}}),o.command("value").description("Get raw config value").argument("<key>").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(ve,{key:e,scope:t.scope.toUpperCase(),scopeId:t.scopeId});console.log(n.configurationValue);}catch(n){r(n);}}),o.command("bulk-set").description("Bulk set configs").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").requiredOption("--input <json>","JSON array of [{key,value,isSecret?}]").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Le,{configurations:JSON.parse(e.input),scope:e.scope.toUpperCase(),scopeId:e.scopeId});a("Configs set"),c(e,t.bulkSetConfigurations);}catch(t){r(t);}}),o.command("bulk-delete").description("Bulk delete configs").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").requiredOption("--keys <keys>","Comma-separated keys").option("--force","Skip confirmation").action(async e=>{try{if(!await g("Delete these configs?",e.force))return;await i(Ue,{keys:e.keys.split(",").map(t=>t.trim()),scope:e.scope.toUpperCase(),scopeId:e.scopeId}),a("Configs deleted");}catch(t){r(t);}});}function Fo(d){let o=d.command("webhooks").description("Webhook management");o.command("list").description("List webhooks").option("--active","Only active").option("-f, --format <format>","Output format").action(async e=>{try{let t=e.active?{isActive:!0}:void 0,n=await i(Ve,{filter:t});c(e,n.webhooks.items,{headers:["ID","Name","URL","Active","Events","Deliveries"],rows:n.webhooks.items.map(s=>[m(s.id,12),s.name,m(s.url,30),s.isActive?"Yes":"No",(s.events??[]).join(", "),String(s.deliveryCount??0)])});}catch(t){r(t);}}),o.command("get").description("Get webhook").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Pe,{id:e});if(!n.webhook)throw new u("Webhook not found");c(t,n.webhook);}catch(n){r(n);}}),o.command("create").description("Create webhook").requiredOption("--name <n>","Name").requiredOption("--url <u>","URL").requiredOption("--events <events>","Events (comma-separated)").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Ge,{input:{name:e.name,url:e.url,events:e.events.split(",").map(n=>n.trim())}});a("Webhook created"),c(e,t.createWebhook);}catch(t){r(t);}}),o.command("update").description("Update webhook").argument("<id>").option("--name <n>","Name").option("--url <u>","URL").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.url&&(n.url=t.url),!Object.keys(n).length)throw new u("No updates specified");let s=await i(Be,{id:e,input:n});a("Webhook updated"),c(t,s.updateWebhook);}catch(n){r(n);}}),o.command("delete").description("Delete webhook").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this webhook?",t.force))return;await i(qe,{id:e}),a("Webhook deleted");}catch(n){r(n);}}),o.command("test").description("Test webhook").argument("<id>").action(async e=>{try{await i(Fe,{id:e}),a("Webhook test sent");}catch(t){r(t);}}),o.command("active").description("List active webhooks").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(He);c(e,t.activeWebhooks);}catch(t){r(t);}}),o.command("by-event").description("List webhooks by event").argument("<event>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Me,{event:e});c(t,n.webhooksByEvent);}catch(n){r(n);}}),o.command("trigger").description("Trigger webhook").argument("<id>").option("--payload <json>","JSON payload").action(async(e,t)=>{try{await i(We,{id:e,payload:t.payload?JSON.parse(t.payload):void 0}),a("Webhook triggered");}catch(n){r(n);}}),o.command("reset-failures").description("Reset webhook failures").argument("<id>").action(async e=>{try{await i(Ke,{id:e}),a("Webhook failures reset");}catch(t){r(t);}});}function gi(d,o="HTTPS"){if(!d)return o;let e=d.toUpperCase();if(e==="HTTP"||e==="HTTPS"||e==="TCP"||e==="UDP")return e;throw new Error(`Invalid protocol: ${d} (expected http|https|tcp|udp)`)}function Ho(d){return (d??"PROD").toUpperCase()==="ALPHA"?"ALPHA":"PROD"}function Mo(d){let o=d.command("tunnels").description("Tunnel management (VibeTunnels)");o.command("providers").description("List tunnel providers with capabilities").option("-f, --format <format>","Output format").action(async t=>{try{let n=await i(Ye);c(t,n.tunnelProviders);}catch(n){r(n);}}),o.command("list").description("List tunnels in the workspace").option("--provider <key>","Filter by provider (vibetunnels|cloudflare)").option("--status <status>","Filter by status").option("--search <query>","Search by name/slug").option("-f, --format <format>","Output format").action(async t=>{try{let n={};t.provider&&(n.providerKey=t.provider.toUpperCase()),t.status&&(n.status=[t.status.toUpperCase()]),t.search&&(n.search=t.search);let s=await i(je,{filter:n});if(t.format){c(t,s.tunnels);return}for(let p of s.tunnels.items){let f=p.primaryDomain?.hostname??"(no domain)";console.log(`${p.id} ${p.slug} ${p.providerKey} ${p.status} ${f} ${p.protocol}:${p.localPort}`);}console.log(`
|
|
844
|
+
${s.tunnels.total} total`);}catch(n){r(n);}}),o.command("get").description("Get a tunnel by ID").argument("<id>").option("-f, --format <format>").action(async(t,n)=>{try{let s=await i(Je,{id:t});if(!s.tunnel)throw new u(`Tunnel ${t} not found`);c(n,s.tunnel);}catch(s){r(s);}}),o.command("create").description("Create a tunnel (DRAFT \u2014 start with `vibe tunnels start`)").requiredOption("--agent <id>","Agent ID").requiredOption("--name <name>","Tunnel name").requiredOption("--port <p>","Local port",parseInt).option("--provider <key>","Provider key (vibetunnels|cloudflare)","VIBETUNNELS").option("--protocol <p>","http|https|tcp|udp","https").option("--host <host>","Local host","127.0.0.1").option("--subdomain <label>","Reserve a *.vibetunnels.com subdomain").option("--env <env>","alpha|prod for managed subdomain","prod").option("--description <text>").option("-f, --format <format>").action(async t=>{try{let n={agentId:t.agent,name:t.name,description:t.description,providerKey:t.provider.toUpperCase(),protocol:gi(t.protocol),localPort:t.port,localHost:t.host,managedSubdomain:t.subdomain,environment:Ho(t.env)},s=await i(ze,{input:n});a(`Tunnel created: ${s.createTunnel.slug}`),c(t,s.createTunnel);}catch(n){r(n);}}),o.command("start").description("Start a tunnel").argument("<id>").action(async t=>{try{await i(Qe,{id:t}),a("Tunnel started");}catch(n){r(n);}}),o.command("stop").description("Stop a tunnel").argument("<id>").action(async t=>{try{await i(Ze,{id:t}),a("Tunnel stopped");}catch(n){r(n);}}),o.command("rotate").description("Rotate tunnel credentials").argument("<id>").action(async t=>{try{await i(tn,{id:t}),a("Tunnel credentials rotated");}catch(n){r(n);}}),o.command("delete").description("Delete a tunnel").argument("<id>").option("--force","Skip confirmation").action(async(t,n)=>{try{if(!await g("Delete this tunnel?",n.force))return;await i(Xe,{id:t}),a("Tunnel deleted");}catch(s){r(s);}}),o.command("sessions").description("List sessions for a tunnel").argument("<tunnelId>").option("-f, --format <format>").action(async(t,n)=>{try{let s=await i(nn,{tunnelId:t});c(n,s);}catch(s){r(s);}}),o.command("issue-session").description("Issue a short-lived token for a tunnel (printed once)").argument("<tunnelId>").option("--ttl <seconds>","TTL in seconds",t=>parseInt(t,10)).action(async(t,n)=>{try{let s=await i(en,{tunnelId:t,ttlSeconds:n.ttl});console.log("Session issued. The token below is shown exactly once."),console.log(`Session ID: ${s.issueTunnelSession.session.id}`),console.log(`Token: ${s.issueTunnelSession.token}`),console.log(`Expires: ${s.issueTunnelSession.session.expiresAt}`),console.log(`Agent hint: ${JSON.stringify(s.issueTunnelSession.agentConfigHint,null,2)}`);}catch(s){r(s);}}),o.command("revoke-session").description("Revoke an active tunnel session").argument("<sessionId>").option("--reason <text>").action(async(t,n)=>{try{await i(on,{sessionId:t,reason:n.reason??"revoked via CLI"}),a("Session revoked");}catch(s){r(s);}});let e=o.command("domains").description("Manage tunnel domains");e.command("list").description("List domains (optionally scoped to a tunnel)").option("--tunnel <id>","Tunnel ID").option("-f, --format <format>").action(async t=>{try{let n=await i(pn,{tunnelId:t.tunnel??null});c(t,n);}catch(n){r(n);}}),e.command("reserve").description("Reserve a managed *.vibetunnels.com subdomain").requiredOption("--label <label>","Subdomain label").option("--env <env>","alpha|prod","prod").action(async t=>{try{let n=await i(rn,{input:{label:t.label,environment:Ho(t.env)}});a(`Reserved ${n.reserveTunnelSubdomain.hostname}`);}catch(n){r(n);}}),e.command("add-custom").description("Register a user-owned custom domain (TXT verification required)").argument("<hostname>").action(async t=>{try{let n=await i(sn,{input:{hostname:t}});console.log(`Registered ${n.registerCustomTunnelDomain.hostname}.`),console.log(`Create a TXT record at ${n.registerCustomTunnelDomain.challengeRecordName} containing:`),console.log(` ${n.registerCustomTunnelDomain.challengeToken}`);}catch(n){r(n);}}),e.command("attach").description("Attach a (verified) domain to a tunnel").argument("<tunnelId>").argument("<domainId>").option("--primary","Mark as primary domain").action(async(t,n,s)=>{try{await i(an,{tunnelId:t,domainId:n,makePrimary:!!s.primary}),a("Domain attached");}catch(p){r(p);}}),e.command("detach").description("Detach a domain from a tunnel").argument("<tunnelId>").argument("<domainId>").action(async(t,n)=>{try{await i(cn,{tunnelId:t,domainId:n}),a("Domain detached");}catch(s){r(s);}}),e.command("verify").description("Force verification check for a custom domain").argument("<domainId>").action(async t=>{try{let n=await i(dn,{domainId:t});console.log(`Status: ${n.verifyTunnelDomain.verificationStatus}`),n.verifyTunnelDomain.lastCheckError&&console.log(`Error: ${n.verifyTunnelDomain.lastCheckError}`);}catch(n){r(n);}});}function Wo(d){let o=d.command("ui-session").description("UI session state");o.command("get").description("Get current UI session").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(un);c(e,t.uiSession);}catch(t){r(t);}}),o.command("clear").description("Clear UI session").action(async()=>{try{await i(gn),a("UI session cleared");}catch(e){r(e);}}),o.command("get-by-id").description("Get UI session by ID").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(mn,{id:e});c(t,n.uiSessionById);}catch(n){r(n);}}),o.command("set-active-vibe").description("Set active vibe").argument("<vibeId>").action(async e=>{try{await i(ln,{vibeId:e}),a("Active vibe updated");}catch(t){r(t);}}),o.command("set-active-session").description("Set active session").argument("<sessionId>").action(async e=>{try{await i(fn,{sessionId:e}),a("Active session updated");}catch(t){r(t);}}),o.command("add-recent-vibe").description("Add recent vibe").argument("<vibeId>").action(async e=>{try{await i(In,{vibeId:e}),a("Recent vibe added");}catch(t){r(t);}}),o.command("add-recent-session").description("Add recent session").argument("<sessionId>").action(async e=>{try{await i(Sn,{sessionId:e}),a("Recent session added");}catch(t){r(t);}});}function Ko(d){let o=d.command("cli-config").description("CLI configuration");o.command("set").description("Set CLI config value").argument("<key>").argument("<value>").action((e,t)=>{if(!j.includes(e))throw new u(`Unknown key: ${e}. Valid keys: ${j.join(", ")}`);ot(e,t),a(`${e} = ${t}`);}),o.command("get").description("Get CLI config value").argument("<key>").action(e=>{let t=nt(e);if(t===void 0)throw new u(`Key not set: ${e}`);console.log(t);}),o.command("list").description("Show all CLI config").option("-f, --format <format>","Output format").action(e=>{let t=et();if(e.format==="json"){Z(t);return}let n=Object.entries(t).filter(([,s])=>s!==void 0);tt(["Key","Value"],n.map(([s,p])=>[s,String(p)]));}),o.command("path").description("Show config file path").action(()=>{console.log(it());});}function jo(){let d=P()?.workspaceId;if(!d)throw new u("No workspace set. Run: vibecontrols workspace set <id>");return d}function Jo(d){let o=d.command("targets").description("Target management (SSH/RDP/VNC)");o.command("list").description("List targets").option("--type <type>","Filter by type (DIRECT,SSH,RDP,VNC)").option("--limit <n>","Limit results",parseInt).option("--offset <n>","Offset results",parseInt).option("-f, --format <format>","Output format").action(async e=>{try{let t=jo(),n={};e.type&&(n.type=e.type.toUpperCase());let p=(await i(En,{workspaceId:t,filter:Object.keys(n).length?n:void 0,limit:e.limit,offset:e.offset})).targets.items;c(e,p,{headers:["ID","Name","Type","Host","Port","Status"],rows:p.map(f=>[m(f.id,12),f.name,f.type,f.host,String(f.port??"-"),y(f.status)])});}catch(t){r(t);}}),o.command("get").description("Get target by ID").argument("<id>","Target ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Tn,{id:e});if(!n.target)throw new u("Target not found");c(t,n.target);}catch(n){r(n);}}),o.command("create").description("Create target").requiredOption("--name <n>","Name").requiredOption("--type <t>","Type (DIRECT,SSH,RDP,VNC)").requiredOption("--host <h>","Host address").requiredOption("--port <p>","Port",parseInt).option("--username <u>","Username").option("--protocol <p>","Protocol").option("--agent-id <id>","Agent ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=jo(),n={name:e.name,type:e.type.toUpperCase(),host:e.host,port:e.port};e.username&&(n.username=e.username),e.protocol&&(n.protocol=e.protocol),e.agentId&&(n.agentId=e.agentId);let s=await i(yn,{workspaceId:t,input:n});a("Target created"),c(e,s.createTarget);}catch(t){r(t);}}),o.command("update").description("Update target").argument("<id>","Target ID").option("--name <n>","Name").option("--host <h>","Host address").option("--port <p>","Port",parseInt).option("--username <u>","Username").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.host&&(n.host=t.host),t.port&&(n.port=t.port),t.username&&(n.username=t.username),!Object.keys(n).length)throw new u("No updates specified");let s=await i(hn,{id:e,input:n});a("Target updated"),c(t,s.updateTarget);}catch(n){r(n);}}),o.command("delete").description("Delete target").argument("<id>","Target ID").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this target?",t.force))return;await i(Dn,{id:e}),a("Target deleted");}catch(n){r(n);}}),o.command("test").description("Test target connectivity").argument("<id>","Target ID").action(async e=>{try{let t=await i(bn,{id:e});t.testTarget.success?a(`Connection successful (${t.testTarget.latencyMs??"-"}ms)`):T(t.testTarget.error??"Connection failed");}catch(t){r(t);}}),o.command("scan-ssh").description("Scan SSH config for targets").requiredOption("--agent-id <id>","Agent ID").option("--config-path <path>","SSH config file path").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(An,{agentId:e.agentId,configPath:e.configPath});a(`Found ${t.scanSSHConfig.length} target(s)`),c(e,t.scanSSHConfig);}catch(t){r(t);}}),o.command("install-agent").description("Install agent on target").requiredOption("--source-agent-id <id>","Source agent ID").requiredOption("--target-id <id>","Target ID").option("--agent-port <port>","Agent port",parseInt).action(async e=>{try{let t=await i(kn,{sourceAgentId:e.sourceAgentId,targetId:e.targetId,agentPort:e.agentPort});t.installAgentOnTarget.success?a("Agent installed on target"):T(t.installAgentOnTarget.error??"Installation failed");}catch(t){r(t);}}),o.command("uninstall-agent").description("Uninstall agent from target").argument("<targetId>","Target ID").action(async e=>{try{let t=await i(Cn,{targetId:e});t.uninstallAgentFromTarget.success?a("Agent uninstalled from target"):T(t.uninstallAgentFromTarget.error??"Uninstall failed");}catch(t){r(t);}}),o.command("start-terminal").description("Start terminal on target").argument("<targetId>","Target ID").option("--shell <shell>","Shell to use").action(async(e,t)=>{try{let n=await i($n,{targetId:e,shell:t.shell});a("Terminal started"),console.log(`Session ID: ${n.startTerminal.sessionId}`),console.log(`ttyd URL: ${n.startTerminal.ttydUrl}`);}catch(n){r(n);}}),o.command("stop-terminal").description("Stop terminal session").argument("<sessionId>","Session ID").action(async e=>{try{await i(On,{sessionId:e}),a("Terminal stopped");}catch(t){r(t);}});}function Yo(d){let o=d.command("vibedeck").description("VibeDeck management");o.command("list").description("List vibedecks").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await i(wn)).vibeDecks.items;c(e,n,{headers:["ID","Name","Default","Created"],rows:n.map(s=>[m(s.id,12),s.name,s.isDefault?"Yes":"No",I(s.createdAt)])});}catch(t){r(t);}}),o.command("get").description("Get vibedeck").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(_n,{id:e});if(!n.vibeDeck)throw new u("VibeDeck not found");c(t,n.vibeDeck);}catch(n){r(n);}}),o.command("default").description("Get default vibedeck").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Nn);if(!t.defaultVibeDeck)throw new u("No default VibeDeck found");c(e,t.defaultVibeDeck);}catch(t){r(t);}}),o.command("create").description("Create vibedeck").requiredOption("--name <n>","Name").option("--description <d>","Description").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(vn,{input:{name:e.name,description:e.description}});a("VibeDeck created"),c(e,t.createVibeDeck);}catch(t){r(t);}}),o.command("update").description("Update vibedeck").argument("<id>").option("--name <n>","Name").option("--description <d>","Description").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.description&&(n.description=t.description),!Object.keys(n).length)throw new u("No updates specified");let s=await i(Rn,{id:e,input:n});a("VibeDeck updated"),c(t,s.updateVibeDeck);}catch(n){r(n);}}),o.command("duplicate").description("Duplicate vibedeck").argument("<id>").option("--name <n>","New name").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(xn,{id:e,name:t.name});a("VibeDeck duplicated"),c(t,n.duplicateVibeDeck);}catch(n){r(n);}}),o.command("delete").description("Delete vibedeck").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this VibeDeck?",t.force))return;await i(Ln,{id:e}),a("VibeDeck deleted");}catch(n){r(n);}}),o.command("set-default").description("Set default vibedeck").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Un,{id:e});a("Default VibeDeck updated"),c(t,n.setDefaultVibeDeck);}catch(n){r(n);}}),o.command("buttons").description("List vibedeck buttons").requiredOption("--deck-id <id>","VibeDeck ID").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await i(Vn,{filter:{vibeDeckId:e.deckId}})).vibeDeckButtons.items;c(e,n,{headers:["ID","Label","Type","Position","Command"],rows:n.map(s=>[m(s.id,12),s.label,s.type,`${s.row},${s.column}`,m(s.command??"",30)])});}catch(t){r(t);}}),o.command("button").description("Get vibedeck button").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Pn,{id:e});if(!n.vibeDeckButton)throw new u("Button not found");c(t,n.vibeDeckButton);}catch(n){r(n);}}),o.command("create-button").description("Create vibedeck button").requiredOption("--deck-id <id>","VibeDeck ID").requiredOption("--label <l>","Label").requiredOption("--type <t>","Type (COMMAND, SCRIPT, WEBHOOK)").option("--command <c>","Command").option("--script <s>","Script").option("--webhook-url <u>","Webhook URL").option("--icon <i>","Icon").option("--color <c>","Color").option("--row <n>","Row position",parseInt).option("--column <n>","Column position",parseInt).option("--action-id <id>","Link to an Action").option("-f, --format <format>","Output format").action(async e=>{try{let t={vibeDeckId:e.deckId,label:e.label,type:e.type.toUpperCase()};e.command&&(t.command=e.command),e.script&&(t.script=e.script),e.webhookUrl&&(t.webhookUrl=e.webhookUrl),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.row!==void 0&&(t.row=e.row),e.column!==void 0&&(t.column=e.column),e.actionId&&(t.actionId=e.actionId);let n=await i(Gn,{input:t});a("Button created"),c(e,n.createVibeDeckButton);}catch(t){r(t);}}),o.command("update-button").description("Update vibedeck button").argument("<id>").option("--label <l>","Label").option("--command <c>","Command").option("--icon <i>","Icon").option("--color <c>","Color").option("--action-id <id>","Link to an Action").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.label&&(n.label=t.label),t.command&&(n.command=t.command),t.icon&&(n.icon=t.icon),t.color&&(n.color=t.color),t.actionId&&(n.actionId=t.actionId),!Object.keys(n).length)throw new u("No updates specified");let s=await i(Bn,{id:e,input:n});a("Button updated"),c(t,s.updateVibeDeckButton);}catch(n){r(n);}}),o.command("delete-button").description("Delete vibedeck button").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this button?",t.force))return;await i(qn,{id:e}),a("Button deleted");}catch(n){r(n);}}),o.command("move-button").description("Move vibedeck button").argument("<id>").requiredOption("--row <n>","Row position",parseInt).requiredOption("--column <n>","Column position",parseInt).option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Fn,{id:e,input:{row:t.row,column:t.column}});a("Button moved"),c(t,n.moveVibeDeckButton);}catch(n){r(n);}}),o.command("reorder-buttons").description("Reorder vibedeck buttons").argument("<vibeDeckId>").requiredOption("--positions <json>","Positions as JSON array").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n;try{n=JSON.parse(t.positions);}catch{throw new u("Invalid JSON for --positions")}let s=await i(Hn,{vibeDeckId:e,positions:n});a("Buttons reordered"),c(t,s.reorderVibeDeckButtons);}catch(n){r(n);}}),o.command("execute-button").description("Execute vibedeck button").argument("<id>").requiredOption("--agent-id <id>","Agent ID").action(async(e,t)=>{try{let s=(await i(Mn,{id:e,agentId:t.agentId})).executeVibeDeckButton;if(s.success)a(s.output??"Button executed successfully");else throw new u(s.error??"Execution failed")}catch(n){r(n);}});}function zo(d){let o=d.command("ai-tool-events").description("AI tool event tracking");o.command("list").description("List AI tool events").option("--agent-id <id>","Filter by agent").option("--tool-name <name>","Filter by tool name").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.agentId&&(t.agentId=e.agentId),e.toolName&&(t.toolName=e.toolName);let s=(await i(so,{filter:Object.keys(t).length?t:void 0})).aiToolEvents.items;c(e,s,{headers:["ID","Tool","Event Type","Model","Tokens","Duration","Created"],rows:s.map(p=>[m(p.id,12),p.toolName,p.eventType,p.model??"-",String(p.tokenCount??"-"),String(p.duration??"-"),I(p.createdAt)])});}catch(t){r(t);}}),o.command("get").description("Get AI tool event").argument("<id>","Event ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(ao,{id:e});if(!n.aiToolEvent)throw new u("AI tool event not found");c(t,n.aiToolEvent);}catch(n){r(n);}}),o.command("recent").description("Recent AI tool events").requiredOption("--agent-id <id>","Filter by agent").option("--limit <n>","Max results",parseInt).option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(co,{agentId:e.agentId,limit:e.limit});c(e,t.recentAiToolEvents);}catch(t){r(t);}}),o.command("create").description("Create AI tool event").requiredOption("--agent-id <id>","Agent ID").requiredOption("--tool-name <name>","Tool name").requiredOption("--event-type <type>","Event type").option("--model <model>","Model name").option("--input <input>","Input data").option("--output <output>","Output data").option("--token-count <n>","Token count",parseInt).option("--duration <ms>","Duration in ms",parseInt).option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(po,{input:{agentId:e.agentId,toolName:e.toolName,eventType:e.eventType,model:e.model,input:e.input,output:e.output,tokenCount:e.tokenCount,duration:e.duration}});a("AI tool event created"),c(e,t.createAiToolEvent);}catch(t){r(t);}}),o.command("cleanup").description("Delete old AI tool events").requiredOption("--before-date <date>","Delete events before this date").option("--force","Skip confirmation").action(async e=>{try{if(!await g(`Delete all AI tool events before ${e.beforeDate}?`,e.force))return;let t=await i(uo,{beforeDate:e.beforeDate});a("Old AI tool events deleted"),c({},t.deleteOldAiToolEvents);}catch(t){r(t);}});}function Xo(d){let o=d.command("docs").description("Documentation site management");o.command("sites").description("List documentation sites").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await i(mo)).docsSites.items;c(e,n,{headers:["ID","Vibe ID","Name","Visibility","Created"],rows:n.map(s=>[m(s.id,12),m(s.vibeId,12),s.name,s.visibility,I(s.createdAt)])});}catch(t){r(t);}}),o.command("site").description("Get documentation site").argument("<vibeId>","Vibe ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(go,{vibeId:e});if(!n.docsSite)throw new u("Docs site not found");c(t,n.docsSite);}catch(n){r(n);}}),o.command("create-site").description("Create documentation site").requiredOption("--vibe-id <id>","Vibe ID").requiredOption("--name <name>","Site name").option("--description <desc>","Description").option("--visibility <v>","Visibility (PRIVATE/PUBLIC)").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(lo,{input:{vibeId:e.vibeId,name:e.name,description:e.description,visibility:e.visibility}});a("Docs site created"),c(e,t.createDocsSite);}catch(t){r(t);}}),o.command("update-site").description("Update documentation site").argument("<id>","Site ID").option("--name <name>","Name").option("--description <desc>","Description").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.description&&(n.description=t.description),!Object.keys(n).length)throw new u("No updates specified");let s=await i(fo,{id:e,input:n});a("Docs site updated"),c(t,s.updateDocsSite);}catch(n){r(n);}}),o.command("set-visibility").description("Set site visibility").argument("<id>","Site ID").argument("<visibility>","PRIVATE or PUBLIC").option("-f, --format <format>","Output format").action(async(e,t,n)=>{try{let s=await i(Io,{id:e,visibility:t});a(`Visibility set to ${t}`),c(n,s.updateDocsSiteVisibility);}catch(s){r(s);}}),o.command("delete-site").description("Delete documentation site").argument("<id>","Site ID").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this docs site?",t.force))return;await i(So,{id:e}),a("Docs site deleted");}catch(n){r(n);}}),o.command("pages").description("List pages for a site").argument("<siteId>","Site ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Eo,{siteId:e});c(t,n.docsPages);}catch(n){r(n);}}),o.command("page").description("Get a page").argument("<id>","Page ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(To,{id:e});if(!n.docsPage)throw new u("Page not found");c(t,n.docsPage);}catch(n){r(n);}}),o.command("create-page").description("Create a page").requiredOption("--site-id <id>","Site ID").requiredOption("--title <title>","Page title").option("--slug <slug>","Page slug").option("--content <content>","Page content").option("--parent-id <id>","Parent page ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(yo,{input:{siteId:e.siteId,title:e.title,slug:e.slug,content:e.content,parentId:e.parentId}});a("Page created"),c(e,t.createDocsPage);}catch(t){r(t);}}),o.command("update-page").description("Update a page").argument("<id>","Page ID").option("--title <title>","Title").option("--content <content>","Content").option("--slug <slug>","Slug").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.title&&(n.title=t.title),t.content&&(n.content=t.content),t.slug&&(n.slug=t.slug),!Object.keys(n).length)throw new u("No updates specified");let s=await i(ho,{id:e,input:n});a("Page updated"),c(t,s.updateDocsPage);}catch(n){r(n);}}),o.command("delete-page").description("Delete a page").argument("<id>","Page ID").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this page?",t.force))return;await i(Do,{id:e}),a("Page deleted");}catch(n){r(n);}}),o.command("reorder-pages").description("Reorder pages").argument("<siteId>","Site ID").requiredOption("--pages <json>","Page order as JSON array").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=JSON.parse(t.pages),s=await i(bo,{siteId:e,pages:n});a("Pages reordered"),c(t,s.reorderDocsPages);}catch(n){r(n);}}),o.command("revisions").description("List revisions for a site").argument("<siteId>","Site ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Ao,{siteId:e});c(t,n.docsRevisions);}catch(n){r(n);}}),o.command("revision").description("Get a revision").argument("<id>","Revision ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(ko,{id:e});if(!n.docsRevision)throw new u("Revision not found");c(t,n.docsRevision);}catch(n){r(n);}}),o.command("content").description("Get docs content").argument("<siteId>","Site ID").option("--path <path>","Content path").action(async(e,t)=>{try{let n=await i(Co,{siteId:e,path:t.path});n.docsContent?console.log(n.docsContent):T("No content found");}catch(n){r(n);}}),o.command("compile").description("Compile documentation site").argument("<siteId>","Site ID").option("--publish","Publish after compile").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i($o,{siteId:e,publish:t.publish??!1});a("Docs site compiled"),c(t,n.compileDocsSite);}catch(n){r(n);}}),o.command("publish").description("Publish a revision").argument("<revisionId>","Revision ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Oo,{revisionId:e});a("Revision published"),c(t,n.publishDocsRevision);}catch(n){r(n);}}),o.command("rollback").description("Rollback to a revision").argument("<siteId>","Site ID").argument("<revisionId>","Revision ID").option("--force","Skip confirmation").action(async(e,t,n)=>{try{if(!await g(`Rollback site to revision ${t}?`,n.force))return;let s=await i(wo,{siteId:e,revisionId:t});a("Rollback complete"),c({},s.rollbackDocsRevision);}catch(s){r(s);}}),o.command("signed-url").description("Generate signed URL for a site").argument("<siteId>","Site ID").action(async e=>{try{let t=await i(_o,{siteId:e});console.log(t.generateDocsSignedUrl);}catch(t){r(t);}});}function Qo(d){let o=d.command("audit").description("Audit log management");o.command("list").description("List audit logs").option("--action <action>","Filter by action").option("--resource-type <type>","Filter by resource type").option("--status <status>","Filter by status").option("--actor-id <id>","Filter by actor").option("--from <date>","From date").option("--to <date>","To date").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.action&&(t.action=e.action),e.resourceType&&(t.resourceType=e.resourceType),e.status&&(t.status=e.status),e.actorId&&(t.actorId=e.actorId),e.from&&(t.from=e.from),e.to&&(t.to=e.to);let s=(await i(No,{filter:Object.keys(t).length?t:void 0})).vibeAuditLogs.items;c(e,s,{headers:["ID","Action","Resource","Resource ID","Actor","Status","Created"],rows:s.map(p=>[m(p.id,12),p.action,p.resourceType,m(p.resourceId,12),m(p.actorId,12),p.status,I(p.createdAt)])});}catch(t){r(t);}}),o.command("get").description("Get audit log").argument("<id>","Audit log ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(vo,{id:e});if(!n.vibeAuditLog)throw new u("Audit log not found");c(t,n.vibeAuditLog);}catch(n){r(n);}}),o.command("stats").description("Get audit log statistics").option("--action <action>","Filter by action").option("--resource-type <type>","Filter by resource type").option("--status <status>","Filter by status").option("--actor-id <id>","Filter by actor").option("--from <date>","From date").option("--to <date>","To date").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.action&&(t.action=e.action),e.resourceType&&(t.resourceType=e.resourceType),e.status&&(t.status=e.status),e.actorId&&(t.actorId=e.actorId),e.from&&(t.from=e.from),e.to&&(t.to=e.to);let n=await i(Ro,{filter:Object.keys(t).length?t:void 0});c(e,n.vibeAuditLogStats);}catch(t){r(t);}}),o.command("delete").description("Delete audit log").argument("<id>","Audit log ID").option("--reason <reason>","Deletion reason").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this audit log?",t.force))return;await i(xo,{id:e,reason:t.reason}),a("Audit log deleted");}catch(n){r(n);}}),o.command("bulk-delete").description("Bulk delete audit logs").requiredOption("--ids <ids>","Comma-separated IDs").option("--reason <reason>","Deletion reason").option("--force","Skip confirmation").action(async e=>{try{let t=e.ids.split(",").map(n=>n.trim());if(!await g(`Delete ${t.length} audit logs?`,e.force))return;await i(Lo,{ids:t,reason:e.reason}),a(`${t.length} audit logs deleted`);}catch(t){r(t);}}),o.command("export").description("Export audit logs").option("--action <action>","Filter by action").option("--resource-type <type>","Filter by resource type").option("--status <status>","Filter by status").option("--actor-id <id>","Filter by actor").option("--from <date>","From date").option("--to <date>","To date").option("--export-format <fmt>","Export format (csv/json)","json").action(async e=>{try{let t={};e.action&&(t.action=e.action),e.resourceType&&(t.resourceType=e.resourceType),e.status&&(t.status=e.status),e.actorId&&(t.actorId=e.actorId),e.from&&(t.from=e.from),e.to&&(t.to=e.to);let n=await i(Uo,{filter:Object.keys(t).length?t:void 0,exportFormat:e.exportFormat});console.log(n.exportVibeAuditLogs);}catch(t){r(t);}});}function Zo(d){let o=d.command("action").description("Vibe Actions management");o.command("list").description("List actions").option("--type <type>","Filter by action type (COMMAND, SCRIPT, WEBHOOK, WORKFLOW)").option("--trigger <trigger>","Filter by trigger type (MANUAL, SCHEDULED, EVENT, ON_DEMAND)").option("--category <category>","Filter by category").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.type&&(t.actionType=e.type.toUpperCase()),e.trigger&&(t.triggerType=e.trigger.toUpperCase()),e.category&&(t.category=e.category);let s=(await i(Wn,{filter:Object.keys(t).length?t:void 0})).actions.items;c(e,s,{headers:["ID","Name","Type","Trigger","Source","Category"],rows:s.map(p=>[m(p.id,12),p.displayName??p.name,p.actionType,p.triggerType,p.sourceType,p.category??"-"])});}catch(t){r(t);}}),o.command("get").description("Get action details").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Kn,{id:e});if(!n.action)throw new u("Action not found");c(t,n.action);}catch(n){r(n);}}),o.command("create").description("Create action").requiredOption("--name <n>","Name").option("--display-name <n>","Display name").option("--description <d>","Description").option("--type <t>","Action type (COMMAND, SCRIPT, WEBHOOK, WORKFLOW)","COMMAND").option("--trigger <t>","Trigger type (MANUAL, SCHEDULED, EVENT, ON_DEMAND)","MANUAL").option("--command <c>","Command to execute").option("--working-directory <d>","Working directory for command").option("--script <s>","Script content").option("--script-interpreter <i>","Script interpreter (e.g. bash, python)").option("--webhook-url <u>","Webhook URL").option("--webhook-method <m>","Webhook HTTP method").option("--schedule <s>","Cron schedule expression").option("--category <c>","Category").option("--tags <t>","Comma-separated tags").option("--target-agent-id <id>","Target agent ID").option("--timeout <ms>","Timeout in milliseconds",parseInt).option("--retry-count <n>","Retry count",parseInt).option("--confirmation-required","Require confirmation before execution").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name,actionType:(e.type??"COMMAND").toUpperCase(),triggerType:(e.trigger??"MANUAL").toUpperCase()};e.displayName&&(t.displayName=e.displayName),e.description&&(t.description=e.description),e.command&&(t.command=e.command),e.workingDirectory&&(t.workingDirectory=e.workingDirectory),e.script&&(t.script=e.script),e.scriptInterpreter&&(t.scriptInterpreter=e.scriptInterpreter),e.webhookUrl&&(t.webhookUrl=e.webhookUrl),e.webhookMethod&&(t.webhookMethod=e.webhookMethod),e.schedule&&(t.schedule=e.schedule),e.category&&(t.category=e.category),e.tags&&(t.tags=e.tags.split(",").map(s=>s.trim())),e.targetAgentId&&(t.targetAgentId=e.targetAgentId),e.timeout!==void 0&&(t.timeoutMs=e.timeout),e.retryCount!==void 0&&(t.retryCount=e.retryCount),e.confirmationRequired&&(t.confirmationRequired=!0);let n=await i(jn,{input:t});a("Action created"),c(e,n.createAction);}catch(t){r(t);}}),o.command("update").description("Update action").argument("<id>").option("--name <n>","Name").option("--display-name <n>","Display name").option("--description <d>","Description").option("--type <t>","Action type (COMMAND, SCRIPT, WEBHOOK, WORKFLOW)").option("--trigger <t>","Trigger type (MANUAL, SCHEDULED, EVENT, ON_DEMAND)").option("--command <c>","Command to execute").option("--working-directory <d>","Working directory for command").option("--script <s>","Script content").option("--script-interpreter <i>","Script interpreter").option("--webhook-url <u>","Webhook URL").option("--webhook-method <m>","Webhook HTTP method").option("--schedule <s>","Cron schedule expression").option("--category <c>","Category").option("--tags <t>","Comma-separated tags").option("--target-agent-id <id>","Target agent ID").option("--timeout <ms>","Timeout in milliseconds",parseInt).option("--retry-count <n>","Retry count",parseInt).option("--confirmation-required","Require confirmation before execution").option("--no-confirmation-required","Disable confirmation requirement").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.displayName&&(n.displayName=t.displayName),t.description&&(n.description=t.description),t.type&&(n.actionType=t.type.toUpperCase()),t.trigger&&(n.triggerType=t.trigger.toUpperCase()),t.command&&(n.command=t.command),t.workingDirectory&&(n.workingDirectory=t.workingDirectory),t.script&&(n.script=t.script),t.scriptInterpreter&&(n.scriptInterpreter=t.scriptInterpreter),t.webhookUrl&&(n.webhookUrl=t.webhookUrl),t.webhookMethod&&(n.webhookMethod=t.webhookMethod),t.schedule&&(n.schedule=t.schedule),t.category&&(n.category=t.category),t.tags&&(n.tags=t.tags.split(",").map(p=>p.trim())),t.targetAgentId&&(n.targetAgentId=t.targetAgentId),t.timeout!==void 0&&(n.timeoutMs=t.timeout),t.retryCount!==void 0&&(n.retryCount=t.retryCount),t.confirmationRequired!==void 0&&(n.confirmationRequired=t.confirmationRequired),!Object.keys(n).length)throw new u("No updates specified");let s=await i(Jn,{id:e,input:n});a("Action updated"),c(t,s.updateAction);}catch(n){r(n);}}),o.command("delete").description("Delete action").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this action?",t.force))return;await i(Yn,{id:e}),a("Action deleted");}catch(n){r(n);}}),o.command("duplicate").description("Duplicate action").argument("<id>").argument("[name]").option("-f, --format <format>","Output format").action(async(e,t,n)=>{try{let s=await i(zn,{id:e,name:t});a("Action duplicated"),c(n,s.duplicateAction);}catch(s){r(s);}}),o.command("execute").description("Execute action").argument("<id>").option("--agent-id <id>","Target agent ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};t.agentId&&(n.agentId=t.agentId);let p=(await i(Xn,{id:e,input:Object.keys(n).length?n:void 0})).executeAction,f=p.status;f==="SUCCESS"?a(`Action executed successfully${p.durationMs?` (${p.durationMs}ms)`:""}`):f==="RUNNING"||f==="PENDING"?a(`Action execution started (${f})`):T(p.errorMessage??`Execution ${f}`),c(t,p);}catch(n){r(n);}}),o.command("install").description("Install action from store").argument("<storeItemId>").option("--version <v>","Version to install").option("--name <n>","Custom name for installed action").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Qn,{storeItemId:e,version:t.version,name:t.name});a("Action installed from store"),c(t,n.installActionFromStore);}catch(n){r(n);}}),o.command("history").description("List action execution history").argument("[actionId]").option("--status <s>","Filter by status (PENDING, RUNNING, SUCCESS, FAILURE, TIMEOUT, CANCELLED)").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};e&&(n.actionId=e),t.status&&(n.status=t.status.toUpperCase());let p=(await i(to,{filter:Object.keys(n).length?n:void 0})).actionExecutions.items;c(t,p,{headers:["ID","Action ID","Status","Trigger","Duration","Started"],rows:p.map(f=>[m(f.id,12),m(f.actionId,12),y(f.status),f.triggerType,f.durationMs?`${f.durationMs}ms`:"-",I(f.startedAt)])});}catch(n){r(n);}}),o.command("cancel-execution").description("Cancel a running action execution").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Zn,{id:e});a("Action execution cancelled"),c(t,n.cancelActionExecution);}catch(n){r(n);}}),o.command("execution").description("Get action execution details").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(eo,{id:e});if(!n.actionExecution)throw new u("Action execution not found");c(t,n.actionExecution);}catch(n){r(n);}}),o.command("schedule").description("Create a scheduled job for an action").argument("<actionId>","Action ID to schedule").option("--cron <expr>","Cron expression (for CRON schedule type)").option("--timezone <tz>","Timezone for the schedule","UTC").option("--schedule-type <type>","Schedule type (CRON, ONE_TIME, FIXED_INTERVAL)","CRON").option("--scheduled-at <date>","ISO date for ONE_TIME schedule").option("--interval <n>","Interval value (for FIXED_INTERVAL)",parseInt).option("--interval-unit <unit>","Interval unit (MINUTES, HOURS, DAYS)").option("--start-date <date>","Schedule start date (ISO)").option("--end-date <date>","Schedule end date (ISO)").option("--name <name>","Name for the scheduled job").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={actionId:e,scheduleType:(t.scheduleType??"CRON").toUpperCase()};t.cron&&(n.cronExpression=t.cron),t.timezone&&(n.timezone=t.timezone),t.scheduledAt&&(n.scheduledAt=t.scheduledAt),t.interval!==void 0&&(n.interval=t.interval),t.intervalUnit&&(n.intervalUnit=t.intervalUnit.toUpperCase()),t.startDate&&(n.startDate=t.startDate),t.endDate&&(n.endDate=t.endDate),t.name&&(n.name=t.name);let s=await i(oo,{input:n});a("Scheduled job created"),c(t,s.createScheduledJob);}catch(n){r(n);}}),o.command("unschedule").description("Delete a scheduled job").argument("<scheduledJobId>","Scheduled job ID to delete").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this scheduled job?",t.force))return;await i(io,{id:e}),a("Scheduled job deleted");}catch(n){r(n);}}),o.command("schedules").description("List scheduled jobs").option("--action-id <id>","Filter by action ID").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.actionId&&(t.actionId=e.actionId);let s=(await i(ro,{filter:Object.keys(t).length?t:void 0})).scheduledJobs.jobs;c(e,s,{headers:["ID","Name","Type","Status","Action ID","Cron","Next Run"],rows:s.map(p=>[m(p.id,12),p.name??"-",p.scheduleType,y(p.status),m(p.actionId,12),p.cronExpression??"-",p.nextExecutionAt?I(p.nextExecutionAt):"-"])});}catch(t){r(t);}});}function ti(d){let o=d.command("analytics").description("VibeControls analytics");o.command("overview").description("Show analytics overview for all entities").option("--start-date <date>","Start date (ISO format)",new Date(Date.now()-10080*60*1e3).toISOString()).option("--end-date <date>","End date (ISO format)",new Date().toISOString()).option("--granularity <g>","Granularity (HOUR, DAY, WEEK, MONTH)","DAY").option("--agent-id <id>","Filter by agent ID").option("--vibe-id <id>","Filter by vibe ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(V,{input:{startDate:e.startDate,endDate:e.endDate,granularity:e.granularity,agentId:e.agentId||void 0,vibeId:e.vibeId||void 0}});c(e,t.vibecontrolsAnalytics);}catch(t){r(t);}}),o.command("agents").description("Show agent analytics").option("--start-date <date>","Start date (ISO format)",new Date(Date.now()-10080*60*1e3).toISOString()).option("--end-date <date>","End date (ISO format)",new Date().toISOString()).option("--granularity <g>","Granularity","DAY").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(V,{input:{startDate:e.startDate,endDate:e.endDate,granularity:e.granularity,entityTypes:["AGENT"]}});c(e,t.vibecontrolsAnalytics.agents);}catch(t){r(t);}}),o.command("sessions").description("Show session analytics").option("--start-date <date>","Start date (ISO format)",new Date(Date.now()-10080*60*1e3).toISOString()).option("--end-date <date>","End date (ISO format)",new Date().toISOString()).option("--granularity <g>","Granularity","DAY").option("--agent-id <id>","Filter by agent ID").option("--vibe-id <id>","Filter by vibe ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(V,{input:{startDate:e.startDate,endDate:e.endDate,granularity:e.granularity,entityTypes:["SESSION"],agentId:e.agentId||void 0,vibeId:e.vibeId||void 0}});c(e,t.vibecontrolsAnalytics.sessions);}catch(t){r(t);}}),o.command("actions").description("Show action analytics").option("--start-date <date>","Start date (ISO format)",new Date(Date.now()-10080*60*1e3).toISOString()).option("--end-date <date>","End date (ISO format)",new Date().toISOString()).option("--granularity <g>","Granularity","DAY").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(V,{input:{startDate:e.startDate,endDate:e.endDate,granularity:e.granularity,entityTypes:["ACTION"]}});c(e,t.vibecontrolsAnalytics.actions);}catch(t){r(t);}});}var li={id:"vibecontrols",version:"1.0.0",displayName:"VibeControls",dependsOn:["auth","workspaces"],register(d,o){Q(o),Vo(d),Po(d),Go(d),Bo(d),qo(d),Fo(d),Mo(d),Wo(d),Ko(d),Jo(d),Yo(d),zo(d),Xo(d),Qo(d),Zo(d),ti(d);}},oa=li;module.exports=oa;
|