quoxcli 0.2.0 → 0.3.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/LICENSE +1 -1
- package/README.md +2 -0
- package/bin/quox.js +99 -126
- package/lib/api/endpoints/admin.js +26 -0
- package/lib/api/endpoints/agent-schedules.js +26 -0
- package/lib/api/endpoints/agents.js +7 -0
- package/lib/api/endpoints/assistants.js +12 -0
- package/lib/api/endpoints/away.js +15 -0
- package/lib/api/endpoints/chat.js +7 -0
- package/lib/api/endpoints/contactsq.js +2 -0
- package/lib/api/endpoints/conversations.js +14 -0
- package/lib/api/endpoints/executions.js +13 -0
- package/lib/api/endpoints/fetchAllowlist.js +27 -0
- package/lib/api/endpoints/files.js +14 -0
- package/lib/api/endpoints/hat.js +30 -0
- package/lib/api/endpoints/inbox.js +20 -0
- package/lib/api/endpoints/index.js +14 -0
- package/lib/api/endpoints/memory.js +19 -0
- package/lib/api/endpoints/mind.js +13 -0
- package/lib/api/endpoints/mon.js +6 -0
- package/lib/api/endpoints/objectives.js +6 -0
- package/lib/api/endpoints/plugins.js +18 -0
- package/lib/api/endpoints/presence.js +33 -0
- package/lib/api/endpoints/quoxplan.js +7 -0
- package/lib/api/endpoints/quoxseo.js +6 -0
- package/lib/api/endpoints/router.js +17 -0
- package/lib/api/endpoints/safety.js +7 -0
- package/lib/api/endpoints/skills.js +20 -0
- package/lib/api/endpoints/stepup.js +20 -0
- package/lib/api/endpoints/teams.js +2 -2
- package/lib/api/endpoints/triggers.js +26 -0
- package/lib/api/endpoints/v1.js +86 -0
- package/lib/api/endpoints/ward.js +7 -0
- package/lib/api/endpoints/workflows.js +7 -0
- package/lib/api/endpoints/x.js +8 -0
- package/lib/commands/actions.js +61 -0
- package/lib/commands/admin.js +16 -0
- package/lib/commands/agent.js +163 -27
- package/lib/commands/agentAttach.js +94 -6
- package/lib/commands/approvals.js +73 -1
- package/lib/commands/aside.js +24 -0
- package/lib/commands/ask.js +144 -0
- package/lib/commands/assistant.js +59 -4
- package/lib/commands/auth.js +8 -2
- package/lib/commands/backup.js +8 -4
- package/lib/commands/brain.js +105 -14
- package/lib/commands/build.js +19 -5
- package/lib/commands/chat.js +57 -2
- package/lib/commands/claude.js +34 -8
- package/lib/commands/contacts.js +49 -0
- package/lib/commands/conversation.js +35 -4
- package/lib/commands/dashboard.js +43 -0
- package/lib/commands/department.js +28 -7
- package/lib/commands/devResident.js +15 -3
- package/lib/commands/devSupervisor.js +13 -1
- package/lib/commands/discord.js +75 -39
- package/lib/commands/done.js +98 -28
- package/lib/commands/engagement.js +17 -6
- package/lib/commands/fetchAllowlist.js +71 -0
- package/lib/commands/file.js +38 -1
- package/lib/commands/fleet.js +311 -4
- package/lib/commands/governance.js +12 -3
- package/lib/commands/gripe.js +44 -13
- package/lib/commands/hat.js +178 -9
- package/lib/commands/helpers.js +18 -1
- package/lib/commands/hyperion.js +58 -0
- package/lib/commands/inbox.js +74 -23
- package/lib/commands/licence.js +14 -155
- package/lib/commands/lucid.js +10 -4
- package/lib/commands/memory.js +85 -8
- package/lib/commands/mind.js +71 -0
- package/lib/commands/mon.js +69 -2
- package/lib/commands/monitoring.js +1 -1
- package/lib/commands/motion.js +2 -2
- package/lib/commands/nucleus.js +48 -17
- package/lib/commands/objective.js +11 -0
- package/lib/commands/offload.js +89 -0
- package/lib/commands/onboard.js +2 -1
- package/lib/commands/org.js +11 -1
- package/lib/commands/peek.js +28 -0
- package/lib/commands/plan.js +38 -0
- package/lib/commands/plugin.js +110 -0
- package/lib/commands/presence.js +89 -0
- package/lib/commands/provider.js +159 -0
- package/lib/commands/qlarity.js +19 -3
- package/lib/commands/quoxchat.js +13 -4
- package/lib/commands/quoxseo.js +38 -0
- package/lib/commands/reach.js +2 -1
- package/lib/commands/router.js +77 -0
- package/lib/commands/rows.js +358 -0
- package/lib/commands/run.js +64 -9
- package/lib/commands/server.js +292 -0
- package/lib/commands/setup.js +33 -7
- package/lib/commands/skills.js +48 -5
- package/lib/commands/slot.js +260 -7
- package/lib/commands/status.js +1 -1
- package/lib/commands/team.js +3 -1
- package/lib/commands/tips.js +23 -0
- package/lib/commands/tool.js +133 -45
- package/lib/commands/trace.js +12 -7
- package/lib/commands/trigger.js +95 -0
- package/lib/commands/update.js +46 -0
- package/lib/commands/vault.js +31 -8
- package/lib/commands/vm.js +237 -0
- package/lib/commands/voice.js +34 -3
- package/lib/commands/volt.js +45 -3
- package/lib/commands/walkthrough.js +32 -0
- package/lib/commands/watch.js +73 -21
- package/lib/commands/welcome.js +14 -0
- package/lib/commands/workflow.js +189 -32
- package/lib/commands/x.js +13 -4
- package/lib/core/actingAs.js +2 -2
- package/lib/core/activeSummary.js +186 -0
- package/lib/core/aside.js +54 -0
- package/lib/core/askDecision.js +60 -0
- package/lib/core/auth.js +164 -13
- package/lib/core/callerSource.js +1 -1
- package/lib/core/cliBuild.js +62 -0
- package/lib/core/client.js +144 -35
- package/lib/core/commandRegistrars.js +121 -0
- package/lib/core/config.js +142 -24
- package/lib/core/customHats.js +168 -0
- package/lib/core/doneEngineFetch.js +8 -0
- package/lib/core/errors.js +329 -20
- package/lib/core/global-flags.js +105 -5
- package/lib/core/hyperion.js +102 -0
- package/lib/core/inboxResolution.js +65 -0
- package/lib/core/lazyCommands.js +4 -1
- package/lib/core/offload.js +504 -0
- package/lib/core/org-override.js +1 -1
- package/lib/core/orgResolve.js +70 -0
- package/lib/core/output.js +4 -4
- package/lib/core/peek.js +126 -0
- package/lib/core/profileUsers.js +51 -0
- package/lib/core/promptCancel.js +18 -0
- package/lib/core/repoPath.js +11 -0
- package/lib/core/residentSeed.js +3 -1
- package/lib/core/rootOptions.js +39 -0
- package/lib/core/router.js +168 -0
- package/lib/core/selfUpdate.js +188 -0
- package/lib/core/sessionsOverview.js +64 -0
- package/lib/core/slotKeeper.js +248 -3
- package/lib/core/slotWake.js +120 -0
- package/lib/core/supervisorEngine.js +71 -2
- package/lib/core/version.js +1 -1
- package/lib/core/vm.js +361 -0
- package/lib/core/vmTui.js +86 -0
- package/lib/core/walkthrough.js +35 -0
- package/lib/hyperion/deck.js +29 -0
- package/lib/lucid/LucidCard.jsx +68 -0
- package/lib/lucid/LucidIntro.jsx +45 -58
- package/lib/lucid/cards.js +86 -0
- package/lib/lucid/markdown.js +81 -0
- package/lib/lucid/motion.js +56 -0
- package/lib/quoxon/activity.js +14 -2
- package/lib/quoxon/aocl.js +117 -0
- package/lib/quoxon/api.js +504 -25
- package/lib/quoxon/app.js +3000 -230
- package/lib/quoxon/approvalFacts.js +94 -0
- package/lib/quoxon/approvalsView.js +325 -0
- package/lib/quoxon/asideView.js +40 -0
- package/lib/quoxon/ask.js +121 -0
- package/lib/quoxon/away.js +52 -0
- package/lib/quoxon/bang.js +224 -0
- package/lib/quoxon/bulkRisk.js +17 -0
- package/lib/quoxon/capabilities.js +13 -6
- package/lib/quoxon/cells.js +53 -0
- package/lib/quoxon/commandShort.js +112 -0
- package/lib/quoxon/commands.js +363 -38
- package/lib/quoxon/connect.js +210 -23
- package/lib/quoxon/connectCard.js +19 -2
- package/lib/quoxon/consent.js +86 -0
- package/lib/quoxon/copy.js +4 -3
- package/lib/quoxon/countdownLine.js +11 -0
- package/lib/quoxon/demo.autoplay.js +29 -0
- package/lib/quoxon/demo.fixtures.js +1 -1
- package/lib/quoxon/demo.js +44 -3
- package/lib/quoxon/devObserver.js +20 -0
- package/lib/quoxon/dividerAocl.js +191 -0
- package/lib/quoxon/dividerRule.js +57 -0
- package/lib/quoxon/dragonModes.js +150 -0
- package/lib/quoxon/dragonView.js +41 -0
- package/lib/quoxon/earlyInput.js +40 -0
- package/lib/quoxon/echo.js +15 -0
- package/lib/quoxon/egg.js +2 -2
- package/lib/quoxon/events.js +244 -25
- package/lib/quoxon/feedback.js +50 -0
- package/lib/quoxon/gallery.js +21 -7
- package/lib/quoxon/handoffOffer.js +78 -0
- package/lib/quoxon/hatSwitch.js +37 -0
- package/lib/quoxon/headless.js +161 -0
- package/lib/quoxon/hostUrls.js +41 -0
- package/lib/quoxon/indicator.js +6 -2
- package/lib/quoxon/intent.js +12 -1
- package/lib/quoxon/keys.js +49 -6
- package/lib/quoxon/launcher.js +103 -0
- package/lib/quoxon/main.js +92 -160
- package/lib/quoxon/markdown.js +45 -21
- package/lib/quoxon/markdownSettle.js +19 -0
- package/lib/quoxon/matrixDomains.json +46 -0
- package/lib/quoxon/mentions.js +90 -0
- package/lib/quoxon/mind.js +103 -0
- package/lib/quoxon/mode.js +46 -0
- package/lib/quoxon/model.js +132 -26
- package/lib/quoxon/modelPrefs.js +345 -0
- package/lib/quoxon/motion/clock.js +3 -2
- package/lib/quoxon/motion/level.js +91 -0
- package/lib/quoxon/mouse.js +211 -0
- package/lib/quoxon/noai.js +57 -0
- package/lib/quoxon/objects/away.js +72 -0
- package/lib/quoxon/objects/fetch.js +17 -5
- package/lib/quoxon/objects/fleet.js +149 -0
- package/lib/quoxon/objects/health.js +186 -0
- package/lib/quoxon/objects/index.js +24 -3
- package/lib/quoxon/objects/mirror.js +137 -0
- package/lib/quoxon/objects/peek.js +17 -0
- package/lib/quoxon/objects/prove.js +130 -0
- package/lib/quoxon/objects/replay.js +125 -0
- package/lib/quoxon/objects/sitrep.js +58 -0
- package/lib/quoxon/objects/view.js +11 -0
- package/lib/quoxon/onboarding/copy.js +32 -4
- package/lib/quoxon/onboarding/credential.js +17 -4
- package/lib/quoxon/onboarding/dockerOffer.js +45 -0
- package/lib/quoxon/onboarding/failureCause.js +33 -0
- package/lib/quoxon/onboarding/finish.js +15 -0
- package/lib/quoxon/onboarding/index.js +34 -7
- package/lib/quoxon/onboarding/installRunner.js +64 -5
- package/lib/quoxon/onboarding/preflight.js +17 -3
- package/lib/quoxon/onboarding/probe.js +65 -0
- package/lib/quoxon/onboarding/view.js +76 -19
- package/lib/quoxon/orgLabel.js +10 -0
- package/lib/quoxon/orgSwitch.js +33 -0
- package/lib/quoxon/ownBroadcast.js +22 -0
- package/lib/quoxon/palette.js +43 -0
- package/lib/quoxon/print.js +9 -5
- package/lib/quoxon/profileSwitch.js +53 -0
- package/lib/quoxon/promptHistory.js +41 -0
- package/lib/quoxon/providers.js +48 -0
- package/lib/quoxon/qart.js +20 -51
- package/lib/quoxon/qdragon.js +410 -0
- package/lib/quoxon/qdragonFly.js +61 -0
- package/lib/quoxon/qdragonScenes.js +282 -0
- package/lib/quoxon/qeyes.js +213 -0
- package/lib/quoxon/qmotion.js +58 -37
- package/lib/quoxon/render.js +638 -119
- package/lib/quoxon/resend.js +72 -0
- package/lib/quoxon/roster.js +95 -9
- package/lib/quoxon/route.js +6 -5
- package/lib/quoxon/rows.js +711 -0
- package/lib/quoxon/rowsStore.js +80 -0
- package/lib/quoxon/screenContext.js +150 -0
- package/lib/quoxon/screenFrames.js +254 -0
- package/lib/quoxon/session.js +172 -2
- package/lib/quoxon/sessionDead.js +17 -0
- package/lib/quoxon/signin.js +125 -0
- package/lib/quoxon/slash/agents.js +112 -0
- package/lib/quoxon/slash/argSources.js +65 -0
- package/lib/quoxon/slash/args.js +65 -0
- package/lib/quoxon/slash/automate.js +89 -0
- package/lib/quoxon/slash/broadcast.js +140 -0
- package/lib/quoxon/slash/broadcastRun.js +108 -0
- package/lib/quoxon/slash/card.js +30 -0
- package/lib/quoxon/slash/challenge.js +114 -0
- package/lib/quoxon/slash/cliCommand.js +53 -0
- package/lib/quoxon/slash/cliLeaves.json +948 -0
- package/lib/quoxon/slash/compact.js +1 -1
- package/lib/quoxon/slash/confirm.js +30 -0
- package/lib/quoxon/slash/crystallize.js +69 -0
- package/lib/quoxon/slash/dashboard.js +136 -0
- package/lib/quoxon/slash/draft.js +54 -0
- package/lib/quoxon/slash/hatWalk.js +206 -0
- package/lib/quoxon/slash/inverses.js +77 -0
- package/lib/quoxon/slash/killer.js +24 -0
- package/lib/quoxon/slash/killerApi.js +16 -0
- package/lib/quoxon/slash/ledger.js +13 -8
- package/lib/quoxon/slash/listView.js +3 -1
- package/lib/quoxon/slash/modelCmd.js +261 -0
- package/lib/quoxon/slash/palette.js +21 -7
- package/lib/quoxon/slash/paletteController.js +117 -7
- package/lib/quoxon/slash/panels.js +21 -6
- package/lib/quoxon/slash/picker.js +20 -2
- package/lib/quoxon/slash/restart.js +71 -13
- package/lib/quoxon/slash/rowCmd.js +157 -0
- package/lib/quoxon/slash/rowWalk.js +175 -0
- package/lib/quoxon/slash/settings.js +16 -6
- package/lib/quoxon/slash/spawn.js +177 -0
- package/lib/quoxon/slash/stepUp.js +274 -0
- package/lib/quoxon/slash/stepUpCard.js +60 -0
- package/lib/quoxon/slash/stepUpCmds.js +78 -0
- package/lib/quoxon/slash/undoApi.js +38 -0
- package/lib/quoxon/slash/undoCmd.js +49 -0
- package/lib/quoxon/slash/undoWish.js +15 -0
- package/lib/quoxon/slash/watch.js +164 -0
- package/lib/quoxon/slash/wish.js +23 -0
- package/lib/quoxon/slash/wishCmd.js +32 -0
- package/lib/quoxon/slotChat.js +300 -0
- package/lib/quoxon/slotFormat.js +195 -0
- package/lib/quoxon/slotRun.js +131 -0
- package/lib/quoxon/sound/mapping.js +2 -1
- package/lib/quoxon/stray.js +22 -0
- package/lib/quoxon/suggestCommand.js +59 -0
- package/lib/quoxon/term.js +46 -11
- package/lib/quoxon/textBuffer.js +176 -2
- package/lib/quoxon/theme.js +58 -25
- package/lib/quoxon/tips.js +433 -0
- package/lib/quoxon/toolError.js +41 -0
- package/lib/quoxon/transcript.js +42 -4
- package/lib/quoxon/web/qface.js +18 -10
- package/lib/quoxon/welcome.js +1 -1
- package/lib/quoxon/whatsnew.js +136 -0
- package/lib/quoxon/whatsnew.jsonl +89 -0
- package/lib/quoxon/windowOrg.js +113 -0
- package/lib/server/diag.js +129 -0
- package/lib/server/doctor.js +71 -0
- package/lib/server/install.js +149 -0
- package/lib/server/pluginEnable.js +161 -0
- package/lib/server/skew.js +56 -0
- package/lib/server/snapshot.js +131 -0
- package/lib/server/status.js +128 -0
- package/lib/server/sys.js +65 -0
- package/lib/server/uninstall.js +63 -0
- package/lib/server/update.js +234 -0
- package/lib/toolOutputShape.js +315 -0
- package/lib/tui/views/HyperionDeck.jsx +79 -0
- package/lib/tui/views/LucidDeck.jsx +209 -217
- package/package.json +4 -1
- package/lib/core/websiteSession.js +0 -148
|
@@ -58,8 +58,13 @@ import { assistants } from './assistants.js';
|
|
|
58
58
|
import { audit } from './audit.js';
|
|
59
59
|
import { auth } from './auth.js';
|
|
60
60
|
import { awareness } from './awareness.js';
|
|
61
|
+
import { router } from './router.js';
|
|
62
|
+
import { mind } from './mind.js';
|
|
61
63
|
import { lucid } from './lucid.js';
|
|
64
|
+
import { away } from './away.js';
|
|
65
|
+
import { presence } from './presence.js';
|
|
62
66
|
import { invites } from './invites.js';
|
|
67
|
+
import { agentSchedules } from './agent-schedules.js';
|
|
63
68
|
import { backupSchedules } from './backup-schedules.js';
|
|
64
69
|
import { backups } from './backups.js';
|
|
65
70
|
import { brain } from './brain.js';
|
|
@@ -100,6 +105,7 @@ import { quoxchat } from './quoxchat.js';
|
|
|
100
105
|
import { quoxflow } from './quoxflow.js';
|
|
101
106
|
import { quoxplan } from './quoxplan.js';
|
|
102
107
|
import { qlarity } from './qlarity.js';
|
|
108
|
+
import { fetchAllowlist } from './fetchAllowlist.js';
|
|
103
109
|
import { quoxseo } from './quoxseo.js';
|
|
104
110
|
import { telephony } from './telephony.js';
|
|
105
111
|
import { voice } from './voice.js';
|
|
@@ -124,6 +130,7 @@ import { v1 } from './v1.js';
|
|
|
124
130
|
import { vault } from './vault.js';
|
|
125
131
|
import { volt } from './volt.js';
|
|
126
132
|
import { safety } from './safety.js';
|
|
133
|
+
import { stepup } from './stepup.js';
|
|
127
134
|
import { ward } from './ward.js';
|
|
128
135
|
import { webhooks } from './webhooks.js';
|
|
129
136
|
import { workflows } from './workflows.js';
|
|
@@ -137,8 +144,13 @@ export const ENDPOINTS = {
|
|
|
137
144
|
...audit,
|
|
138
145
|
...auth,
|
|
139
146
|
...awareness,
|
|
147
|
+
...router,
|
|
148
|
+
...mind,
|
|
140
149
|
...lucid,
|
|
150
|
+
...away,
|
|
151
|
+
...presence,
|
|
141
152
|
...invites,
|
|
153
|
+
...agentSchedules,
|
|
142
154
|
...backupSchedules,
|
|
143
155
|
...backups,
|
|
144
156
|
...brain,
|
|
@@ -179,6 +191,7 @@ export const ENDPOINTS = {
|
|
|
179
191
|
...quoxflow,
|
|
180
192
|
...quoxplan,
|
|
181
193
|
...qlarity,
|
|
194
|
+
...fetchAllowlist,
|
|
182
195
|
...quoxseo,
|
|
183
196
|
...telephony,
|
|
184
197
|
...voice,
|
|
@@ -203,6 +216,7 @@ export const ENDPOINTS = {
|
|
|
203
216
|
...vault,
|
|
204
217
|
...volt,
|
|
205
218
|
...safety,
|
|
219
|
+
...stepup,
|
|
206
220
|
...ward,
|
|
207
221
|
...webhooks,
|
|
208
222
|
...workflows,
|
|
@@ -66,6 +66,25 @@ export const memory = {
|
|
|
66
66
|
path: ({ id }) => `/api/memory/${id}/reinstate`,
|
|
67
67
|
tags: ['live-write'],
|
|
68
68
|
},
|
|
69
|
+
// QUOXMIND #1111: the core set.
|
|
70
|
+
'memory.core-set': {
|
|
71
|
+
method: 'GET',
|
|
72
|
+
service: 'memory',
|
|
73
|
+
path: () => `/api/memory/core-set`,
|
|
74
|
+
tags: ['live-safe'],
|
|
75
|
+
},
|
|
76
|
+
'memory.pin': {
|
|
77
|
+
method: 'POST',
|
|
78
|
+
service: 'memory',
|
|
79
|
+
path: ({ id }) => `/api/memory/${id}/pin`,
|
|
80
|
+
tags: ['live-write'],
|
|
81
|
+
},
|
|
82
|
+
'memory.unpin': {
|
|
83
|
+
method: 'DELETE',
|
|
84
|
+
service: 'memory',
|
|
85
|
+
path: ({ id }) => `/api/memory/${id}/pin`,
|
|
86
|
+
tags: ['live-write'],
|
|
87
|
+
},
|
|
69
88
|
'memory.update': {
|
|
70
89
|
method: 'PATCH',
|
|
71
90
|
service: 'memory',
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 'mind.*' endpoints: QuoxMind cognitive implants (read-only).
|
|
3
|
+
* Collector routes: GET /api/v1/mind/implants, /api/v1/mind/implants/:id,
|
|
4
|
+
* /api/v1/mind/health, /api/v1/mind/mirror (the compact System Status block CommanderQ
|
|
5
|
+
* is given, plus its age). Org-scoped, requireServiceOrUserAuth.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export const mind = {
|
|
9
|
+
'mind.implants': { method: 'GET', service: 'collector', path: () => `/api/v1/mind/implants`, tags: ['live-safe'] },
|
|
10
|
+
'mind.implant': { method: 'GET', service: 'collector', path: ({ id }) => `/api/v1/mind/implants/${encodeURIComponent(id)}`, tags: ['live-safe'] },
|
|
11
|
+
'mind.health': { method: 'GET', service: 'collector', path: () => `/api/v1/mind/health`, tags: ['live-safe'] },
|
|
12
|
+
'mind.mirror': { method: 'GET', service: 'collector', path: () => `/api/v1/mind/mirror`, tags: ['live-safe'] },
|
|
13
|
+
};
|
package/lib/api/endpoints/mon.js
CHANGED
|
@@ -85,6 +85,12 @@ export const mon = {
|
|
|
85
85
|
path: ({ id }) => `/docker/containers/${id}`,
|
|
86
86
|
tags: ['live-safe'],
|
|
87
87
|
},
|
|
88
|
+
'mon.docker.containers.inspect': {
|
|
89
|
+
method: 'GET',
|
|
90
|
+
service: 'collector',
|
|
91
|
+
path: ({ id }) => `/docker/containers/${id}/inspect`,
|
|
92
|
+
tags: ['live-safe'],
|
|
93
|
+
},
|
|
88
94
|
'mon.docker.containers.list': {
|
|
89
95
|
method: 'GET',
|
|
90
96
|
service: 'collector',
|
|
@@ -11,6 +11,12 @@ export const objectives = {
|
|
|
11
11
|
path: ({ id }) => `/api/objectives/${id}/approve-plan`,
|
|
12
12
|
tags: ['live-write'],
|
|
13
13
|
},
|
|
14
|
+
'objectives.cancel': {
|
|
15
|
+
method: 'DELETE',
|
|
16
|
+
service: 'tasks',
|
|
17
|
+
path: ({ id }) => `/api/objectives/${id}`,
|
|
18
|
+
tags: ['live-write'],
|
|
19
|
+
},
|
|
14
20
|
'objectives.checkpoint-approve': {
|
|
15
21
|
method: 'POST',
|
|
16
22
|
service: 'tasks',
|
|
@@ -101,6 +101,24 @@ export const plugins = {
|
|
|
101
101
|
path: ({ orgId, pluginId, name }) => `/api/orgs/${orgId}/plugins/${pluginId}/secrets/${name}`,
|
|
102
102
|
tags: ['live-write'],
|
|
103
103
|
},
|
|
104
|
+
'plugins.revocations.create': {
|
|
105
|
+
method: 'POST',
|
|
106
|
+
service: 'auth',
|
|
107
|
+
path: ({ orgId }) => `/api/orgs/${orgId}/plugin-revocations`,
|
|
108
|
+
tags: ['live-write'],
|
|
109
|
+
},
|
|
110
|
+
'plugins.revocations.delete': {
|
|
111
|
+
method: 'DELETE',
|
|
112
|
+
service: 'auth',
|
|
113
|
+
path: ({ orgId, revocationId }) => `/api/orgs/${orgId}/plugin-revocations/${revocationId}`,
|
|
114
|
+
tags: ['live-write'],
|
|
115
|
+
},
|
|
116
|
+
'plugins.revocations.list': {
|
|
117
|
+
method: 'GET',
|
|
118
|
+
service: 'auth',
|
|
119
|
+
path: ({ orgId }) => `/api/orgs/${orgId}/plugin-revocations`,
|
|
120
|
+
tags: ['live-safe'],
|
|
121
|
+
},
|
|
104
122
|
'plugins.trusted-keys.create': {
|
|
105
123
|
method: 'POST',
|
|
106
124
|
service: 'auth',
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 'presence.*' endpoints: PRESENCE (owner 2026-10-16). /afk, /sleep, /back in quox, `quox presence`.
|
|
3
|
+
* Collector routes GET/PUT /api/v1/presence (org from the verified caller; only a human login sets its own).
|
|
4
|
+
*
|
|
5
|
+
* See cli/lib/api/endpoints/index.js for the fragment convention.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export const presence = {
|
|
9
|
+
'presence.list': {
|
|
10
|
+
method: 'GET',
|
|
11
|
+
service: 'collector',
|
|
12
|
+
path: () => `/api/v1/presence`,
|
|
13
|
+
tags: ['live-safe'],
|
|
14
|
+
},
|
|
15
|
+
'presence.get': {
|
|
16
|
+
method: 'GET',
|
|
17
|
+
service: 'collector',
|
|
18
|
+
path: ({ who }) => `/api/v1/presence/${encodeURIComponent(who)}`,
|
|
19
|
+
tags: ['live-safe'],
|
|
20
|
+
},
|
|
21
|
+
'presence.activity': {
|
|
22
|
+
method: 'POST',
|
|
23
|
+
service: 'collector',
|
|
24
|
+
path: () => `/api/v1/presence/activity`,
|
|
25
|
+
tags: ['live-write'],
|
|
26
|
+
},
|
|
27
|
+
'presence.set': {
|
|
28
|
+
method: 'PUT',
|
|
29
|
+
service: 'collector',
|
|
30
|
+
path: () => `/api/v1/presence`,
|
|
31
|
+
tags: ['live-write'],
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -27,6 +27,13 @@ export const quoxplan = {
|
|
|
27
27
|
path: () => `/api/v1/quoxplan/roadmaps`,
|
|
28
28
|
tags: ['live-write'],
|
|
29
29
|
},
|
|
30
|
+
// Read-only free-text search over streams (id, name, summary, notes, plan, phase titles).
|
|
31
|
+
'quoxplan.search': {
|
|
32
|
+
method: 'GET',
|
|
33
|
+
service: 'collector',
|
|
34
|
+
path: () => `/api/v1/quoxplan/search`,
|
|
35
|
+
tags: ['live-safe'],
|
|
36
|
+
},
|
|
30
37
|
'quoxplan.roadmap.streams.list': {
|
|
31
38
|
method: 'GET',
|
|
32
39
|
service: 'collector',
|
|
@@ -77,6 +77,12 @@ export const quoxseo = {
|
|
|
77
77
|
service: 'collector',
|
|
78
78
|
path: () => `/api/v1/quoxseo/sites`,
|
|
79
79
|
},
|
|
80
|
+
// Symmetric removal (quoxwebsite#63); org-scoped at the collector proxy.
|
|
81
|
+
'quoxseo.sites.remove': {
|
|
82
|
+
method: 'DELETE',
|
|
83
|
+
service: 'collector',
|
|
84
|
+
path: ({ id }) => `/api/v1/quoxseo/sites/${encodeURIComponent(id)}`,
|
|
85
|
+
},
|
|
80
86
|
// quox#676: governed report delivery (email via instance SMTP and/or the HITL
|
|
81
87
|
// inbox, AEE-witnessed at the collector).
|
|
82
88
|
'quoxseo.report.deliver': {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 'router.*' endpoints: RouterOS identity (quoxai/quox#1236).
|
|
3
|
+
* Collector route: GET /api/v1/mikrotik/tls-fingerprint (requireServiceOrUserAuth).
|
|
4
|
+
* Handshake only: the collector reads the certificate the configured router
|
|
5
|
+
* endpoint presents and sends NO credentials. Nothing is stored or pinned.
|
|
6
|
+
*
|
|
7
|
+
* See cli/lib/api/endpoints/index.js for the fragment convention.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export const router = {
|
|
11
|
+
'router.tlsFingerprint': {
|
|
12
|
+
method: 'GET',
|
|
13
|
+
service: 'collector',
|
|
14
|
+
path: () => `/api/v1/mikrotik/tls-fingerprint`,
|
|
15
|
+
tags: ['live-safe'],
|
|
16
|
+
},
|
|
17
|
+
};
|
|
@@ -43,4 +43,11 @@ export const safety = {
|
|
|
43
43
|
path: () => `/api/v1/safety/history`,
|
|
44
44
|
tags: ['live-safe'],
|
|
45
45
|
},
|
|
46
|
+
// QUOXON-STEPUP: a human with a live step-up token overrides ONE blocked action (collector routes/overrides.js).
|
|
47
|
+
'safety.override': {
|
|
48
|
+
method: 'POST',
|
|
49
|
+
service: 'collector',
|
|
50
|
+
path: () => `/api/v1/overrides`,
|
|
51
|
+
tags: ['live-write'],
|
|
52
|
+
},
|
|
46
53
|
};
|
|
@@ -161,6 +161,19 @@ export const skills = {
|
|
|
161
161
|
path: ({ qid }) => `/api/quox-skills/review-queue/${qid}/reject`,
|
|
162
162
|
tags: ['live-write'],
|
|
163
163
|
},
|
|
164
|
+
// #1006: the crystal store (quoxflow skills.ts), where `skills from-execution` writes; list/show merge it in
|
|
165
|
+
'skills.crystals.list': {
|
|
166
|
+
method: 'GET',
|
|
167
|
+
service: 'quoxflow',
|
|
168
|
+
path: () => `/api/skills`,
|
|
169
|
+
tags: ['live-safe'],
|
|
170
|
+
},
|
|
171
|
+
'skills.crystals.get': {
|
|
172
|
+
method: 'GET',
|
|
173
|
+
service: 'quoxflow',
|
|
174
|
+
path: ({ id }) => `/api/skills/${id}`,
|
|
175
|
+
tags: ['live-safe'],
|
|
176
|
+
},
|
|
164
177
|
'skills.rollbackToVersion': {
|
|
165
178
|
method: 'POST',
|
|
166
179
|
service: 'quoxflow',
|
|
@@ -171,6 +184,13 @@ export const skills = {
|
|
|
171
184
|
// It actually runs a workflow/crystal (side effects beyond a rejected
|
|
172
185
|
// write); 'skip-live' keeps it out of the live-contract harness entirely
|
|
173
186
|
// per the WP2.3 brief ("Do NOT seed execute as live").
|
|
187
|
+
// QSKL create (quoxflow quox-skills.ts POST /): firewall-scanned; ?dry_run=true returns the verdict without writing.
|
|
188
|
+
'skills.create': {
|
|
189
|
+
method: 'POST',
|
|
190
|
+
service: 'quoxflow',
|
|
191
|
+
path: () => `/api/quox-skills`,
|
|
192
|
+
tags: ['live-write'],
|
|
193
|
+
},
|
|
174
194
|
'skills.run': {
|
|
175
195
|
method: 'POST',
|
|
176
196
|
service: 'quoxflow',
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 'stepup.*' endpoints: QUOXON-STEPUP human step-up PIN (auth service routes/stepUp.js).
|
|
3
|
+
* There is deliberately NO endpoint here that sets or changes the PIN: that is a dashboard-only act
|
|
4
|
+
* (browser session plus fresh password). The CLI can read status and verify, nothing else.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const stepup = {
|
|
8
|
+
'stepup.status': {
|
|
9
|
+
method: 'GET',
|
|
10
|
+
service: 'auth',
|
|
11
|
+
path: () => `/api/auth/me/step-up-pin`,
|
|
12
|
+
tags: ['live-safe'],
|
|
13
|
+
},
|
|
14
|
+
'stepup.verify': {
|
|
15
|
+
method: 'POST',
|
|
16
|
+
service: 'auth',
|
|
17
|
+
path: () => `/api/auth/me/step-up`,
|
|
18
|
+
tags: ['live-write'],
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -43,8 +43,8 @@ export const teams = {
|
|
|
43
43
|
},
|
|
44
44
|
'teams.provisionRoom': {
|
|
45
45
|
method: 'POST',
|
|
46
|
-
service: '
|
|
47
|
-
path: ({ teamId }) => `/api/teams/${teamId}/provision-room`,
|
|
46
|
+
service: 'auth',
|
|
47
|
+
path: ({ orgId, teamId }) => `/api/orgs/${orgId}/teams/${teamId}/provision-room`,
|
|
48
48
|
tags: ['live-write'],
|
|
49
49
|
},
|
|
50
50
|
'teams.update': {
|
|
@@ -67,4 +67,30 @@ export const triggers = {
|
|
|
67
67
|
path: () => `/api/triggers/webhooks`,
|
|
68
68
|
tags: ['live-safe'],
|
|
69
69
|
},
|
|
70
|
+
// SITE-CLI 2026-10-19: pause/resume a schedule without re-applying the workflow JSON. quoxflow's
|
|
71
|
+
// src/api/routes/schedules.ts (mounted at /api/schedules) is org-scoped (cross-org = 404), persists
|
|
72
|
+
// node.config.paused and emits SCHEDULE.PAUSED / SCHEDULE.RESUMED envelopes.
|
|
73
|
+
'triggers.schedule-list': {
|
|
74
|
+
method: 'GET',
|
|
75
|
+
service: 'quoxflow',
|
|
76
|
+
path: () => `/api/schedules`,
|
|
77
|
+
tags: ['live-safe'],
|
|
78
|
+
},
|
|
79
|
+
'triggers.schedule-pause': {
|
|
80
|
+
method: 'POST',
|
|
81
|
+
service: 'quoxflow',
|
|
82
|
+
path: ({ workflowId, nodeId }) => `/api/schedules/${encodeURIComponent(workflowId)}/${encodeURIComponent(nodeId)}/pause`,
|
|
83
|
+
},
|
|
84
|
+
'triggers.schedule-resume': {
|
|
85
|
+
method: 'POST',
|
|
86
|
+
service: 'quoxflow',
|
|
87
|
+
path: ({ workflowId, nodeId }) => `/api/schedules/${encodeURIComponent(workflowId)}/${encodeURIComponent(nodeId)}/resume`,
|
|
88
|
+
},
|
|
89
|
+
// The public webhook ingress (quoxflow src/api/routes/webhook-triggers.ts, mounted at /webhooks). It copies every
|
|
90
|
+
// request header into the run's trigger data, so the CLI fires it with NO credentials (noAuth).
|
|
91
|
+
'triggers.webhook-fire': {
|
|
92
|
+
method: 'POST',
|
|
93
|
+
service: 'quoxflow',
|
|
94
|
+
path: ({ path }) => `/webhooks/${path}`,
|
|
95
|
+
},
|
|
70
96
|
};
|
package/lib/api/endpoints/v1.js
CHANGED
|
@@ -296,6 +296,15 @@ export const v1 = {
|
|
|
296
296
|
path: () => `/api/v1/tools/execute`,
|
|
297
297
|
tags: ['live-write'],
|
|
298
298
|
},
|
|
299
|
+
// DEVFLEET: HYPERION VM pool, human REST surface (a human acting directly is the
|
|
300
|
+
// authorization; agents use the proxmox_pool_* tools, which are approval-governed).
|
|
301
|
+
'v1.proxmox.pool': { method: 'GET', service: 'collector', path: () => `/api/v1/proxmox/pool`, tags: ['live-safe'] },
|
|
302
|
+
'v1.proxmox.pool.config.put': { method: 'PUT', service: 'collector', path: () => `/api/v1/proxmox/pool/config`, tags: ['live-write'] },
|
|
303
|
+
'v1.proxmox.pool.lease': { method: 'POST', service: 'collector', path: () => `/api/v1/proxmox/pool/lease`, tags: ['live-write'] },
|
|
304
|
+
'v1.proxmox.pool.release': { method: 'POST', service: 'collector', path: ({ vmid }) => `/api/v1/proxmox/pool/${encodeURIComponent(vmid)}/release`, tags: ['live-write'] },
|
|
305
|
+
// DEVFLEET-P15: HYPERION activity (VMs, who holds each, node load, recent ops), read only.
|
|
306
|
+
'v1.proxmox.activity': { method: 'GET', service: 'collector', path: () => `/api/v1/proxmox/activity`, tags: ['live-safe'] },
|
|
307
|
+
'v1.proxmox.rehearsal': { method: 'GET', service: 'collector', path: ({ id }) => `/api/v1/proxmox/rehearsals/${encodeURIComponent(id)}`, tags: ['live-safe'] },
|
|
299
308
|
// quox#791: stored outcome of an approved gated tool call.
|
|
300
309
|
'v1.approvals.result': {
|
|
301
310
|
method: 'GET',
|
|
@@ -303,12 +312,38 @@ export const v1 = {
|
|
|
303
312
|
path: ({ id }) => `/api/v1/approvals/${encodeURIComponent(id)}/result`,
|
|
304
313
|
tags: ['live-safe'],
|
|
305
314
|
},
|
|
315
|
+
// Fleet standing grants (2026-10-13): org-admin pre-approved ssh_exec lanes.
|
|
316
|
+
'v1.approvals.grants.list': {
|
|
317
|
+
method: 'GET',
|
|
318
|
+
service: 'collector',
|
|
319
|
+
path: () => `/api/v1/approvals/grants`,
|
|
320
|
+
tags: ['live-safe'],
|
|
321
|
+
},
|
|
322
|
+
'v1.approvals.grants.create': {
|
|
323
|
+
method: 'POST',
|
|
324
|
+
service: 'collector',
|
|
325
|
+
path: () => `/api/v1/approvals/grants`,
|
|
326
|
+
tags: ['live-write'],
|
|
327
|
+
},
|
|
328
|
+
'v1.approvals.grants.revoke': {
|
|
329
|
+
method: 'POST',
|
|
330
|
+
service: 'collector',
|
|
331
|
+
path: ({ id }) => `/api/v1/approvals/grants/${encodeURIComponent(id)}/revoke`,
|
|
332
|
+
tags: ['live-write'],
|
|
333
|
+
},
|
|
306
334
|
'v1.tools.list': {
|
|
307
335
|
method: 'GET',
|
|
308
336
|
service: 'collector',
|
|
309
337
|
path: () => `/api/v1/tools/list`,
|
|
310
338
|
tags: ['live-safe'],
|
|
311
339
|
},
|
|
340
|
+
// QUOXON-REACH: registered specialist roster (entity JSONs), used by `quox agent list`.
|
|
341
|
+
'v1.agents.registry': {
|
|
342
|
+
method: 'GET',
|
|
343
|
+
service: 'collector',
|
|
344
|
+
path: () => `/api/v1/agent-registry`,
|
|
345
|
+
tags: ['live-safe'],
|
|
346
|
+
},
|
|
312
347
|
// DEVSUITE-GRIPE-P7 / quox#567 (CLI half): agent-to-tool permission
|
|
313
348
|
// mapping, keyed by agent id (Object.keys(...).agentTools) — the
|
|
314
349
|
// no-auth-gate source of truth for "which agent ids currently exist",
|
|
@@ -431,6 +466,25 @@ export const v1 = {
|
|
|
431
466
|
path: ({ name }) => `/api/v1/slots/${encodeURIComponent(name)}/say`,
|
|
432
467
|
tags: ['live-write'],
|
|
433
468
|
},
|
|
469
|
+
// QUOXON-BROADCAST: fan one message out to the org's held slots; status and per-slot acks.
|
|
470
|
+
'v1.slots.broadcast': {
|
|
471
|
+
method: 'POST',
|
|
472
|
+
service: 'collector',
|
|
473
|
+
path: () => `/api/v1/slots/broadcast`,
|
|
474
|
+
tags: ['live-write'],
|
|
475
|
+
},
|
|
476
|
+
'v1.slots.broadcast.get': {
|
|
477
|
+
method: 'GET',
|
|
478
|
+
service: 'collector',
|
|
479
|
+
path: ({ id }) => `/api/v1/slots/broadcast/${encodeURIComponent(id)}`,
|
|
480
|
+
tags: ['live-safe'],
|
|
481
|
+
},
|
|
482
|
+
'v1.slots.broadcast.ack': {
|
|
483
|
+
method: 'POST',
|
|
484
|
+
service: 'collector',
|
|
485
|
+
path: ({ id }) => `/api/v1/slots/broadcast/${encodeURIComponent(id)}/ack`,
|
|
486
|
+
tags: ['live-write'],
|
|
487
|
+
},
|
|
434
488
|
'v1.slots.messages': {
|
|
435
489
|
method: 'GET',
|
|
436
490
|
service: 'collector',
|
|
@@ -445,6 +499,38 @@ export const v1 = {
|
|
|
445
499
|
path: ({ name }) => `/api/v1/slots/${encodeURIComponent(name)}/wait`,
|
|
446
500
|
tags: ['live-safe'],
|
|
447
501
|
},
|
|
502
|
+
// QUOXON-MESH: SSE push of a slot's messages (the quox TUI's live inbound).
|
|
503
|
+
'v1.slots.stream': {
|
|
504
|
+
method: 'GET',
|
|
505
|
+
service: 'collector',
|
|
506
|
+
path: ({ name }) => `/api/v1/slots/${encodeURIComponent(name)}/stream`,
|
|
507
|
+
tags: ['live-safe'],
|
|
508
|
+
},
|
|
509
|
+
// QUOXON-ROOMS: a slot as a group room. Join = subscribe + post without holding.
|
|
510
|
+
'v1.slots.join': {
|
|
511
|
+
method: 'POST',
|
|
512
|
+
service: 'collector',
|
|
513
|
+
path: ({ name }) => `/api/v1/slots/${encodeURIComponent(name)}/join`,
|
|
514
|
+
tags: ['live-write'],
|
|
515
|
+
},
|
|
516
|
+
'v1.slots.leave': {
|
|
517
|
+
method: 'POST',
|
|
518
|
+
service: 'collector',
|
|
519
|
+
path: ({ name }) => `/api/v1/slots/${encodeURIComponent(name)}/leave`,
|
|
520
|
+
tags: ['live-write'],
|
|
521
|
+
},
|
|
522
|
+
'v1.slots.members': {
|
|
523
|
+
method: 'GET',
|
|
524
|
+
service: 'collector',
|
|
525
|
+
path: ({ name }) => `/api/v1/slots/${encodeURIComponent(name)}/members`,
|
|
526
|
+
tags: ['live-safe'],
|
|
527
|
+
},
|
|
528
|
+
'v1.slots.rooms': {
|
|
529
|
+
method: 'GET',
|
|
530
|
+
service: 'collector',
|
|
531
|
+
path: () => '/api/v1/slot-rooms',
|
|
532
|
+
tags: ['live-safe'],
|
|
533
|
+
},
|
|
448
534
|
// "Option B" assign model (plan v2 note #2831): assign an expected holder
|
|
449
535
|
// ahead of time, claim checks out every slot assigned to a session name.
|
|
450
536
|
'v1.slots.assign': {
|
|
@@ -17,6 +17,13 @@ export const ward = {
|
|
|
17
17
|
path: () => `/ward/entries`,
|
|
18
18
|
tags: ['live-safe'],
|
|
19
19
|
},
|
|
20
|
+
// PEEK: one WARD entry (a receipt) by its ward_entry_id; org-scoped for a user login.
|
|
21
|
+
'ward.entries.get': {
|
|
22
|
+
method: 'GET',
|
|
23
|
+
service: 'collector',
|
|
24
|
+
path: ({ id }) => `/ward/entries/${id}`,
|
|
25
|
+
tags: ['live-safe'],
|
|
26
|
+
},
|
|
20
27
|
'ward.stats.list': {
|
|
21
28
|
method: 'GET',
|
|
22
29
|
service: 'collector',
|
|
@@ -81,6 +81,13 @@ export const workflows = {
|
|
|
81
81
|
// quoxflow#7: execute an engine-store workflow directly (the auth-service
|
|
82
82
|
// runs route only knows auth-store workflows). Org comes from the caller's
|
|
83
83
|
// auth context server-side, like the other quoxflow-direct entries.
|
|
84
|
+
// #997: `workflow delete` reaches engine workflows (the ones `workflow list` labels "engine")
|
|
85
|
+
'workflows.applyDelete': {
|
|
86
|
+
method: 'DELETE',
|
|
87
|
+
service: 'quoxflow',
|
|
88
|
+
path: ({ workflowId }) => `/api/workflows/${workflowId}`,
|
|
89
|
+
tags: ['live-write'],
|
|
90
|
+
},
|
|
84
91
|
'workflows.applyExecute': {
|
|
85
92
|
method: 'POST',
|
|
86
93
|
service: 'quoxflow',
|
package/lib/api/endpoints/x.js
CHANGED
|
@@ -19,6 +19,14 @@ export const x = {
|
|
|
19
19
|
path: () => `/x/media`,
|
|
20
20
|
tags: ['live-write'],
|
|
21
21
|
},
|
|
22
|
+
// GET /x/activity: recent claims + ledger + live budget (camelCase), org-scoped. `quox x status`
|
|
23
|
+
// reads the budget from here.
|
|
24
|
+
'x.activity': {
|
|
25
|
+
method: 'GET',
|
|
26
|
+
service: 'collector',
|
|
27
|
+
path: () => `/x/activity`,
|
|
28
|
+
tags: ['live-safe'],
|
|
29
|
+
},
|
|
22
30
|
};
|
|
23
31
|
|
|
24
32
|
export default x;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action Tracker commands (read-only): `quox actions list | get`.
|
|
3
|
+
*
|
|
4
|
+
* #839 / #891: the agent has action_list but the CLI had no verb, so Action
|
|
5
|
+
* Tracker answers could not be checked against CLI truth. These verbs call the
|
|
6
|
+
* SAME governed tool the Action Tracker UI and the agent use (POST
|
|
7
|
+
* /api/v1/tools/execute, tool_name action_list), so chat, UI and CLI read one
|
|
8
|
+
* source. Writes (add/move/update/delete) stay in chat and the UI for now.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { formatOutput, formatDetail } from '../core/output.js';
|
|
12
|
+
import { QuoxError } from '../core/errors.js';
|
|
13
|
+
import { executeGovernedTool } from './tool.js';
|
|
14
|
+
|
|
15
|
+
const STATUSES = ['todo', 'doing', 'done', 'all'];
|
|
16
|
+
|
|
17
|
+
async function listItems(ctx, { status = 'all', limit = 100, scope } = {}) {
|
|
18
|
+
if (!STATUSES.includes(status)) {
|
|
19
|
+
throw new QuoxError(`--status must be one of ${STATUSES.join(', ')}`);
|
|
20
|
+
}
|
|
21
|
+
const input = { status, limit: Math.min(Math.max(Number(limit) || 20, 1), 100) };
|
|
22
|
+
if (scope) input.scope_id = scope;
|
|
23
|
+
const data = await executeGovernedTool(ctx, 'action_list', input);
|
|
24
|
+
const result = data && data.result !== undefined ? data.result : data;
|
|
25
|
+
if (!result || result.success === false) {
|
|
26
|
+
throw new QuoxError(`action_list failed: ${(result && (result.error || result.message)) || 'no result'}`);
|
|
27
|
+
}
|
|
28
|
+
return Array.isArray(result.items) ? result.items : [];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function registerActionsCommands(program, ctx) {
|
|
32
|
+
const actions = program
|
|
33
|
+
.command('actions')
|
|
34
|
+
.description('Action Tracker items (read-only; add and move items in chat or the dashboard)');
|
|
35
|
+
|
|
36
|
+
actions
|
|
37
|
+
.command('list')
|
|
38
|
+
.description('List action items')
|
|
39
|
+
.option('--status <status>', 'todo, doing, done or all', 'all')
|
|
40
|
+
.option('--limit <n>', 'max items (1-100)', '100')
|
|
41
|
+
.option('--scope <scopeId>', 'only items in this team/department/division scope')
|
|
42
|
+
.action(async (options) => {
|
|
43
|
+
const items = await listItems({ ...ctx, program }, options);
|
|
44
|
+
formatOutput({
|
|
45
|
+
columns: ['id', 'status', 'priority', 'title', 'dueDate'],
|
|
46
|
+
headers: ['ID', 'Status', 'Priority', 'Title', 'Due'],
|
|
47
|
+
rows: items.map((i) => ({ ...i, dueDate: i.dueDate || '-' })),
|
|
48
|
+
}, { raw: items });
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
actions
|
|
52
|
+
.command('get')
|
|
53
|
+
.description('Show one action item by id')
|
|
54
|
+
.argument('<id>', 'action item id (from `quox actions list`)')
|
|
55
|
+
.action(async (id) => {
|
|
56
|
+
const items = await listItems({ ...ctx, program }, { status: 'all', limit: 100 });
|
|
57
|
+
const item = items.find((i) => i.id === id);
|
|
58
|
+
if (!item) throw new QuoxError(`No action item ${id} among the latest 100 items.`);
|
|
59
|
+
formatDetail(item);
|
|
60
|
+
});
|
|
61
|
+
}
|
package/lib/commands/admin.js
CHANGED
|
@@ -27,6 +27,13 @@ export function registerAdminCommands(program, ctx) {
|
|
|
27
27
|
const config = data.config || data;
|
|
28
28
|
if (key) {
|
|
29
29
|
// quox#533: `get <key>` used to be rejected outright.
|
|
30
|
+
// #1010: auth returns an ARRAY of { key, value, ... } rows; an object map is handled too.
|
|
31
|
+
if (Array.isArray(config)) {
|
|
32
|
+
const row = config.find((r) => r && r.key === key);
|
|
33
|
+
if (!row) throw new Error(`config key "${key}" not found. Run \`quox admin config get\` to list all keys.`);
|
|
34
|
+
formatDetail(row, { format: program.opts().output, title: 'Platform Config' });
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
30
37
|
if (!config || typeof config !== 'object' || !(key in config)) {
|
|
31
38
|
throw new Error(`config key "${key}" not found. Run \`quox admin config get\` to list all keys.`);
|
|
32
39
|
}
|
|
@@ -345,6 +352,15 @@ export function registerAdminCommands(program, ctx) {
|
|
|
345
352
|
const body = {};
|
|
346
353
|
if (options.dryRun) body.dry_run = true;
|
|
347
354
|
const data = await client.post(resolveEndpoint('admin.retention.cleanup').path, { service: resolveEndpoint('admin.retention.cleanup').service, body });
|
|
355
|
+
if (options.dryRun) {
|
|
356
|
+
// quox#1084: servers before the fix ignored dry_run and deleted for real.
|
|
357
|
+
// Never present an unconfirmed result as a harmless preview.
|
|
358
|
+
if (!data || data.dry_run !== true) {
|
|
359
|
+
throw new Error('the server did not honour --dry-run (it predates quox#1084): the cleanup may have run for real. Check `quox admin retention stats`.');
|
|
360
|
+
}
|
|
361
|
+
formatDetail(data, { format: program.opts().output, title: 'Cleanup preview (dry run): nothing deleted' });
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
348
364
|
formatDetail(data, { format: program.opts().output, title: 'Cleanup Result' });
|
|
349
365
|
});
|
|
350
366
|
|