@skrr-ai/cli 0.1.154 → 0.1.157
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/show.d.ts +18 -0
- package/dist/commands/activity/show.js +125 -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/daemon/index.js +2 -0
- package/dist/commands/daemon/workspace-locks.d.ts +9 -0
- package/dist/commands/daemon/workspace-locks.js +59 -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/members/add.js +6 -6
- package/dist/commands/spaces/members/remove.js +6 -6
- 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 +68 -0
- package/dist/lib/agent-activity.js +106 -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 +10806 -8686
- package/oclif.manifest.json +2604 -316
- package/package.json +14 -2
|
@@ -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
|
+
}
|
|
@@ -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 AgentsMiniComputerLayoutRestore extends miniComputerCommand_1.MiniComputerCommand {
|
|
6
|
+
static description = "Bring a hidden app back to the home screen, where it was. 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 restore <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(AgentsMiniComputerLayoutRestore);
|
|
24
|
+
await this.sendLayoutOps(args.agentId, [{ op: 'restore', app: args.app }], flags.json);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = AgentsMiniComputerLayoutRestore;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MiniComputerCommand } from '../../../../lib/miniComputerCommand';
|
|
2
|
+
export default class AgentsMiniComputerLayoutUnfolder 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 AgentsMiniComputerLayoutUnfolder extends miniComputerCommand_1.MiniComputerCommand {
|
|
6
|
+
static description = "Take an app out of its folder and back onto the home grid. A folder it empties goes with it. 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 unfolder <agent-id> tasks',
|
|
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(AgentsMiniComputerLayoutUnfolder);
|
|
24
|
+
await this.sendLayoutOps(args.agentId, [{ op: 'unfolder', app: args.app }], flags.json);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = AgentsMiniComputerLayoutUnfolder;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MiniComputerCommand } from '../../../../lib/miniComputerCommand';
|
|
2
|
+
export default class AgentsMiniComputerLayoutUnpin 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,34 @@
|
|
|
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 AgentsMiniComputerLayoutUnpin extends miniComputerCommand_1.MiniComputerCommand {
|
|
6
|
+
static description = "Move an app from the dock back onto 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 unpin <agent-id> settings',
|
|
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({ description: 'Place in the order, counting from 0', min: 0 }),
|
|
21
|
+
};
|
|
22
|
+
async run() {
|
|
23
|
+
this.requireAuth();
|
|
24
|
+
const { args, flags } = await this.parse(AgentsMiniComputerLayoutUnpin);
|
|
25
|
+
await this.sendLayoutOps(args.agentId, [
|
|
26
|
+
{
|
|
27
|
+
op: 'unpin',
|
|
28
|
+
app: args.app,
|
|
29
|
+
...(flags.position === undefined ? {} : { position: flags.position }),
|
|
30
|
+
},
|
|
31
|
+
], flags.json);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.default = AgentsMiniComputerLayoutUnpin;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MiniComputerCommand } from '../../../lib/miniComputerCommand';
|
|
2
|
+
export default class AgentsMiniComputerShow 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 | undefined, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static flags: {
|
|
10
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
const miniComputer_1 = require("../../../lib/miniComputer");
|
|
7
|
+
class AgentsMiniComputerShow extends miniComputerCommand_1.MiniComputerCommand {
|
|
8
|
+
static description = "Show an Agent's Mini Computer: the configuration set on each built-in app (an app with none is on its default) and the layout of the person you are signed in as, with what is waiting for them and the latest Agent change. The person chooses whether an Agent's layout change is applied or only proposed.";
|
|
9
|
+
static examples = [
|
|
10
|
+
'<%= config.bin %> agents mini-computer show <agent-id>',
|
|
11
|
+
'<%= config.bin %> agents mini-computer show <agent-id> tasks',
|
|
12
|
+
'<%= config.bin %> agents mini-computer show <agent-id> --json',
|
|
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: 'Show only this built-in app’s slot (for example tasks), not the whole computer',
|
|
18
|
+
required: false,
|
|
19
|
+
ignoreStdin: true,
|
|
20
|
+
}),
|
|
21
|
+
};
|
|
22
|
+
static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
|
|
23
|
+
async run() {
|
|
24
|
+
this.requireAuth();
|
|
25
|
+
const { args, flags } = await this.parse(AgentsMiniComputerShow);
|
|
26
|
+
try {
|
|
27
|
+
if (args.app) {
|
|
28
|
+
const entry = await data_provider_1.dataService.getMiniComputerAppConfig(args.agentId, args.app);
|
|
29
|
+
if (flags.json) {
|
|
30
|
+
this.log(this.agentJson(args.agentId, entry));
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
for (const line of (0, miniComputer_1.formatMiniAppConfig)(entry))
|
|
34
|
+
this.log(line);
|
|
35
|
+
this.printAgentUrl(args.agentId);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const [apps, layout] = await Promise.all([
|
|
39
|
+
data_provider_1.dataService.getMiniComputerAppConfigs(args.agentId),
|
|
40
|
+
data_provider_1.dataService.getMiniComputerLayout(args.agentId),
|
|
41
|
+
]);
|
|
42
|
+
if (flags.json) {
|
|
43
|
+
this.log(this.agentJson(args.agentId, { apps: apps.apps, layout }));
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (apps.apps.length === 0)
|
|
47
|
+
this.log('Apps: all on their defaults (nothing set).');
|
|
48
|
+
for (const entry of apps.apps)
|
|
49
|
+
for (const line of (0, miniComputer_1.formatMiniAppConfig)(entry))
|
|
50
|
+
this.log(line);
|
|
51
|
+
for (const line of (0, miniComputer_1.formatMiniComputerLayout)(layout))
|
|
52
|
+
this.log(line);
|
|
53
|
+
this.printAgentUrl(args.agentId);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
this.failMiniComputer(error);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.default = AgentsMiniComputerShow;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { MiniComputerCommand } from '../../../lib/miniComputerCommand';
|
|
2
|
+
export default class AgentsMiniComputerTasksView 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
|
+
reset: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
type: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'group-by': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
sort: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'sort-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'quick-filter': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
status: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
priority: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
assignee: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
label: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
search: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
'date-field': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
'date-preset': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
|
+
after: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
25
|
+
before: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
26
|
+
'expected-rev': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
|
+
};
|
|
28
|
+
run(): Promise<void>;
|
|
29
|
+
}
|