@skrr-ai/cli 0.1.155 → 0.1.158
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/dist/base-command.js +64 -16
- package/dist/commands/activity/list.d.ts +13 -0
- package/dist/commands/activity/list.js +50 -0
- package/dist/commands/activity/scan-older.d.ts +23 -0
- package/dist/commands/activity/scan-older.js +74 -0
- package/dist/commands/activity/show.d.ts +27 -0
- package/dist/commands/activity/show.js +228 -0
- package/dist/commands/agent/message/send.js +64 -19
- package/dist/commands/agents/always-on/held-messages.js +24 -1
- package/dist/commands/agents/always-on/status.js +6 -1
- package/dist/commands/agents/mini-computer/app/reset.d.ts +13 -0
- package/dist/commands/agents/mini-computer/app/reset.js +35 -0
- package/dist/commands/agents/mini-computer/app/set.d.ts +16 -0
- package/dist/commands/agents/mini-computer/app/set.js +70 -0
- package/dist/commands/agents/mini-computer/layout/change.d.ts +14 -0
- package/dist/commands/agents/mini-computer/layout/change.js +44 -0
- package/dist/commands/agents/mini-computer/layout/folder.d.ts +14 -0
- package/dist/commands/agents/mini-computer/layout/folder.js +35 -0
- package/dist/commands/agents/mini-computer/layout/move.d.ts +14 -0
- package/dist/commands/agents/mini-computer/layout/move.js +32 -0
- package/dist/commands/agents/mini-computer/layout/pin.d.ts +14 -0
- package/dist/commands/agents/mini-computer/layout/pin.js +35 -0
- package/dist/commands/agents/mini-computer/layout/remove.d.ts +13 -0
- package/dist/commands/agents/mini-computer/layout/remove.js +27 -0
- package/dist/commands/agents/mini-computer/layout/restore.d.ts +13 -0
- package/dist/commands/agents/mini-computer/layout/restore.js +27 -0
- package/dist/commands/agents/mini-computer/layout/unfolder.d.ts +13 -0
- package/dist/commands/agents/mini-computer/layout/unfolder.js +27 -0
- package/dist/commands/agents/mini-computer/layout/unpin.d.ts +14 -0
- package/dist/commands/agents/mini-computer/layout/unpin.js +34 -0
- package/dist/commands/agents/mini-computer/show.d.ts +13 -0
- package/dist/commands/agents/mini-computer/show.js +60 -0
- package/dist/commands/agents/mini-computer/tasks-view.d.ts +29 -0
- package/dist/commands/agents/mini-computer/tasks-view.js +100 -0
- package/dist/commands/apps/auto-apply.d.ts +14 -0
- package/dist/commands/apps/auto-apply.js +53 -0
- package/dist/commands/apps/check.js +4 -1
- package/dist/commands/apps/create.js +11 -6
- package/dist/commands/apps/data/batch.d.ts +15 -0
- package/dist/commands/apps/data/batch.js +59 -0
- package/dist/commands/apps/data/collections.d.ts +12 -0
- package/dist/commands/apps/data/collections.js +44 -0
- package/dist/commands/apps/data/delete.d.ts +15 -0
- package/dist/commands/apps/data/delete.js +57 -0
- package/dist/commands/apps/data/patch.d.ts +17 -0
- package/dist/commands/apps/data/patch.js +70 -0
- package/dist/commands/apps/data/put.js +1 -1
- package/dist/commands/apps/data/query.js +1 -1
- package/dist/commands/apps/installations/diff.d.ts +14 -0
- package/dist/commands/apps/installations/diff.js +45 -0
- package/dist/commands/apps/installations/events.d.ts +23 -0
- package/dist/commands/apps/installations/events.js +104 -0
- package/dist/commands/apps/installations/snapshot.d.ts +18 -0
- package/dist/commands/apps/installations/snapshot.js +60 -0
- package/dist/commands/apps/installations/versions.d.ts +12 -0
- package/dist/commands/apps/installations/versions.js +38 -0
- package/dist/commands/apps/logs.js +3 -0
- package/dist/commands/apps/preview.js +4 -2
- package/dist/commands/apps/pull.js +10 -1
- package/dist/commands/apps/push.js +36 -12
- package/dist/commands/apps/reference.d.ts +26 -0
- package/dist/commands/apps/reference.js +56 -0
- package/dist/commands/apps/rollback.d.ts +13 -0
- package/dist/commands/apps/rollback.js +47 -0
- package/dist/commands/apps/version/create.js +5 -0
- package/dist/commands/duties/accounting.js +6 -0
- package/dist/commands/duties/analytics/detail.js +6 -0
- package/dist/commands/duties/analytics/index.js +14 -0
- package/dist/commands/duties/analytics/replay.js +6 -0
- package/dist/commands/duties/cost.js +6 -0
- package/dist/commands/duties/delete.js +22 -19
- package/dist/commands/duties/doctor.d.ts +2 -1
- package/dist/commands/duties/doctor.js +17 -3
- package/dist/commands/duties/goals/link.js +4 -0
- package/dist/commands/duties/goals/unlink.js +4 -0
- package/dist/commands/duties/lineage.js +6 -1
- package/dist/commands/duties/links/list.js +6 -0
- package/dist/commands/duties/metrics.js +10 -0
- package/dist/commands/duties/observations.js +12 -0
- package/dist/commands/duties/operating-review.d.ts +4 -30
- package/dist/commands/duties/operating-review.js +28 -141
- package/dist/commands/duties/receipt-metrics.js +7 -0
- package/dist/commands/duties/receipt.js +7 -0
- package/dist/commands/duties/roster.js +14 -8
- package/dist/commands/duties/show.js +27 -9
- package/dist/commands/duties/status.js +18 -9
- package/dist/commands/duties/trigger-status.d.ts +2 -0
- package/dist/commands/duties/trigger-status.js +19 -1
- package/dist/commands/duties/wake-capabilities.d.ts +2 -0
- package/dist/commands/duties/wake-capabilities.js +32 -2
- package/dist/commands/followups/act.js +3 -0
- package/dist/commands/followups/remind.js +12 -3
- package/dist/commands/followups/show.js +6 -0
- package/dist/commands/harnesses/quota.js +1 -1
- package/dist/commands/spaces/notebook.d.ts +3 -7
- package/dist/commands/spaces/notebook.js +32 -8
- package/dist/commands/tasks/create.d.ts +2 -2
- package/dist/commands/tasks/create.js +3 -3
- package/dist/commands/tasks/list.d.ts +3 -41
- package/dist/commands/tasks/list.js +5 -53
- package/dist/generated/agent-guides.json +424 -101
- package/dist/generated/managed-instruction-guides.json +1 -1
- package/dist/lib/agent-activity.d.ts +153 -0
- package/dist/lib/agent-activity.js +241 -0
- package/dist/lib/always-on-runtime.d.ts +9 -0
- package/dist/lib/always-on-runtime.js +20 -0
- package/dist/lib/api-fetch.d.ts +10 -0
- package/dist/lib/api-fetch.js +12 -2
- package/dist/lib/appData.d.ts +28 -1
- package/dist/lib/appData.js +111 -9
- package/dist/lib/appInstallations.d.ts +9 -1
- package/dist/lib/appInstallations.js +100 -0
- package/dist/lib/apps-command.d.ts +1 -0
- package/dist/lib/apps-command.js +11 -0
- package/dist/lib/apps.d.ts +12 -0
- package/dist/lib/apps.js +28 -1
- package/dist/lib/appsAssets.d.ts +17 -0
- package/dist/lib/appsAssets.js +15 -0
- package/dist/lib/appsCheck.d.ts +1 -0
- package/dist/lib/appsCheck.js +1 -0
- package/dist/lib/appsFs.d.ts +18 -1
- package/dist/lib/appsFs.js +76 -19
- package/dist/lib/compasses.js +6 -0
- package/dist/lib/duties.d.ts +25 -2
- package/dist/lib/duties.js +58 -3
- package/dist/lib/duty-analytics.d.ts +2 -0
- package/dist/lib/duty-analytics.js +26 -0
- package/dist/lib/duty-goal-propagation.d.ts +2 -0
- package/dist/lib/duty-goal-propagation.js +18 -0
- package/dist/lib/duty-history-source.d.ts +4 -0
- package/dist/lib/duty-history-source.js +12 -0
- package/dist/lib/duty-ledgers.d.ts +4 -0
- package/dist/lib/duty-ledgers.js +4 -0
- package/dist/lib/duty-receipt-source.d.ts +4 -0
- package/dist/lib/duty-receipt-source.js +19 -0
- package/dist/lib/followups.d.ts +20 -0
- package/dist/lib/followups.js +10 -0
- package/dist/lib/held-messages.d.ts +22 -0
- package/dist/lib/held-messages.js +55 -0
- package/dist/lib/list-workspace.d.ts +40 -0
- package/dist/lib/list-workspace.js +58 -0
- package/dist/lib/miniComputer.d.ts +59 -0
- package/dist/lib/miniComputer.js +224 -0
- package/dist/lib/miniComputerCommand.d.ts +13 -0
- package/dist/lib/miniComputerCommand.js +48 -0
- package/dist/lib/roles.d.ts +3 -3
- package/dist/lib/space-notebook.js +15 -4
- package/dist/node_modules/@skrr-ai/data-provider/index.js +10465 -8383
- package/oclif.manifest.json +2849 -462
- package/package.json +14 -2
|
@@ -93,24 +93,35 @@ class AgentMessageSend extends base_command_1.BaseCommand {
|
|
|
93
93
|
if (!partial && !retry)
|
|
94
94
|
return super.failWithCliError(input);
|
|
95
95
|
const originalDetails = input.details;
|
|
96
|
-
const extra = {
|
|
96
|
+
const extra = {
|
|
97
|
+
...(partial ? { partialSequence: partial } : {}),
|
|
98
|
+
...(retry ? { messageRetry: retry } : {}),
|
|
99
|
+
};
|
|
97
100
|
const details = originalDetails && typeof originalDetails === 'object' && !Array.isArray(originalDetails)
|
|
98
101
|
? {
|
|
99
102
|
...originalDetails,
|
|
100
|
-
...(Object.keys(extra).some((key) => Object.hasOwn(originalDetails, key))
|
|
103
|
+
...(Object.keys(extra).some((key) => Object.hasOwn(originalDetails, key))
|
|
104
|
+
? { originalDetails }
|
|
105
|
+
: {}),
|
|
101
106
|
...extra,
|
|
102
107
|
}
|
|
103
108
|
: { ...(originalDetails === undefined ? {} : { originalDetails }), ...extra };
|
|
104
|
-
const outcomes = partial?.parts
|
|
105
|
-
|
|
106
|
-
|
|
109
|
+
const outcomes = partial?.parts
|
|
110
|
+
.map((part, index) => `${index + 1}: ${part.intent.status}`)
|
|
111
|
+
.join(', ');
|
|
112
|
+
const sequenceNote = partial
|
|
113
|
+
? `\nEarlier part outcomes: ${outcomes || 'none'}. ` +
|
|
114
|
+
`Part ${partial.attemptedPart} was attempted; ${partial.unattemptedParts} later part(s) were not sent.`
|
|
115
|
+
: '';
|
|
107
116
|
const json = this.wantsJsonOutput();
|
|
108
117
|
if (retry && !json) {
|
|
109
118
|
// oclif wraps error text and inserts prefixes into long generated keys.
|
|
110
119
|
// Write the key as a single stderr line so it remains copyable.
|
|
111
120
|
process.stderr.write(`Retry idempotency key: ${retry.idempotencyKey}\n`);
|
|
112
121
|
}
|
|
113
|
-
const retryNote = retry
|
|
122
|
+
const retryNote = retry
|
|
123
|
+
? '\nIf you retry the same message, reuse the retry key shown above.'
|
|
124
|
+
: '';
|
|
114
125
|
const message = json ? input.message : input.message + sequenceNote + retryNote;
|
|
115
126
|
return super.failWithCliError({ ...input, message, details });
|
|
116
127
|
}
|
|
@@ -277,7 +288,9 @@ class AgentMessageSend extends base_command_1.BaseCommand {
|
|
|
277
288
|
}
|
|
278
289
|
// Manual task context accepts the same titles and references as task
|
|
279
290
|
// commands. Managed sessions must leave the claim-derived context alone.
|
|
280
|
-
if (!sessionContext &&
|
|
291
|
+
if (!sessionContext &&
|
|
292
|
+
payload.destination.kind === 'app_owner_dm' &&
|
|
293
|
+
payload.context?.taskId) {
|
|
281
294
|
payload.context.taskId = await this.resolveTaskReference(payload.context.taskId);
|
|
282
295
|
}
|
|
283
296
|
const segmentationAdvisory = messageSegmentationAdvisory({
|
|
@@ -354,13 +367,16 @@ class AgentMessageSend extends base_command_1.BaseCommand {
|
|
|
354
367
|
let halt;
|
|
355
368
|
for (const [index, requestPart] of requests.entries()) {
|
|
356
369
|
this.attemptedMessageKey = requestPart.idempotencyKey;
|
|
357
|
-
this.partialSequence =
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
370
|
+
this.partialSequence =
|
|
371
|
+
requests.length > 1
|
|
372
|
+
? {
|
|
373
|
+
sequenceId: idempotencyKey,
|
|
374
|
+
parts: [...envelopes],
|
|
375
|
+
attemptedPart: index + 1,
|
|
376
|
+
totalParts: requests.length,
|
|
377
|
+
unattemptedParts: requests.length - index - 1,
|
|
378
|
+
}
|
|
379
|
+
: undefined;
|
|
364
380
|
const envelope = sessionContext
|
|
365
381
|
? await this.submitAsSession({
|
|
366
382
|
sessionContext,
|
|
@@ -671,7 +687,8 @@ const SEQUENCE_CONTINUING_STATUSES = new Set([
|
|
|
671
687
|
/** A final held or failed part still leaves the requested sequence incomplete,
|
|
672
688
|
* even though there are no later parts for sequenceHalt to withhold. */
|
|
673
689
|
function sequenceComplete(envelopes, halt) {
|
|
674
|
-
return !halt &&
|
|
690
|
+
return (!halt &&
|
|
691
|
+
envelopes.every((envelope) => envelope.ok && SEQUENCE_CONTINUING_STATUSES.has(envelope.intent.status)));
|
|
675
692
|
}
|
|
676
693
|
/**
|
|
677
694
|
* Statuses that mean the message will never reach the user without a new send.
|
|
@@ -834,8 +851,10 @@ function normalizeIntentPayload({ agentId, jsonBody, merged, }) {
|
|
|
834
851
|
throw invalidIntent('--thread-ts / destination.threadTs only applies to slack_channel.');
|
|
835
852
|
}
|
|
836
853
|
if (destinationKind !== 'agent_email' &&
|
|
837
|
-
(merged.recipients !== undefined ||
|
|
838
|
-
|
|
854
|
+
(merged.recipients !== undefined ||
|
|
855
|
+
merged.subject !== undefined ||
|
|
856
|
+
bodyDestination?.recipients !== undefined ||
|
|
857
|
+
bodyDestination?.subject !== undefined)) {
|
|
839
858
|
throw invalidIntent('--to / destination.recipients and --subject / destination.subject only apply to agent_email.');
|
|
840
859
|
}
|
|
841
860
|
const destination = buildDestination({
|
|
@@ -1228,8 +1247,23 @@ function formatEnvelope(envelope) {
|
|
|
1228
1247
|
? '; reach=user-controlled; presentation=user-controlled'
|
|
1229
1248
|
: ''}]`
|
|
1230
1249
|
: '';
|
|
1231
|
-
const consequence =
|
|
1232
|
-
|
|
1250
|
+
const consequence = (envelope.intent.reason && REASON_CONSEQUENCE[envelope.intent.reason]) ||
|
|
1251
|
+
STATUS_CONSEQUENCE[status];
|
|
1252
|
+
return `Agent message intent for ${envelope.agent.id} → ${destination}: ${status}${suffix}.${presentation}${describeOneVoice(envelope.intent.oneVoice)}${consequence ? ` ${consequence}` : ''}${describePersonSender(envelope)}`;
|
|
1253
|
+
}
|
|
1254
|
+
/**
|
|
1255
|
+
* A message a PERSON sends at a terminal goes out as that person, not through the agent's session, so the agent's
|
|
1256
|
+
* own delivery policy (ask-first, quiet hours) is not applied to it (OSK-23450). Someone who sets a policy on an
|
|
1257
|
+
* agent and tests it from their own terminal otherwise concludes the setting is broken: the send answers
|
|
1258
|
+
* `delivered` and nothing says the policy was skipped. Said once, on the owner's app DM, and only when the send
|
|
1259
|
+
* was accepted; `--json` carries `principalKind` already.
|
|
1260
|
+
*/
|
|
1261
|
+
function describePersonSender(envelope) {
|
|
1262
|
+
if (envelope.principalKind !== 'human' || envelope.destination.kind !== 'app_owner_dm')
|
|
1263
|
+
return '';
|
|
1264
|
+
if (!['delivered', 'duplicate', 'accepted'].includes(envelope.intent.status))
|
|
1265
|
+
return '';
|
|
1266
|
+
return ' Sent as you, not as the agent: its ask-first mode and quiet hours do not apply to a message a person sends.';
|
|
1233
1267
|
}
|
|
1234
1268
|
/**
|
|
1235
1269
|
* What a status other than `delivered` means for the sender, in the words of
|
|
@@ -1239,6 +1273,17 @@ function formatEnvelope(envelope) {
|
|
|
1239
1273
|
* the existing line, so anything that reads the old prefix keeps working, and `--json`
|
|
1240
1274
|
* is unchanged. A status with no entry prints nothing extra rather than a guess.
|
|
1241
1275
|
*/
|
|
1276
|
+
/**
|
|
1277
|
+
* A reason can change what a status means for the sender (OSK-23469). `held` says "may still be delivered", which is
|
|
1278
|
+
* true of a quiet-hours or approval hold and false when the owner's delivery mode is `off`: nothing will ever be
|
|
1279
|
+
* delivered, and `skrr guide communication delivery-statuses` tells the sender to say it in the conversation instead.
|
|
1280
|
+
* Wording is the guide's; a reason with no entry keeps its status sentence.
|
|
1281
|
+
*/
|
|
1282
|
+
const REASON_CONSEQUENCE = {
|
|
1283
|
+
delivery_mode_off: "Not delivered, and the owner's delivery mode means it never will be. Say it in the conversation instead. Do not resend.",
|
|
1284
|
+
delivery_mode_suggestions_only: 'Kept as a suggestion the owner sees in the product, not sent as a message. Do not resend.',
|
|
1285
|
+
destination_not_allowed: 'Not delivered: workspace policy excludes this destination. Send to an allowed one, or ask the person to change the policy.',
|
|
1286
|
+
};
|
|
1242
1287
|
const STATUS_CONSEQUENCE = {
|
|
1243
1288
|
submitted: 'Recorded and not dispatched yet; the platform still owns it. Do not resend.',
|
|
1244
1289
|
held: 'Not delivered yet: policy is withholding it and it may still be delivered. Do not resend.',
|
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
4
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
5
|
const base_command_1 = require("../../../base-command");
|
|
6
|
+
const agent_home_workspace_1 = require("../../../lib/agent-home-workspace");
|
|
6
7
|
const held_messages_1 = require("../../../lib/held-messages");
|
|
8
|
+
const workspace_header_1 = require("../../../lib/workspace-header");
|
|
7
9
|
/**
|
|
8
10
|
* `skrr agents always-on held-messages <agent-id>` — list the session messages the delivery policy
|
|
9
11
|
* is holding for an agent (`GET /api/agents/:id/always-on/held-messages`).
|
|
@@ -30,11 +32,32 @@ class AgentsAlwaysOnHeldMessages extends base_command_1.BaseCommand {
|
|
|
30
32
|
async run() {
|
|
31
33
|
this.requireAuth();
|
|
32
34
|
const { args, flags } = await this.parse(AgentsAlwaysOnHeldMessages);
|
|
35
|
+
// The route is scoped to a workspace and answers 400 to a request that names none (unlike
|
|
36
|
+
// `always-on status`, which reads the agent's own). With nothing chosen, use the agent's home
|
|
37
|
+
// workspace, as `agents chat` does; `--workspace`, `OVERSKY_WORKSPACE_ID` and
|
|
38
|
+
// `skrr workspaces use` all win over it, and it is never applied in an autonomous Agent session.
|
|
39
|
+
await (0, agent_home_workspace_1.applyAgentHomeWorkspaceDefault)(args.id, (agentId) => data_provider_1.dataService.getAgentById({ agent_id: agentId }));
|
|
33
40
|
let response;
|
|
34
41
|
try {
|
|
35
42
|
response = await data_provider_1.dataService.getAlwaysOnHeldMessages(args.id, flags.cursor);
|
|
36
43
|
}
|
|
37
44
|
catch (err) {
|
|
45
|
+
// The server would not use a workspace. Say which one this request carried (if any), because
|
|
46
|
+
// "none selected" and "not a member of the one sent" need different fixes, not a bare 400.
|
|
47
|
+
if ((0, held_messages_1.isWorkspaceContextRequired)(err)) {
|
|
48
|
+
const sentWorkspaceId = (0, workspace_header_1.withWorkspaceHeader)({})['X-Workspace-Id'];
|
|
49
|
+
const refusal = (0, held_messages_1.heldMessagesWorkspaceRefusal)(sentWorkspaceId);
|
|
50
|
+
this.failWithCliError({
|
|
51
|
+
message: refusal.message,
|
|
52
|
+
code: 'HELD_MESSAGES_WORKSPACE_REQUIRED',
|
|
53
|
+
exit: 1,
|
|
54
|
+
retryable: false,
|
|
55
|
+
details: {
|
|
56
|
+
suggestion: refusal.suggestion,
|
|
57
|
+
...(sentWorkspaceId ? { workspaceId: sentWorkspaceId } : {}),
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
}
|
|
38
61
|
this.handleApiError(err);
|
|
39
62
|
}
|
|
40
63
|
// A body that is not the documented shape is an error, not an empty list: "none held" is the
|
|
@@ -52,7 +75,7 @@ class AgentsAlwaysOnHeldMessages extends base_command_1.BaseCommand {
|
|
|
52
75
|
});
|
|
53
76
|
}
|
|
54
77
|
if (flags.json) {
|
|
55
|
-
this.
|
|
78
|
+
this.printJsonResult(response);
|
|
56
79
|
return;
|
|
57
80
|
}
|
|
58
81
|
for (const line of (0, held_messages_1.heldMessageLines)(args.id, result))
|
|
@@ -32,7 +32,8 @@ class AgentsAlwaysOnStatus extends base_command_1.BaseCommand {
|
|
|
32
32
|
const { args, flags } = await this.parse(AgentsAlwaysOnStatus);
|
|
33
33
|
let status;
|
|
34
34
|
try {
|
|
35
|
-
|
|
35
|
+
// Asks for `executionReadiness`; the web's 30 s poll does not.
|
|
36
|
+
status = await data_provider_1.dataService.getAlwaysOnStatus(args.id, undefined, { withReadiness: true });
|
|
36
37
|
}
|
|
37
38
|
catch (err) {
|
|
38
39
|
this.handleApiError(err);
|
|
@@ -82,6 +83,10 @@ class AgentsAlwaysOnStatus extends base_command_1.BaseCommand {
|
|
|
82
83
|
}
|
|
83
84
|
for (const line of (0, always_on_runtime_1.runtimeLines)(runtime, status.desiredEnabled))
|
|
84
85
|
this.log(line);
|
|
86
|
+
// Online is not the same as able: a machine on an older Skrr is `blocked` here (OSK-23456).
|
|
87
|
+
for (const line of (0, always_on_runtime_1.executionReadinessLines)(status.executionReadiness, status.desiredEnabled)) {
|
|
88
|
+
this.log(line);
|
|
89
|
+
}
|
|
85
90
|
const reconcile = status.reconcile;
|
|
86
91
|
this.log(`Reconcile: ${reconcile?.status ?? 'unavailable'}` +
|
|
87
92
|
(reconcile?.lastError ? ` (${reconcile.lastError})` : ''));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MiniComputerCommand } from '../../../../lib/miniComputerCommand';
|
|
2
|
+
export default class AgentsMiniComputerAppReset extends MiniComputerCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
agentId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
app: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static flags: {
|
|
10
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
|
+
const miniComputerCommand_1 = require("../../../../lib/miniComputerCommand");
|
|
6
|
+
class AgentsMiniComputerAppReset extends miniComputerCommand_1.MiniComputerCommand {
|
|
7
|
+
static description = 'Put one built-in Mini Computer app of an Agent back on its default (removes the configuration set on it). Resetting an app with nothing set is not an error. Needs edit access to the Agent.';
|
|
8
|
+
static examples = ['<%= config.bin %> agents mini-computer app reset <agent-id> tasks'];
|
|
9
|
+
static args = {
|
|
10
|
+
agentId: core_1.Args.string({ description: 'Agent ID', required: true, ignoreStdin: true }),
|
|
11
|
+
app: core_1.Args.string({
|
|
12
|
+
description: 'Built-in app id (for example tasks)',
|
|
13
|
+
required: true,
|
|
14
|
+
ignoreStdin: true,
|
|
15
|
+
}),
|
|
16
|
+
};
|
|
17
|
+
static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
|
|
18
|
+
async run() {
|
|
19
|
+
this.requireAuth();
|
|
20
|
+
const { args, flags } = await this.parse(AgentsMiniComputerAppReset);
|
|
21
|
+
try {
|
|
22
|
+
const entry = await data_provider_1.dataService.resetMiniComputerAppConfig(args.agentId, args.app);
|
|
23
|
+
if (flags.json) {
|
|
24
|
+
this.log(this.agentJson(args.agentId, entry));
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this.log(`${entry.appId}: back on its default`);
|
|
28
|
+
this.printAgentUrl(args.agentId);
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
this.failMiniComputer(error);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = AgentsMiniComputerAppReset;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MiniComputerCommand } from '../../../../lib/miniComputerCommand';
|
|
2
|
+
export default class AgentsMiniComputerAppSet extends MiniComputerCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
agentId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
app: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static flags: {
|
|
10
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'expected-rev': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
6
|
+
const miniComputerCommand_1 = require("../../../../lib/miniComputerCommand");
|
|
7
|
+
const miniComputer_1 = require("../../../../lib/miniComputer");
|
|
8
|
+
class AgentsMiniComputerAppSet extends miniComputerCommand_1.MiniComputerCommand {
|
|
9
|
+
static description = 'Set the configuration of one built-in Mini Computer app of an Agent, from JSON (--config) or a file (--file). It is the Agent\'s, so everyone who opens this Agent\'s computer sees it, and the person can reset it. The server checks it against that app\'s slot: today only tasks has settings ({ "view": { "viewType": "board", "groupBy": "assignee", ... } }; `agents mini-computer tasks-view` builds it from flags); every other app takes {}. Needs edit access to the Agent.';
|
|
10
|
+
static examples = [
|
|
11
|
+
'<%= config.bin %> agents mini-computer app set <agent-id> tasks --config \'{"view":{"viewType":"board","groupBy":"assignee"}}\'',
|
|
12
|
+
'<%= config.bin %> agents mini-computer app set <agent-id> tasks --file view.json --expected-rev 2',
|
|
13
|
+
];
|
|
14
|
+
static args = {
|
|
15
|
+
agentId: core_1.Args.string({ description: 'Agent ID', required: true, ignoreStdin: true }),
|
|
16
|
+
app: core_1.Args.string({
|
|
17
|
+
description: 'Built-in app id (for example tasks)',
|
|
18
|
+
required: true,
|
|
19
|
+
ignoreStdin: true,
|
|
20
|
+
}),
|
|
21
|
+
};
|
|
22
|
+
static flags = {
|
|
23
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
24
|
+
config: core_1.Flags.string({
|
|
25
|
+
description: 'The configuration as JSON',
|
|
26
|
+
exactlyOne: ['config', 'file'],
|
|
27
|
+
}),
|
|
28
|
+
file: core_1.Flags.string({
|
|
29
|
+
description: 'A JSON file holding the configuration',
|
|
30
|
+
exactlyOne: ['config', 'file'],
|
|
31
|
+
}),
|
|
32
|
+
'expected-rev': core_1.Flags.integer({
|
|
33
|
+
description: 'Only write if the app is at this revision (0: nothing set yet)',
|
|
34
|
+
min: 0,
|
|
35
|
+
}),
|
|
36
|
+
};
|
|
37
|
+
async run() {
|
|
38
|
+
this.requireAuth();
|
|
39
|
+
const { args, flags } = await this.parse(AgentsMiniComputerAppSet);
|
|
40
|
+
let config;
|
|
41
|
+
try {
|
|
42
|
+
config = JSON.parse(flags.config ?? (0, node_fs_1.readFileSync)(flags.file, 'utf8'));
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
return this.failWithCliError({
|
|
46
|
+
message: `Could not read the configuration as JSON: ${error instanceof Error ? error.message : 'unreadable'}. Nothing was changed.`,
|
|
47
|
+
code: 'MINI_COMPUTER_INVALID',
|
|
48
|
+
exit: 2,
|
|
49
|
+
retryable: false,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
const entry = await data_provider_1.dataService.putMiniComputerAppConfig(args.agentId, args.app, {
|
|
54
|
+
config,
|
|
55
|
+
...(flags['expected-rev'] === undefined ? {} : { expectedRev: flags['expected-rev'] }),
|
|
56
|
+
});
|
|
57
|
+
if (flags.json) {
|
|
58
|
+
this.log(this.agentJson(args.agentId, entry));
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
for (const line of (0, miniComputer_1.formatMiniAppConfig)(entry))
|
|
62
|
+
this.log(line);
|
|
63
|
+
this.printAgentUrl(args.agentId);
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
this.failMiniComputer(error);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.default = AgentsMiniComputerAppSet;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MiniComputerCommand } from '../../../../lib/miniComputerCommand';
|
|
2
|
+
export default class AgentsMiniComputerLayoutChange extends MiniComputerCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
agentId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
ops: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const miniComputerCommand_1 = require("../../../../lib/miniComputerCommand");
|
|
6
|
+
const miniComputer_1 = require("../../../../lib/miniComputer");
|
|
7
|
+
class AgentsMiniComputerLayoutChange extends miniComputerCommand_1.MiniComputerCommand {
|
|
8
|
+
static description = 'Send several layout operations at once, as JSON (--ops) or a file (--file): [{ "op": "pin", "app": "calendar" }, { "op": "folder", "name": "Work", "apps": ["tasks", "goals"] }, { "op": "remove", "app": "feed" }]. Operations: pin, unpin, move, folder, unfolder, remove, restore. All are applied or none is. The person you are signed in as chooses whether an Agent\'s layout change is applied at once (and can be undone) or proposed for them to apply; the answer says which.';
|
|
9
|
+
static examples = [
|
|
10
|
+
'<%= config.bin %> agents mini-computer layout change <agent-id> --ops \'[{"op":"pin","app":"calendar"},{"op":"remove","app":"feed"}]\'',
|
|
11
|
+
];
|
|
12
|
+
static args = {
|
|
13
|
+
agentId: core_1.Args.string({ description: 'Agent ID', required: true, ignoreStdin: true }),
|
|
14
|
+
};
|
|
15
|
+
static flags = {
|
|
16
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
17
|
+
ops: core_1.Flags.string({
|
|
18
|
+
description: 'The operations as a JSON array',
|
|
19
|
+
exactlyOne: ['ops', 'file'],
|
|
20
|
+
}),
|
|
21
|
+
file: core_1.Flags.string({
|
|
22
|
+
description: 'A JSON file holding the operations',
|
|
23
|
+
exactlyOne: ['ops', 'file'],
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
async run() {
|
|
27
|
+
this.requireAuth();
|
|
28
|
+
const { args, flags } = await this.parse(AgentsMiniComputerLayoutChange);
|
|
29
|
+
let ops;
|
|
30
|
+
try {
|
|
31
|
+
ops = (0, miniComputer_1.parseOpsText)(flags.ops ?? (0, node_fs_1.readFileSync)(flags.file, 'utf8'));
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
return this.failWithCliError({
|
|
35
|
+
message: `Could not read the operations: ${error instanceof Error ? error.message : 'unreadable'}. Nothing was changed.`,
|
|
36
|
+
code: 'MINI_COMPUTER_INVALID',
|
|
37
|
+
exit: 2,
|
|
38
|
+
retryable: false,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
await this.sendLayoutOps(args.agentId, ops, flags.json);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.default = AgentsMiniComputerLayoutChange;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MiniComputerCommand } from '../../../../lib/miniComputerCommand';
|
|
2
|
+
export default class AgentsMiniComputerLayoutFolder extends MiniComputerCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static strict: boolean;
|
|
6
|
+
static args: {
|
|
7
|
+
agentId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
9
|
+
};
|
|
10
|
+
static flags: {
|
|
11
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const miniComputerCommand_1 = require("../../../../lib/miniComputerCommand");
|
|
5
|
+
class AgentsMiniComputerLayoutFolder extends miniComputerCommand_1.MiniComputerCommand {
|
|
6
|
+
static description = "Group apps into a named folder on the home grid of an Agent's Mini Computer. A folder of that name (any case) that exists takes the apps; otherwise a new one is made where the first app was. A pinned app joins by leaving the dock. The person you are signed in as chooses whether an Agent's layout change is applied at once (and can be undone) or proposed for them to apply; the answer says which.";
|
|
7
|
+
static examples = [
|
|
8
|
+
'<%= config.bin %> agents mini-computer layout folder <agent-id> Work tasks goals todo',
|
|
9
|
+
];
|
|
10
|
+
static strict = false;
|
|
11
|
+
static args = {
|
|
12
|
+
agentId: core_1.Args.string({ description: 'Agent ID', required: true, ignoreStdin: true }),
|
|
13
|
+
name: core_1.Args.string({
|
|
14
|
+
description: 'Folder name (up to 40 characters)',
|
|
15
|
+
required: true,
|
|
16
|
+
ignoreStdin: true,
|
|
17
|
+
}),
|
|
18
|
+
};
|
|
19
|
+
static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
|
|
20
|
+
async run() {
|
|
21
|
+
this.requireAuth();
|
|
22
|
+
const { args, argv, flags } = await this.parse(AgentsMiniComputerLayoutFolder);
|
|
23
|
+
const apps = argv.slice(2);
|
|
24
|
+
if (apps.length === 0) {
|
|
25
|
+
return this.failWithCliError({
|
|
26
|
+
message: 'Name at least one app to put in the folder: layout folder <agent-id> <name> <app> [<app> ...].',
|
|
27
|
+
code: 'MINI_COMPUTER_INVALID',
|
|
28
|
+
exit: 2,
|
|
29
|
+
retryable: false,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
await this.sendLayoutOps(args.agentId, [{ op: 'folder', name: args.name, apps }], flags.json);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = AgentsMiniComputerLayoutFolder;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MiniComputerCommand } from '../../../../lib/miniComputerCommand';
|
|
2
|
+
export default class AgentsMiniComputerLayoutMove extends MiniComputerCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
agentId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
app: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static flags: {
|
|
10
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
position: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const miniComputerCommand_1 = require("../../../../lib/miniComputerCommand");
|
|
5
|
+
class AgentsMiniComputerLayoutMove extends miniComputerCommand_1.MiniComputerCommand {
|
|
6
|
+
static description = "Reorder an app within where it sits (the dock, a folder, or the home grid), to a position counted from 0 over what the person sees. The person you are signed in as chooses whether an Agent's layout change is applied at once (and can be undone) or proposed for them to apply; the answer says which.";
|
|
7
|
+
static examples = [
|
|
8
|
+
'<%= config.bin %> agents mini-computer layout move <agent-id> todo --position 0',
|
|
9
|
+
];
|
|
10
|
+
static args = {
|
|
11
|
+
agentId: core_1.Args.string({ description: 'Agent ID', required: true, ignoreStdin: true }),
|
|
12
|
+
app: core_1.Args.string({
|
|
13
|
+
description: 'App id (for example calendar, or app:<installation-id>)',
|
|
14
|
+
required: true,
|
|
15
|
+
ignoreStdin: true,
|
|
16
|
+
}),
|
|
17
|
+
};
|
|
18
|
+
static flags = {
|
|
19
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
20
|
+
position: core_1.Flags.integer({
|
|
21
|
+
description: 'Place in the order, counting from 0',
|
|
22
|
+
min: 0,
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
async run() {
|
|
27
|
+
this.requireAuth();
|
|
28
|
+
const { args, flags } = await this.parse(AgentsMiniComputerLayoutMove);
|
|
29
|
+
await this.sendLayoutOps(args.agentId, [{ op: 'move', app: args.app, position: flags.position }], flags.json);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.default = AgentsMiniComputerLayoutMove;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MiniComputerCommand } from '../../../../lib/miniComputerCommand';
|
|
2
|
+
export default class AgentsMiniComputerLayoutPin extends MiniComputerCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
agentId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
app: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static flags: {
|
|
10
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
position: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const miniComputerCommand_1 = require("../../../../lib/miniComputerCommand");
|
|
5
|
+
class AgentsMiniComputerLayoutPin extends miniComputerCommand_1.MiniComputerCommand {
|
|
6
|
+
static description = "Pin an app to the dock of an Agent's Mini Computer (at most 4). It leaves the home grid. The person you are signed in as chooses whether an Agent's layout change is applied at once (and can be undone) or proposed for them to apply; the answer says which.";
|
|
7
|
+
static examples = [
|
|
8
|
+
'<%= config.bin %> agents mini-computer layout pin <agent-id> calendar',
|
|
9
|
+
'<%= config.bin %> agents mini-computer layout pin <agent-id> tasks --position 0',
|
|
10
|
+
];
|
|
11
|
+
static args = {
|
|
12
|
+
agentId: core_1.Args.string({ description: 'Agent ID', required: true, ignoreStdin: true }),
|
|
13
|
+
app: core_1.Args.string({
|
|
14
|
+
description: 'App id (for example calendar, or app:<installation-id>)',
|
|
15
|
+
required: true,
|
|
16
|
+
ignoreStdin: true,
|
|
17
|
+
}),
|
|
18
|
+
};
|
|
19
|
+
static flags = {
|
|
20
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
21
|
+
position: core_1.Flags.integer({ description: 'Place in the order, counting from 0', min: 0 }),
|
|
22
|
+
};
|
|
23
|
+
async run() {
|
|
24
|
+
this.requireAuth();
|
|
25
|
+
const { args, flags } = await this.parse(AgentsMiniComputerLayoutPin);
|
|
26
|
+
await this.sendLayoutOps(args.agentId, [
|
|
27
|
+
{
|
|
28
|
+
op: 'pin',
|
|
29
|
+
app: args.app,
|
|
30
|
+
...(flags.position === undefined ? {} : { position: flags.position }),
|
|
31
|
+
},
|
|
32
|
+
], flags.json);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = AgentsMiniComputerLayoutPin;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MiniComputerCommand } from '../../../../lib/miniComputerCommand';
|
|
2
|
+
export default class AgentsMiniComputerLayoutRemove extends MiniComputerCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
agentId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
app: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static flags: {
|
|
10
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const miniComputerCommand_1 = require("../../../../lib/miniComputerCommand");
|
|
5
|
+
class AgentsMiniComputerLayoutRemove extends miniComputerCommand_1.MiniComputerCommand {
|
|
6
|
+
static description = "Hide an app from the home screen. Nothing is uninstalled and the app keeps its place: restore brings it back. Settings and installed Agent Apps cannot be removed this way. The person you are signed in as chooses whether an Agent's layout change is applied at once (and can be undone) or proposed for them to apply; the answer says which.";
|
|
7
|
+
static examples = [
|
|
8
|
+
'<%= config.bin %> agents mini-computer layout remove <agent-id> feed',
|
|
9
|
+
];
|
|
10
|
+
static args = {
|
|
11
|
+
agentId: core_1.Args.string({ description: 'Agent ID', required: true, ignoreStdin: true }),
|
|
12
|
+
app: core_1.Args.string({
|
|
13
|
+
description: 'App id (for example calendar, or app:<installation-id>)',
|
|
14
|
+
required: true,
|
|
15
|
+
ignoreStdin: true,
|
|
16
|
+
}),
|
|
17
|
+
};
|
|
18
|
+
static flags = {
|
|
19
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
20
|
+
};
|
|
21
|
+
async run() {
|
|
22
|
+
this.requireAuth();
|
|
23
|
+
const { args, flags } = await this.parse(AgentsMiniComputerLayoutRemove);
|
|
24
|
+
await this.sendLayoutOps(args.agentId, [{ op: 'remove', app: args.app }], flags.json);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = AgentsMiniComputerLayoutRemove;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MiniComputerCommand } from '../../../../lib/miniComputerCommand';
|
|
2
|
+
export default class AgentsMiniComputerLayoutRestore extends MiniComputerCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
agentId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
app: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static flags: {
|
|
10
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|