@skrr-ai/cli 0.1.60 → 0.1.62
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 +16 -0
- package/dist/commands/agents/create.d.ts +1 -0
- package/dist/commands/agents/create.js +8 -1
- package/dist/commands/agents/delete.d.ts +14 -0
- package/dist/commands/agents/delete.js +52 -4
- package/dist/commands/agents/eval/index.d.ts +38 -0
- package/dist/commands/agents/eval/index.js +157 -0
- package/dist/commands/agents/eval/list.d.ts +13 -0
- package/dist/commands/agents/eval/list.js +53 -0
- package/dist/commands/agents/eval/show.d.ts +13 -0
- package/dist/commands/agents/eval/show.js +36 -0
- package/dist/commands/agents/import.d.ts +37 -0
- package/dist/commands/agents/import.js +233 -0
- package/dist/commands/agents/pull.d.ts +27 -0
- package/dist/commands/agents/pull.js +82 -0
- package/dist/commands/agents/push.d.ts +28 -0
- package/dist/commands/agents/push.js +112 -0
- package/dist/commands/agents/releases/ci-publish.d.ts +32 -0
- package/dist/commands/agents/releases/ci-publish.js +99 -0
- package/dist/commands/agents/releases/create.d.ts +3 -0
- package/dist/commands/agents/releases/create.js +27 -6
- package/dist/commands/agents/releases/known-issues/add.d.ts +19 -0
- package/dist/commands/agents/releases/known-issues/add.js +43 -0
- package/dist/commands/agents/releases/known-issues/list.d.ts +17 -0
- package/dist/commands/agents/releases/known-issues/list.js +55 -0
- package/dist/commands/agents/releases/known-issues/update.d.ts +18 -0
- package/dist/commands/agents/releases/known-issues/update.js +47 -0
- package/dist/commands/agents/releases/list.js +25 -3
- package/dist/commands/agents/releases/rollback.js +12 -4
- package/dist/commands/agents/releases/test-install.d.ts +22 -0
- package/dist/commands/agents/releases/test-install.js +70 -0
- package/dist/commands/agents/releases/trusted-publishers/list.d.ts +17 -0
- package/dist/commands/agents/releases/trusted-publishers/list.js +55 -0
- package/dist/commands/agents/releases/trusted-publishers/remove.d.ts +17 -0
- package/dist/commands/agents/releases/trusted-publishers/remove.js +45 -0
- package/dist/commands/agents/releases/trusted-publishers/set.d.ts +27 -0
- package/dist/commands/agents/releases/trusted-publishers/set.js +82 -0
- package/dist/commands/agents/update.d.ts +1 -0
- package/dist/commands/agents/update.js +8 -1
- package/dist/commands/agents/usage-cap.d.ts +20 -0
- package/dist/commands/agents/usage-cap.js +76 -0
- package/dist/commands/agents/validate.d.ts +22 -0
- package/dist/commands/agents/validate.js +66 -0
- package/dist/commands/agents/visibility.d.ts +13 -0
- package/dist/commands/agents/visibility.js +84 -2
- package/dist/commands/commerce/fees/show.d.ts +19 -0
- package/dist/commands/commerce/fees/show.js +75 -0
- package/dist/commands/earnings/index.d.ts +15 -0
- package/dist/commands/earnings/index.js +46 -0
- package/dist/commands/earnings/payouts.d.ts +12 -0
- package/dist/commands/earnings/payouts.js +39 -0
- package/dist/commands/earnings/statements.d.ts +19 -0
- package/dist/commands/earnings/statements.js +70 -0
- package/dist/commands/goals/key-results/create.d.ts +1 -1
- package/dist/commands/goals/key-results/create.js +5 -1
- package/dist/commands/harnesses/show.js +11 -1
- package/dist/commands/logout.js +31 -0
- package/dist/commands/machines/show.js +10 -1
- package/dist/commands/managed-execution/show.d.ts +10 -0
- package/dist/commands/managed-execution/show.js +60 -0
- package/dist/commands/spaces/show.js +35 -1
- package/dist/commands/step-up.d.ts +23 -0
- package/dist/commands/step-up.js +96 -0
- package/dist/commands/store/acquisitions/approve.d.ts +30 -0
- package/dist/commands/store/acquisitions/approve.js +100 -0
- package/dist/commands/store/acquisitions/decline.d.ts +17 -0
- package/dist/commands/store/acquisitions/decline.js +47 -0
- package/dist/commands/store/acquisitions/show.d.ts +16 -0
- package/dist/commands/store/acquisitions/show.js +49 -0
- package/dist/commands/store/admissions/approve.d.ts +19 -0
- package/dist/commands/store/admissions/approve.js +50 -0
- package/dist/commands/store/admissions/list.d.ts +15 -0
- package/dist/commands/store/admissions/list.js +60 -0
- package/dist/commands/store/admissions/refuse.d.ts +18 -0
- package/dist/commands/store/admissions/refuse.js +49 -0
- package/dist/commands/store/advisories/artifact.d.ts +15 -0
- package/dist/commands/store/advisories/artifact.js +25 -0
- package/dist/commands/store/advisories/cancel.d.ts +13 -0
- package/dist/commands/store/advisories/cancel.js +34 -0
- package/dist/commands/store/advisories/close.d.ts +18 -0
- package/dist/commands/store/advisories/close.js +51 -0
- package/dist/commands/store/advisories/confirm.d.ts +17 -0
- package/dist/commands/store/advisories/confirm.js +40 -0
- package/dist/commands/store/advisories/issue.d.ts +20 -0
- package/dist/commands/store/advisories/issue.js +59 -0
- package/dist/commands/store/advisories/list.d.ts +15 -0
- package/dist/commands/store/advisories/list.js +49 -0
- package/dist/commands/store/advisories/show.d.ts +13 -0
- package/dist/commands/store/advisories/show.js +34 -0
- package/dist/commands/store/artifacts/release.d.ts +16 -0
- package/dist/commands/store/artifacts/release.js +31 -0
- package/dist/commands/store/artifacts/used-by.d.ts +12 -0
- package/dist/commands/store/artifacts/used-by.js +20 -0
- package/dist/commands/store/browse.d.ts +5 -0
- package/dist/commands/store/browse.js +28 -1
- package/dist/commands/store/channel.d.ts +21 -0
- package/dist/commands/store/channel.js +62 -0
- package/dist/commands/store/follow.d.ts +14 -0
- package/dist/commands/store/follow.js +45 -0
- package/dist/commands/store/governance/policy.d.ts +18 -5
- package/dist/commands/store/governance/policy.js +80 -12
- package/dist/commands/store/governance/requests.d.ts +28 -0
- package/dist/commands/store/governance/requests.js +116 -0
- package/dist/commands/store/install.d.ts +3 -0
- package/dist/commands/store/install.js +101 -2
- package/dist/commands/store/issues.d.ts +26 -0
- package/dist/commands/store/issues.js +118 -0
- package/dist/commands/store/maintainers/add.d.ts +13 -0
- package/dist/commands/store/maintainers/add.js +23 -0
- package/dist/commands/store/maintainers/remove.d.ts +13 -0
- package/dist/commands/store/maintainers/remove.js +22 -0
- package/dist/commands/store/publishers/approve.d.ts +11 -0
- package/dist/commands/store/publishers/approve.js +25 -0
- package/dist/commands/store/publishers/claim.d.ts +12 -0
- package/dist/commands/store/publishers/claim.js +20 -0
- package/dist/commands/store/publishers/confirm.d.ts +11 -0
- package/dist/commands/store/publishers/confirm.js +17 -0
- package/dist/commands/store/publishers/domains/begin.d.ts +12 -0
- package/dist/commands/store/publishers/domains/begin.js +20 -0
- package/dist/commands/store/publishers/domains/list.d.ts +9 -0
- package/dist/commands/store/publishers/domains/list.js +19 -0
- package/dist/commands/store/publishers/domains/verify.d.ts +12 -0
- package/dist/commands/store/publishers/domains/verify.js +20 -0
- package/dist/commands/store/publishers/namespaces.d.ts +8 -0
- package/dist/commands/store/publishers/namespaces.js +16 -0
- package/dist/commands/store/publishers/verified.d.ts +11 -0
- package/dist/commands/store/publishers/verified.js +34 -0
- package/dist/commands/store/refund.d.ts +22 -0
- package/dist/commands/store/refund.js +80 -0
- package/dist/commands/store/report.d.ts +20 -0
- package/dist/commands/store/report.js +59 -0
- package/dist/commands/store/reports.d.ts +11 -0
- package/dist/commands/store/reports.js +52 -0
- package/dist/commands/store/signals.d.ts +18 -0
- package/dist/commands/store/signals.js +43 -0
- package/dist/commands/store/star.d.ts +17 -0
- package/dist/commands/store/star.js +41 -0
- package/dist/commands/store/stars.d.ts +10 -0
- package/dist/commands/store/stars.js +33 -0
- package/dist/commands/store/trial.d.ts +11 -0
- package/dist/commands/store/trial.js +17 -0
- package/dist/commands/store/uninstall.d.ts +19 -0
- package/dist/commands/store/uninstall.js +118 -0
- package/dist/commands/store/update.d.ts +2 -0
- package/dist/commands/store/update.js +60 -2
- package/dist/commands/store/updates.d.ts +10 -4
- package/dist/commands/store/updates.js +60 -39
- package/dist/commands/store/watch.d.ts +18 -0
- package/dist/commands/store/watch.js +44 -0
- package/dist/commands/subscriptions/health.d.ts +12 -0
- package/dist/commands/subscriptions/health.js +39 -0
- package/dist/commands/subscriptions/list.js +3 -2
- package/dist/commands/subscriptions/status.js +7 -1
- package/dist/commands/subscriptions/subscribe.d.ts +9 -2
- package/dist/commands/subscriptions/subscribe.js +141 -12
- package/dist/commands/tasks/comments/list.js +9 -1
- package/dist/commands/tasks/labels/attach.js +15 -2
- package/dist/commands/tasks/show.js +17 -3
- package/dist/commands/tasks/update.js +15 -4
- package/dist/commands/tasks/updates/add.js +5 -1
- package/dist/lib/agent-config.js +1 -0
- package/dist/lib/agent-evals.d.ts +71 -0
- package/dist/lib/agent-evals.js +359 -0
- package/dist/lib/agent-spec.d.ts +28 -0
- package/dist/lib/agent-spec.js +58 -0
- package/dist/lib/auth-storage.d.ts +12 -0
- package/dist/lib/auth-storage.js +0 -33
- package/dist/lib/commerce.d.ts +8 -0
- package/dist/lib/commerce.js +10 -0
- package/dist/lib/earnings.d.ts +36 -0
- package/dist/lib/earnings.js +164 -0
- package/dist/lib/github-oidc.d.ts +13 -0
- package/dist/lib/github-oidc.js +41 -0
- package/dist/lib/governed-store.d.ts +43 -2
- package/dist/lib/governed-store.js +25 -1
- package/dist/lib/label-ref.js +16 -0
- package/dist/lib/managed-execution.d.ts +10 -0
- package/dist/lib/managed-execution.js +43 -0
- package/dist/lib/principal-display.d.ts +20 -0
- package/dist/lib/principal-display.js +64 -0
- package/dist/lib/space-template-source.d.ts +14 -0
- package/dist/lib/space-template-source.js +41 -0
- package/dist/lib/step-up.d.ts +21 -0
- package/dist/lib/step-up.js +44 -0
- package/dist/lib/store-acquisition.d.ts +11 -0
- package/dist/lib/store-acquisition.js +40 -0
- package/dist/lib/store-advisories.d.ts +50 -0
- package/dist/lib/store-advisories.js +62 -0
- package/dist/lib/task-closure.js +1 -1
- package/dist/lib/web-url.d.ts +11 -0
- package/dist/lib/web-url.js +14 -0
- package/dist/node_modules/@skrr-ai/data-provider/index.js +25471 -24177
- package/oclif.manifest.json +38931 -34119
- package/package.json +21 -3
|
@@ -3,12 +3,24 @@ 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 prompt_1 = require("../../lib/prompt");
|
|
7
|
+
/**
|
|
8
|
+
* One line per placement, said the same way the web install rail says it: the
|
|
9
|
+
* difference is whether a stranger's instructions get this computer's shell,
|
|
10
|
+
* files and browser.
|
|
11
|
+
*/
|
|
12
|
+
const PLACEMENT_NOTE = {
|
|
13
|
+
cloud: "It runs in the cloud, so its tools do not reach this computer. You can change that in the agent's Runtime settings.",
|
|
14
|
+
local: 'It may use tools on your own computer (shell, files, browser) whenever your daemon is connected.',
|
|
15
|
+
};
|
|
6
16
|
class StoreInstall extends base_command_1.BaseCommand {
|
|
7
|
-
static description = 'Install a published agent — you get your own copy of it';
|
|
17
|
+
static description = 'Install a published agent — you get your own copy of it. A paid agent shows its price and refund terms and asks you to confirm first.';
|
|
8
18
|
static examples = [
|
|
9
19
|
'<%= config.bin %> store install agent_abc123',
|
|
10
20
|
'<%= config.bin %> store install agent_abc123 --release ar_def456',
|
|
11
|
-
'<%= config.bin %> store install agent_abc123 --
|
|
21
|
+
'<%= config.bin %> store install agent_abc123 --run-on local',
|
|
22
|
+
'<%= config.bin %> store install agent_abc123 --share-outcomes',
|
|
23
|
+
'<%= config.bin %> store install agent_abc123 --yes --json',
|
|
12
24
|
];
|
|
13
25
|
static args = {
|
|
14
26
|
agentId: core_1.Args.string({
|
|
@@ -27,10 +39,78 @@ class StoreInstall extends base_command_1.BaseCommand {
|
|
|
27
39
|
'include-memory': core_1.Flags.boolean({
|
|
28
40
|
description: "Include the publisher's shared memories, if they published any",
|
|
29
41
|
}),
|
|
42
|
+
yes: core_1.Flags.boolean({
|
|
43
|
+
char: 'y',
|
|
44
|
+
description: 'Confirm a paid purchase without prompting. The price and refund terms are still printed.',
|
|
45
|
+
}),
|
|
46
|
+
'run-on': core_1.Flags.string({
|
|
47
|
+
description: 'Where the copy runs. cloud (the default) keeps its tools off this computer; ' +
|
|
48
|
+
'local lets it use your shell, files and browser when your daemon is connected',
|
|
49
|
+
options: [...data_provider_1.STORE_INSTALL_EXECUTION_PLACEMENTS],
|
|
50
|
+
}),
|
|
51
|
+
'share-outcomes': core_1.Flags.boolean({
|
|
52
|
+
allowNo: true,
|
|
53
|
+
description: "Let this copy's outcomes count towards the publisher's anonymized proof. Off unless " +
|
|
54
|
+
'you pass it; the publisher only ever sees totals from at least five buyers',
|
|
55
|
+
}),
|
|
30
56
|
};
|
|
31
57
|
async run() {
|
|
32
58
|
this.requireAuth();
|
|
33
59
|
const { args, flags } = await this.parse(StoreInstall);
|
|
60
|
+
// The server still refuses a second install of a listing you own — this is
|
|
61
|
+
// the friendly read that says so before a quote or a prompt (OSK-12287:
|
|
62
|
+
// `installs` is the read model; `purchased` answers membership cheaply).
|
|
63
|
+
try {
|
|
64
|
+
const owned = await data_provider_1.dataService.getPurchasedAgents();
|
|
65
|
+
if ((owned?.purchasedAgentIds ?? []).includes(args.agentId)) {
|
|
66
|
+
this.error(`${args.agentId} is already installed. See it: skrr store updates, or update it: skrr store update ${args.agentId}`, { exit: 1 });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
catch (err) {
|
|
70
|
+
// A read failure must not block an install — the server re-checks anyway.
|
|
71
|
+
if (err.exit)
|
|
72
|
+
throw err;
|
|
73
|
+
this.warn(`Could not check what you own (${err.message}); continuing.`);
|
|
74
|
+
}
|
|
75
|
+
// What installing would charge NOW, resolved by the server the way the
|
|
76
|
+
// install resolves it (OSK-12240). The install then pins what was shown, so
|
|
77
|
+
// a listing whose price moved in between is refused rather than charged.
|
|
78
|
+
let quote;
|
|
79
|
+
try {
|
|
80
|
+
quote = await data_provider_1.dataService.getStoreAgentAcquisitionQuote({
|
|
81
|
+
agentId: args.agentId,
|
|
82
|
+
...(flags.release ? { releaseId: flags.release } : {}),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
this.handleApiError(err);
|
|
87
|
+
}
|
|
88
|
+
if (!quote) {
|
|
89
|
+
this.error('Could not read the price of this listing, so nothing was installed.', {
|
|
90
|
+
exit: 1,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const charge = Number(quote.charge) || 0;
|
|
94
|
+
if (charge > 0) {
|
|
95
|
+
const name = quote.listingName || args.agentId;
|
|
96
|
+
const version = quote.versionLabel ? ` v${quote.versionLabel}` : '';
|
|
97
|
+
// Printed before any prompt and even with --yes, so a scripted purchase
|
|
98
|
+
// still leaves the terms it agreed to in its own output.
|
|
99
|
+
this.logToStderr(`${name}${version} is a paid agent.`);
|
|
100
|
+
this.logToStderr(` Price: ${(0, data_provider_1.formatStoreAcquisitionPrice)(charge)} ${quote.currency}`);
|
|
101
|
+
this.logToStderr(` Refunds: ${(0, data_provider_1.describeStoreAcquisitionRefundTerms)(quote.refundTerms)}`);
|
|
102
|
+
// The price is one charge; the agent's runs are another (I5, C11).
|
|
103
|
+
this.logToStderr(` Runs paid by: ${(0, data_provider_1.describeStoreComputePayer)(quote.computePayer)}`);
|
|
104
|
+
this.logToStderr(` Buyer terms: ${quote.buyerTerms
|
|
105
|
+
? `${quote.buyerTerms.termsVersion} — ${quote.buyerTerms.artifactUri}`
|
|
106
|
+
: 'not configured'}`);
|
|
107
|
+
this.logToStderr(` Offer: ${quote.offerVersionId}`);
|
|
108
|
+
const confirmed = await (0, prompt_1.confirmDestructive)(`Buy ${name} for ${(0, data_provider_1.formatStoreAcquisitionPrice)(charge)} and accept the buyer terms?`, flags.yes).catch((err) => this.error(err.message, { exit: err.exit ?? 1 }));
|
|
109
|
+
if (!confirmed) {
|
|
110
|
+
this.log('Cancelled. Nothing was bought.');
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
34
114
|
let response;
|
|
35
115
|
try {
|
|
36
116
|
response = await data_provider_1.dataService.installStoreAgent({
|
|
@@ -39,6 +119,18 @@ class StoreInstall extends base_command_1.BaseCommand {
|
|
|
39
119
|
...(flags.space ? { spaceId: flags.space } : {}),
|
|
40
120
|
...(flags['include-bootstrap'] ? { includeBootstrap: true } : {}),
|
|
41
121
|
...(flags['include-memory'] ? { includeMemory: true } : {}),
|
|
122
|
+
// Pin what the person was shown: the charge always, the offer when
|
|
123
|
+
// there is one to charge under.
|
|
124
|
+
expectedPrice: charge,
|
|
125
|
+
...(charge > 0 ? { expectedOfferVersionId: quote.offerVersionId } : {}),
|
|
126
|
+
...(flags['run-on']
|
|
127
|
+
? { executionPlacement: flags['run-on'] }
|
|
128
|
+
: {}),
|
|
129
|
+
// Only an explicit answer is sent. Without one the server records
|
|
130
|
+
// nothing, which is not consent.
|
|
131
|
+
...(flags['share-outcomes'] !== undefined
|
|
132
|
+
? { outcomeSharing: { marketplaceProof: flags['share-outcomes'] === true } }
|
|
133
|
+
: {}),
|
|
42
134
|
});
|
|
43
135
|
}
|
|
44
136
|
catch (err) {
|
|
@@ -50,6 +142,13 @@ class StoreInstall extends base_command_1.BaseCommand {
|
|
|
50
142
|
}
|
|
51
143
|
const installedId = response?.installedAgentId;
|
|
52
144
|
this.log(`Installed as ${installedId ?? '-'}.`);
|
|
145
|
+
// Report only what the server says it wrote. A server that does not echo a
|
|
146
|
+
// placement predates it and wrote none, so naming one here would be a claim
|
|
147
|
+
// about a copy this CLI cannot see.
|
|
148
|
+
const placement = response?.executionPlacement;
|
|
149
|
+
if (placement === 'cloud' || placement === 'local') {
|
|
150
|
+
this.log(PLACEMENT_NOTE[placement]);
|
|
151
|
+
}
|
|
53
152
|
// The thing worth saying once: this is a COPY, and it is yours. Edits you
|
|
54
153
|
// make to it survive the publisher's future updates.
|
|
55
154
|
this.log('This is your own copy. Edits you make to it are kept when the publisher ships an update.');
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* Buyer-anchored listing issues (OSK-12290). A buyer files one on a copy they
|
|
4
|
+
* installed; the publisher answers. No Space, no ACL — the issue is the shared
|
|
5
|
+
* surface. Defaults to listing; `store issues reply` and `store issues close`
|
|
6
|
+
* are the two verbs that act on one.
|
|
7
|
+
*/
|
|
8
|
+
export default class StoreIssues extends BaseCommand {
|
|
9
|
+
static description: string;
|
|
10
|
+
static examples: string[];
|
|
11
|
+
static args: {
|
|
12
|
+
agentId: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
13
|
+
};
|
|
14
|
+
static flags: {
|
|
15
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
status: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
mine: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
title: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
body: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
20
|
+
reply: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
21
|
+
close: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
22
|
+
reproduce: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
23
|
+
run: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
24
|
+
};
|
|
25
|
+
run(): Promise<void>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
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 base_command_1 = require("../../base-command");
|
|
6
|
+
const format_1 = require("../../lib/format");
|
|
7
|
+
/**
|
|
8
|
+
* Buyer-anchored listing issues (OSK-12290). A buyer files one on a copy they
|
|
9
|
+
* installed; the publisher answers. No Space, no ACL — the issue is the shared
|
|
10
|
+
* surface. Defaults to listing; `store issues reply` and `store issues close`
|
|
11
|
+
* are the two verbs that act on one.
|
|
12
|
+
*/
|
|
13
|
+
class StoreIssues extends base_command_1.BaseCommand {
|
|
14
|
+
static description = 'List or file issues on a store listing you installed';
|
|
15
|
+
static examples = [
|
|
16
|
+
'<%= config.bin %> store issues agent_abc123',
|
|
17
|
+
'<%= config.bin %> store issues agent_abc123 --title "Tool never returns" --body "web_search hangs"',
|
|
18
|
+
'<%= config.bin %> store issues --reply issue_abc --body "fixed in 1.4.1"',
|
|
19
|
+
'<%= config.bin %> store issues --close issue_abc',
|
|
20
|
+
'<%= config.bin %> store issues --reproduce issue_abc --run run_def456',
|
|
21
|
+
];
|
|
22
|
+
static args = {
|
|
23
|
+
agentId: core_1.Args.string({
|
|
24
|
+
description: 'The store listing (or your installed copy)',
|
|
25
|
+
required: false,
|
|
26
|
+
ignoreStdin: true,
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
29
|
+
static flags = {
|
|
30
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
31
|
+
status: core_1.Flags.string({
|
|
32
|
+
description: 'Filter by status',
|
|
33
|
+
options: ['open', 'answered', 'closed'],
|
|
34
|
+
}),
|
|
35
|
+
mine: core_1.Flags.boolean({ description: 'Only your own issues (a publisher sees all by default)' }),
|
|
36
|
+
title: core_1.Flags.string({ description: 'File a new issue: its title' }),
|
|
37
|
+
body: core_1.Flags.string({ description: 'Issue or reply body' }),
|
|
38
|
+
reply: core_1.Flags.string({ description: 'Issue id to reply to (publisher only)' }),
|
|
39
|
+
close: core_1.Flags.string({ description: 'Issue id to close (the buyer who filed it)' }),
|
|
40
|
+
reproduce: core_1.Flags.string({
|
|
41
|
+
description: 'Issue id to attach a sanitized run reproduction to (the buyer who filed it; OSK-12291)',
|
|
42
|
+
}),
|
|
43
|
+
run: core_1.Flags.string({
|
|
44
|
+
description: 'Task execution run id to reproduce — used with --reproduce',
|
|
45
|
+
}),
|
|
46
|
+
};
|
|
47
|
+
async run() {
|
|
48
|
+
this.requireAuth();
|
|
49
|
+
const { args, flags } = await this.parse(StoreIssues);
|
|
50
|
+
try {
|
|
51
|
+
if (flags.reproduce) {
|
|
52
|
+
if (!flags.run)
|
|
53
|
+
this.error('--reproduce needs --run <runId>', { exit: 2 });
|
|
54
|
+
const res = await data_provider_1.dataService.attachStoreListingIssueReproduction(flags.reproduce, flags.run);
|
|
55
|
+
this.log(flags.json
|
|
56
|
+
? JSON.stringify(res, null, 2)
|
|
57
|
+
: `Attached a sanitized reproduction of ${flags.run} to ${res.issue.issueId}.`);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (flags.reply) {
|
|
61
|
+
if (!flags.body)
|
|
62
|
+
this.error('--reply needs --body', { exit: 2 });
|
|
63
|
+
const res = await data_provider_1.dataService.replyStoreListingIssue(flags.reply, flags.body);
|
|
64
|
+
this.log(flags.json ? JSON.stringify(res, null, 2) : `Answered ${res.issue.issueId}.`);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (flags.close) {
|
|
68
|
+
const res = await data_provider_1.dataService.closeStoreListingIssue(flags.close);
|
|
69
|
+
this.log(flags.json ? JSON.stringify(res, null, 2) : `Closed ${res.issue.issueId}.`);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (!args.agentId) {
|
|
73
|
+
this.error('Pass a listing id, or --reply / --close with an issue id', { exit: 2 });
|
|
74
|
+
}
|
|
75
|
+
if (flags.title) {
|
|
76
|
+
if (!flags.body)
|
|
77
|
+
this.error('--title needs --body', { exit: 2 });
|
|
78
|
+
const res = await data_provider_1.dataService.createStoreListingIssue({
|
|
79
|
+
agentId: args.agentId,
|
|
80
|
+
title: flags.title,
|
|
81
|
+
body: flags.body,
|
|
82
|
+
});
|
|
83
|
+
this.log(flags.json
|
|
84
|
+
? JSON.stringify(res, null, 2)
|
|
85
|
+
: `Filed ${res.issue.issueId} — the publisher sees it in their issue queue.`);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const res = await data_provider_1.dataService.listStoreListingIssues(args.agentId, {
|
|
89
|
+
status: flags.status,
|
|
90
|
+
mine: flags.mine,
|
|
91
|
+
});
|
|
92
|
+
const issues = res?.issues ?? [];
|
|
93
|
+
if (flags.json) {
|
|
94
|
+
this.log(JSON.stringify(res, null, 2));
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (!issues.length) {
|
|
98
|
+
this.log('No issues.');
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
(0, format_1.renderTable)(issues.map((i) => ({
|
|
102
|
+
issueId: String(i.issueId),
|
|
103
|
+
status: String(i.status),
|
|
104
|
+
title: String(i.title),
|
|
105
|
+
release: i.releaseVersionLabel ?? '-',
|
|
106
|
+
})), [
|
|
107
|
+
{ key: 'issueId', header: 'ISSUE' },
|
|
108
|
+
{ key: 'status', header: 'STATUS' },
|
|
109
|
+
{ key: 'title', header: 'TITLE', maxWidth: 40 },
|
|
110
|
+
{ key: 'release', header: 'RELEASE' },
|
|
111
|
+
], (line) => this.log(line));
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
this.handleApiError(err);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.default = StoreIssues;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class StoreMaintainersAdd extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
entityType: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
entityId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
userId: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 base_command_1 = require("../../../base-command");
|
|
6
|
+
class StoreMaintainersAdd extends base_command_1.BaseCommand {
|
|
7
|
+
static description = 'Grant a listing maintainer — a listing-pipeline role, not an editor';
|
|
8
|
+
static args = {
|
|
9
|
+
entityType: core_1.Args.string({ required: true, ignoreStdin: true }),
|
|
10
|
+
entityId: core_1.Args.string({ required: true, ignoreStdin: true }),
|
|
11
|
+
};
|
|
12
|
+
static flags = {
|
|
13
|
+
userId: core_1.Flags.string({ required: true }),
|
|
14
|
+
json: core_1.Flags.boolean({ description: 'Output JSON' }),
|
|
15
|
+
};
|
|
16
|
+
async run() {
|
|
17
|
+
this.requireAuth();
|
|
18
|
+
const { args, flags } = await this.parse(StoreMaintainersAdd);
|
|
19
|
+
const result = await data_provider_1.dataService.grantStoreListingMaintainer(args.entityType, args.entityId, flags.userId);
|
|
20
|
+
this.log(JSON.stringify(result, null, 2));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.default = StoreMaintainersAdd;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class StoreMaintainersRemove extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
entityType: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
entityId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
userId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static flags: {
|
|
10
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const core_2 = require("@oclif/core");
|
|
5
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
6
|
+
const base_command_1 = require("../../../base-command");
|
|
7
|
+
class StoreMaintainersRemove extends base_command_1.BaseCommand {
|
|
8
|
+
static description = 'Revoke a listing maintainer grant';
|
|
9
|
+
static args = {
|
|
10
|
+
entityType: core_1.Args.string({ required: true, ignoreStdin: true }),
|
|
11
|
+
entityId: core_1.Args.string({ required: true, ignoreStdin: true }),
|
|
12
|
+
userId: core_1.Args.string({ required: true, ignoreStdin: true }),
|
|
13
|
+
};
|
|
14
|
+
static flags = { json: core_2.Flags.boolean({ description: 'Output JSON' }) };
|
|
15
|
+
async run() {
|
|
16
|
+
this.requireAuth();
|
|
17
|
+
const { args, flags } = await this.parse(StoreMaintainersRemove);
|
|
18
|
+
const result = await data_provider_1.dataService.revokeStoreListingMaintainer(args.entityType, args.entityId, args.userId);
|
|
19
|
+
this.log(JSON.stringify(result, null, 2));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = StoreMaintainersRemove;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class StorePublishersApprove extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
workspaceId: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
6
|
+
entityType: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
entityId: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
};
|
|
10
|
+
run(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 base_command_1 = require("../../../base-command");
|
|
6
|
+
class StorePublishersApprove extends base_command_1.BaseCommand {
|
|
7
|
+
static description = 'Request a two-person org publish approval for a listing';
|
|
8
|
+
static flags = {
|
|
9
|
+
workspaceId: core_1.Flags.string({ required: true }),
|
|
10
|
+
entityType: core_1.Flags.string({ required: true }),
|
|
11
|
+
entityId: core_1.Flags.string({ required: true }),
|
|
12
|
+
json: core_1.Flags.boolean({ description: 'Output JSON' }),
|
|
13
|
+
};
|
|
14
|
+
async run() {
|
|
15
|
+
this.requireAuth();
|
|
16
|
+
const { flags } = await this.parse(StorePublishersApprove);
|
|
17
|
+
const result = await data_provider_1.dataService.requestStoreOrgPublishApproval({
|
|
18
|
+
workspaceId: flags.workspaceId,
|
|
19
|
+
entityType: flags.entityType,
|
|
20
|
+
entityId: flags.entityId,
|
|
21
|
+
});
|
|
22
|
+
this.log(JSON.stringify(result, null, 2));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.default = StorePublishersApprove;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class StorePublishersClaim extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
handle: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
workspaceId: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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 base_command_1 = require("../../../base-command");
|
|
6
|
+
class StorePublishersClaim extends base_command_1.BaseCommand {
|
|
7
|
+
static description = 'Claim a publisher namespace handle — similar names are refused';
|
|
8
|
+
static args = { handle: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
9
|
+
static flags = {
|
|
10
|
+
workspaceId: core_1.Flags.string({ description: 'Claim for this workspace' }),
|
|
11
|
+
json: core_1.Flags.boolean({ description: 'Output JSON' }),
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
this.requireAuth();
|
|
15
|
+
const { args, flags } = await this.parse(StorePublishersClaim);
|
|
16
|
+
const result = await data_provider_1.dataService.claimStorePublisherNamespace(args.handle, flags.workspaceId);
|
|
17
|
+
this.log(JSON.stringify(result, null, 2));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = StorePublishersClaim;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class StorePublishersConfirm extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
approvalId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
};
|
|
10
|
+
run(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 base_command_1 = require("../../../base-command");
|
|
6
|
+
class StorePublishersConfirm extends base_command_1.BaseCommand {
|
|
7
|
+
static description = 'Confirm a pending org publish approval (must be a second owner/admin)';
|
|
8
|
+
static args = { approvalId: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
9
|
+
static flags = { json: core_1.Flags.boolean({ description: 'Output JSON' }) };
|
|
10
|
+
async run() {
|
|
11
|
+
this.requireAuth();
|
|
12
|
+
const { args, flags } = await this.parse(StorePublishersConfirm);
|
|
13
|
+
const result = await data_provider_1.dataService.confirmStoreOrgPublishApproval(args.approvalId);
|
|
14
|
+
this.log(JSON.stringify(result, null, 2));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.default = StorePublishersConfirm;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../../base-command';
|
|
2
|
+
export default class StorePublisherDomainsBegin extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
domain: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
workspaceId: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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 base_command_1 = require("../../../../base-command");
|
|
6
|
+
class StorePublisherDomainsBegin extends base_command_1.BaseCommand {
|
|
7
|
+
static description = 'Claim a publisher domain — prints the DNS TXT record to place';
|
|
8
|
+
static args = { domain: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
9
|
+
static flags = {
|
|
10
|
+
workspaceId: core_1.Flags.string({ description: 'Publish as this workspace' }),
|
|
11
|
+
json: core_1.Flags.boolean({ description: 'Output JSON' }),
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
this.requireAuth();
|
|
15
|
+
const { args, flags } = await this.parse(StorePublisherDomainsBegin);
|
|
16
|
+
const result = await data_provider_1.dataService.beginStorePublisherDomainVerification(args.domain, flags.workspaceId);
|
|
17
|
+
this.log(JSON.stringify(result, null, 2));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = StorePublisherDomainsBegin;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../../base-command';
|
|
2
|
+
export default class StorePublisherDomainsList extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
workspaceId: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
6
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 base_command_1 = require("../../../../base-command");
|
|
6
|
+
class StorePublisherDomainsList extends base_command_1.BaseCommand {
|
|
7
|
+
static description = "List a publisher's domain claims";
|
|
8
|
+
static flags = {
|
|
9
|
+
workspaceId: core_1.Flags.string({ description: 'Publish as this workspace' }),
|
|
10
|
+
json: core_1.Flags.boolean({ description: 'Output JSON' }),
|
|
11
|
+
};
|
|
12
|
+
async run() {
|
|
13
|
+
this.requireAuth();
|
|
14
|
+
const { flags } = await this.parse(StorePublisherDomainsList);
|
|
15
|
+
const result = await data_provider_1.dataService.getStorePublisherDomains(flags.workspaceId);
|
|
16
|
+
this.log(JSON.stringify(result, null, 2));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.default = StorePublisherDomainsList;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../../base-command';
|
|
2
|
+
export default class StorePublisherDomainsVerify extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
domain: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
workspaceId: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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 base_command_1 = require("../../../../base-command");
|
|
6
|
+
class StorePublisherDomainsVerify extends base_command_1.BaseCommand {
|
|
7
|
+
static description = 'Check the DNS TXT record and mark the domain verified';
|
|
8
|
+
static args = { domain: core_1.Args.string({ required: true, ignoreStdin: true }) };
|
|
9
|
+
static flags = {
|
|
10
|
+
workspaceId: core_1.Flags.string({ description: 'Publish as this workspace' }),
|
|
11
|
+
json: core_1.Flags.boolean({ description: 'Output JSON' }),
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
this.requireAuth();
|
|
15
|
+
const { args, flags } = await this.parse(StorePublisherDomainsVerify);
|
|
16
|
+
const result = await data_provider_1.dataService.verifyStorePublisherDomain(args.domain, flags.workspaceId);
|
|
17
|
+
this.log(JSON.stringify(result, null, 2));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = StorePublisherDomainsVerify;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class StorePublishersNamespaces extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
6
|
+
};
|
|
7
|
+
run(): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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 base_command_1 = require("../../../base-command");
|
|
6
|
+
class StorePublishersNamespaces extends base_command_1.BaseCommand {
|
|
7
|
+
static description = 'List your publisher namespaces';
|
|
8
|
+
static flags = { json: core_1.Flags.boolean({ description: 'Output JSON' }) };
|
|
9
|
+
async run() {
|
|
10
|
+
this.requireAuth();
|
|
11
|
+
const { flags } = await this.parse(StorePublishersNamespaces);
|
|
12
|
+
const result = await data_provider_1.dataService.getStorePublisherNamespaces();
|
|
13
|
+
this.log(JSON.stringify(result, null, 2));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.default = StorePublishersNamespaces;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class StorePublishersVerified extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
handle: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
};
|
|
10
|
+
run(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 base_command_1 = require("../../../base-command");
|
|
6
|
+
class StorePublishersVerified extends base_command_1.BaseCommand {
|
|
7
|
+
static description = 'Does this publisher hold a verified domain? (identity, not endorsement)';
|
|
8
|
+
static args = {
|
|
9
|
+
handle: core_1.Args.string({
|
|
10
|
+
required: true,
|
|
11
|
+
ignoreStdin: true,
|
|
12
|
+
description: 'Canonical public publisher handle, with or without @',
|
|
13
|
+
}),
|
|
14
|
+
};
|
|
15
|
+
static flags = { json: core_1.Flags.boolean({ description: 'Output JSON' }) };
|
|
16
|
+
async run() {
|
|
17
|
+
this.requireAuth();
|
|
18
|
+
const { args, flags } = await this.parse(StorePublishersVerified);
|
|
19
|
+
const page = await data_provider_1.dataService.getPublicPublisherPage(args.handle);
|
|
20
|
+
const result = {
|
|
21
|
+
handle: page.handle,
|
|
22
|
+
verified: page.identityEvidence.length > 0,
|
|
23
|
+
identityEvidence: page.identityEvidence,
|
|
24
|
+
};
|
|
25
|
+
if (flags.json) {
|
|
26
|
+
this.log(JSON.stringify(result, null, 2));
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
this.log(result.verified
|
|
30
|
+
? `@${result.handle} has verified domain evidence (identity, not endorsement).`
|
|
31
|
+
: `@${result.handle} has no verified domain evidence.`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.default = StorePublishersVerified;
|