@skrr-ai/cli 0.1.60 → 0.1.63
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/daemon/login.js +19 -1
- 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/exec-runtime-binary.js +2 -2
- 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/live-runtime-binary.js +2 -1
- 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 +25502 -24208
- package/oclif.manifest.json +22884 -18072
- package/package.json +21 -3
|
@@ -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;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* The in-product refund channel the buyer terms promise, for a person or an
|
|
4
|
+
* agent working from a terminal (OSK-12279). It goes through the same gate as
|
|
5
|
+
* the web: one of three answers — refunded now, sent to a person, or refused
|
|
6
|
+
* citing the terms the purchase was made under — and all three are answers,
|
|
7
|
+
* so none of them is an error exit.
|
|
8
|
+
*/
|
|
9
|
+
export default class StoreRefund extends BaseCommand {
|
|
10
|
+
static description: string;
|
|
11
|
+
static examples: string[];
|
|
12
|
+
static args: {
|
|
13
|
+
agentId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
14
|
+
};
|
|
15
|
+
static flags: {
|
|
16
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
reason: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
note: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
'statutory-rights': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
};
|
|
21
|
+
run(): Promise<void>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
// A proactive template may declare reasons of its own, so the server — which
|
|
7
|
+
// answers with the accepted list when it refuses one — is the check, not oclif.
|
|
8
|
+
const REASON_HELP = `${data_provider_1.STORE_REFUND_REASON_CODES.join(', ')}, or a reason the template declares`;
|
|
9
|
+
/**
|
|
10
|
+
* The in-product refund channel the buyer terms promise, for a person or an
|
|
11
|
+
* agent working from a terminal (OSK-12279). It goes through the same gate as
|
|
12
|
+
* the web: one of three answers — refunded now, sent to a person, or refused
|
|
13
|
+
* citing the terms the purchase was made under — and all three are answers,
|
|
14
|
+
* so none of them is an error exit.
|
|
15
|
+
*/
|
|
16
|
+
class StoreRefund extends base_command_1.BaseCommand {
|
|
17
|
+
static description = 'Ask for a refund of an agent you bought. The answer is one of: refunded now, sent to a person for review, or not refundable under the terms you bought it on.';
|
|
18
|
+
static examples = [
|
|
19
|
+
'<%= config.bin %> store refund agent_abc123',
|
|
20
|
+
'<%= config.bin %> store refund agent_abc123 --reason material_defect --note "It never answers"',
|
|
21
|
+
'<%= config.bin %> store refund agent_abc123 --statutory-rights',
|
|
22
|
+
];
|
|
23
|
+
static args = {
|
|
24
|
+
agentId: core_1.Args.string({
|
|
25
|
+
description: 'The store agent you bought (its listing id)',
|
|
26
|
+
required: true,
|
|
27
|
+
ignoreStdin: true,
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
static flags = {
|
|
31
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
32
|
+
reason: core_1.Flags.string({
|
|
33
|
+
description: `Why (${REASON_HELP}). A failed delivery, a defect, or a payment error always goes to a person, whatever the terms say.`,
|
|
34
|
+
}),
|
|
35
|
+
note: core_1.Flags.string({ description: 'Anything a reviewer should know' }),
|
|
36
|
+
'statutory-rights': core_1.Flags.boolean({
|
|
37
|
+
description: 'Invoke your statutory consumer rights. Such a request is always decided by a person, not by the listing terms.',
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
async run() {
|
|
41
|
+
this.requireAuth();
|
|
42
|
+
const { args, flags } = await this.parse(StoreRefund);
|
|
43
|
+
let response;
|
|
44
|
+
try {
|
|
45
|
+
response = await data_provider_1.dataService.requestStoreAgentRefund({
|
|
46
|
+
agentId: args.agentId,
|
|
47
|
+
...(flags.reason ? { reasonCode: flags.reason } : {}),
|
|
48
|
+
...(flags.note ? { note: flags.note } : {}),
|
|
49
|
+
...(flags['statutory-rights'] ? { statutoryRightsClaim: true } : {}),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
this.handleApiError(err);
|
|
54
|
+
}
|
|
55
|
+
if (!response) {
|
|
56
|
+
this.error('The refund request got no answer. Nothing was refunded.', { exit: 1 });
|
|
57
|
+
}
|
|
58
|
+
if (flags.json) {
|
|
59
|
+
this.log(JSON.stringify(response, null, 2));
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const copy = (0, data_provider_1.describeStoreRefundDecision)(response.decision, response.decisionCode);
|
|
63
|
+
let replay = '';
|
|
64
|
+
if (response.alreadyRefunded)
|
|
65
|
+
replay = ' (already refunded earlier)';
|
|
66
|
+
else if (response.alreadyPending)
|
|
67
|
+
replay = ' (a request is already waiting for review)';
|
|
68
|
+
this.log(`${copy.label}${replay}`);
|
|
69
|
+
if (copy.detail)
|
|
70
|
+
this.log(copy.detail);
|
|
71
|
+
if (copy.reason)
|
|
72
|
+
this.log(`Why: ${copy.reason}`);
|
|
73
|
+
if (response.termsClause)
|
|
74
|
+
this.log(`Terms: ${response.termsClause}`);
|
|
75
|
+
if (response.decision === 'denied_by_terms') {
|
|
76
|
+
this.log('If you believe your statutory consumer rights apply, run this again with --statutory-rights and a person will decide.');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.default = StoreRefund;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* Report a Store agent. Any reason for an agent you installed; `security` — the
|
|
4
|
+
* private channel — for any agent you can see, installed or not. Only the Store
|
|
5
|
+
* review team reads a report; the publisher is told the outcome and a count.
|
|
6
|
+
*/
|
|
7
|
+
export default class StoreReport extends BaseCommand {
|
|
8
|
+
static description: string;
|
|
9
|
+
static examples: string[];
|
|
10
|
+
static args: {
|
|
11
|
+
agentId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
12
|
+
};
|
|
13
|
+
static flags: {
|
|
14
|
+
reason: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
description: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
release: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<void>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* Report a Store agent. Any reason for an agent you installed; `security` — the
|
|
8
|
+
* private channel — for any agent you can see, installed or not. Only the Store
|
|
9
|
+
* review team reads a report; the publisher is told the outcome and a count.
|
|
10
|
+
*/
|
|
11
|
+
class StoreReport extends base_command_1.BaseCommand {
|
|
12
|
+
static description = 'Report a Store agent (use --reason security to report a vulnerability privately, no install needed)';
|
|
13
|
+
static examples = [
|
|
14
|
+
'<%= config.bin %> store report agent_abc --reason broken --description "Fails on every run"',
|
|
15
|
+
'<%= config.bin %> store report agent_abc --reason security --description "Sends my token to an undeclared host"',
|
|
16
|
+
];
|
|
17
|
+
static args = {
|
|
18
|
+
agentId: core_1.Args.string({ required: true, ignoreStdin: true }),
|
|
19
|
+
};
|
|
20
|
+
static flags = {
|
|
21
|
+
reason: core_1.Flags.string({
|
|
22
|
+
required: true,
|
|
23
|
+
options: data_provider_1.STORE_REPORT_REASONS.map((entry) => entry.value),
|
|
24
|
+
}),
|
|
25
|
+
description: core_1.Flags.string({ description: 'What happened (required for security reports)' }),
|
|
26
|
+
release: core_1.Flags.string({ description: 'Release id the report is about' }),
|
|
27
|
+
json: core_1.Flags.boolean({ description: 'Output JSON' }),
|
|
28
|
+
};
|
|
29
|
+
async run() {
|
|
30
|
+
this.requireAuth();
|
|
31
|
+
const { args, flags } = await this.parse(StoreReport);
|
|
32
|
+
const reason = flags.reason;
|
|
33
|
+
if (reason === data_provider_1.STORE_SECURITY_REPORT_REASON && !flags.description?.trim()) {
|
|
34
|
+
this.error('A security report needs --description so a reviewer can reproduce it', {
|
|
35
|
+
exit: 1,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
const result = await data_provider_1.dataService.reportAgent({
|
|
40
|
+
agentId: args.agentId,
|
|
41
|
+
reason,
|
|
42
|
+
releaseId: flags.release,
|
|
43
|
+
description: flags.description,
|
|
44
|
+
});
|
|
45
|
+
if (flags.json) {
|
|
46
|
+
this.log(JSON.stringify(result, null, 2));
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this.log(result.private
|
|
50
|
+
? `Security report ${result.reportId} sent privately to the Store review team.`
|
|
51
|
+
: `Report ${result.reportId} submitted.`);
|
|
52
|
+
this.log(`Follow it with: skrr store reports --agent ${args.agentId}`);
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
this.handleApiError(err);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.default = StoreReport;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/** Your own Store reports and where each stands. Never anyone else's. */
|
|
3
|
+
export default class StoreReports extends BaseCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static flags: {
|
|
7
|
+
agent: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
};
|
|
10
|
+
run(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
/** Your own Store reports and where each stands. Never anyone else's. */
|
|
8
|
+
class StoreReports extends base_command_1.BaseCommand {
|
|
9
|
+
static description = 'Show your Store reports and where each stands';
|
|
10
|
+
static examples = [
|
|
11
|
+
'<%= config.bin %> store reports',
|
|
12
|
+
'<%= config.bin %> store reports --agent agent_abc --json',
|
|
13
|
+
];
|
|
14
|
+
static flags = {
|
|
15
|
+
agent: core_1.Flags.string({ description: 'Only reports on this agent' }),
|
|
16
|
+
json: core_1.Flags.boolean({ description: 'Output JSON' }),
|
|
17
|
+
};
|
|
18
|
+
async run() {
|
|
19
|
+
this.requireAuth();
|
|
20
|
+
const { flags } = await this.parse(StoreReports);
|
|
21
|
+
let result;
|
|
22
|
+
try {
|
|
23
|
+
result = await data_provider_1.dataService.getMyStoreReports({ agentId: flags.agent });
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
this.handleApiError(err);
|
|
27
|
+
}
|
|
28
|
+
const reports = result?.data ?? [];
|
|
29
|
+
if (flags.json) {
|
|
30
|
+
this.log(JSON.stringify(reports, null, 2));
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (reports.length === 0) {
|
|
34
|
+
this.log('You have not filed any Store reports.');
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
(0, format_1.renderTable)(reports.map((report) => ({
|
|
38
|
+
agent: report.agentId,
|
|
39
|
+
reason: (0, data_provider_1.storeReportReasonLabel)(report.reason),
|
|
40
|
+
version: report.versionLabel ?? '-',
|
|
41
|
+
filed: report.createdAt ? String(report.createdAt).slice(0, 10) : '-',
|
|
42
|
+
status: (0, data_provider_1.describeMyStoreReport)(report),
|
|
43
|
+
})), [
|
|
44
|
+
{ key: 'agent', header: 'AGENT', verbatim: true },
|
|
45
|
+
{ key: 'reason', header: 'REASON' },
|
|
46
|
+
{ key: 'version', header: 'VERSION' },
|
|
47
|
+
{ key: 'filed', header: 'FILED' },
|
|
48
|
+
{ key: 'status', header: 'STATUS', maxWidth: 60 },
|
|
49
|
+
], (line) => this.log(line));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.default = StoreReports;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* A store listing's social signals (OSK-12309): watchers, stars, and —
|
|
4
|
+
* because an intent count means nothing alone — the release's measured run
|
|
5
|
+
* cost beside them. Publisher follows live on the canonical public profile,
|
|
6
|
+
* where counts may be intentionally withheld by the privacy threshold.
|
|
7
|
+
*/
|
|
8
|
+
export default class StoreSignals extends BaseCommand {
|
|
9
|
+
static description: string;
|
|
10
|
+
static examples: string[];
|
|
11
|
+
static args: {
|
|
12
|
+
agentId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
13
|
+
};
|
|
14
|
+
static flags: {
|
|
15
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
};
|
|
17
|
+
run(): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* A store listing's social signals (OSK-12309): watchers, stars, and —
|
|
8
|
+
* because an intent count means nothing alone — the release's measured run
|
|
9
|
+
* cost beside them. Publisher follows live on the canonical public profile,
|
|
10
|
+
* where counts may be intentionally withheld by the privacy threshold.
|
|
11
|
+
*/
|
|
12
|
+
class StoreSignals extends base_command_1.BaseCommand {
|
|
13
|
+
static description = "Show a store listing's watch/star signals and measured run cost";
|
|
14
|
+
static examples = ['<%= config.bin %> store signals agent_abc123'];
|
|
15
|
+
static args = {
|
|
16
|
+
agentId: core_1.Args.string({ description: 'The store agent id', required: true, ignoreStdin: true }),
|
|
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(StoreSignals);
|
|
24
|
+
try {
|
|
25
|
+
const response = await data_provider_1.dataService.getStoreListingSocial(args.agentId);
|
|
26
|
+
const s = response.signals;
|
|
27
|
+
if (flags.json) {
|
|
28
|
+
this.log(JSON.stringify(s, null, 2));
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
this.log(`Watchers ${s.watch.count}${s.watch.watching ? ' (you watch)' : ''}`);
|
|
32
|
+
this.log(`Stars ${s.star.count}${s.star.starredByMe ? ' (starred)' : ''}`);
|
|
33
|
+
if (s.measuredRunCost?.sufficient) {
|
|
34
|
+
const fmt = (v) => `$${((v ?? 0) / 1_000_000).toFixed(4)}`;
|
|
35
|
+
this.log(`Run cost ${fmt(s.measuredRunCost.minCostMicros)}–${fmt(s.measuredRunCost.maxCostMicros)} per run (measured, ${s.measuredRunCost.cohorts} buyers, ${s.measuredRunCost.windowDays}d)`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
this.handleApiError(err);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.default = StoreSignals;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* Star a store listing (OSK-12309): an intent signal for you and the
|
|
4
|
+
* publisher — it never weighs into ranking and never notifies.
|
|
5
|
+
*/
|
|
6
|
+
export default class StoreStar extends BaseCommand {
|
|
7
|
+
static description: string;
|
|
8
|
+
static examples: string[];
|
|
9
|
+
static args: {
|
|
10
|
+
agentId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
11
|
+
};
|
|
12
|
+
static flags: {
|
|
13
|
+
undo: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* Star a store listing (OSK-12309): an intent signal for you and the
|
|
8
|
+
* publisher — it never weighs into ranking and never notifies.
|
|
9
|
+
*/
|
|
10
|
+
class StoreStar extends base_command_1.BaseCommand {
|
|
11
|
+
static description = 'Star a store agent — or remove your star with --undo';
|
|
12
|
+
static examples = [
|
|
13
|
+
'<%= config.bin %> store star agent_abc123',
|
|
14
|
+
'<%= config.bin %> store star agent_abc123 --undo',
|
|
15
|
+
];
|
|
16
|
+
static args = {
|
|
17
|
+
agentId: core_1.Args.string({ description: 'The store agent id', required: true, ignoreStdin: true }),
|
|
18
|
+
};
|
|
19
|
+
static flags = {
|
|
20
|
+
undo: core_1.Flags.boolean({ description: 'Remove your star' }),
|
|
21
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
22
|
+
};
|
|
23
|
+
async run() {
|
|
24
|
+
this.requireAuth();
|
|
25
|
+
const { args, flags } = await this.parse(StoreStar);
|
|
26
|
+
try {
|
|
27
|
+
const result = flags.undo
|
|
28
|
+
? await data_provider_1.dataService.unstarStoreListing(args.agentId)
|
|
29
|
+
: await data_provider_1.dataService.starStoreListing(args.agentId);
|
|
30
|
+
if (flags.json) {
|
|
31
|
+
this.log(JSON.stringify(result, null, 2));
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
this.log(flags.undo ? 'Star removed.' : 'Starred.');
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
this.handleApiError(err);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.default = StoreStar;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/** Your starred store listings (OSK-12309) — the saved-intent list. */
|
|
3
|
+
export default class StoreStars extends BaseCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static flags: {
|
|
7
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
};
|
|
9
|
+
run(): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
/** Your starred store listings (OSK-12309) — the saved-intent list. */
|
|
7
|
+
class StoreStars extends base_command_1.BaseCommand {
|
|
8
|
+
static description = 'List the store listings you have starred';
|
|
9
|
+
static examples = ['<%= config.bin %> store stars'];
|
|
10
|
+
static flags = {
|
|
11
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
this.requireAuth();
|
|
15
|
+
const { flags } = await this.parse(StoreStars);
|
|
16
|
+
try {
|
|
17
|
+
const result = await data_provider_1.dataService.getMyStarredListings();
|
|
18
|
+
if (flags.json) {
|
|
19
|
+
this.log(JSON.stringify(result, null, 2));
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
for (const item of result.items || []) {
|
|
23
|
+
this.log(`${item.agentId}${item.listingTitle ? ` ${item.listingTitle}` : ''}`);
|
|
24
|
+
}
|
|
25
|
+
if (!result.items?.length)
|
|
26
|
+
this.log('No starred listings.');
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
this.handleApiError(err);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.default = StoreStars;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
export default class StoreTrial extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
agentId: 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 StoreTrial extends base_command_1.BaseCommand {
|
|
7
|
+
static description = 'Start a card-free trial on a store service — subscribe with the returned grantId';
|
|
8
|
+
static args = { agentId: 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(StoreTrial);
|
|
13
|
+
const result = await data_provider_1.dataService.startStoreServiceTrial(args.agentId);
|
|
14
|
+
this.log(JSON.stringify(result, null, 2));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.default = StoreTrial;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StoreUninstallResponse } from '@skrr-ai/data-provider';
|
|
2
|
+
import { BaseCommand } from '../../base-command';
|
|
3
|
+
/** The uninstall line, read from what the server says it uninstalled. */
|
|
4
|
+
export declare function storeUninstallReport(response: StoreUninstallResponse): string;
|
|
5
|
+
/** Everything the command prints for a receipt, in order. */
|
|
6
|
+
export declare function storeUninstallLines(response: StoreUninstallResponse): string[];
|
|
7
|
+
export default class StoreUninstall extends BaseCommand {
|
|
8
|
+
static description: string;
|
|
9
|
+
static examples: string[];
|
|
10
|
+
static args: {
|
|
11
|
+
agentId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
12
|
+
};
|
|
13
|
+
static flags: {
|
|
14
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
erase: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<void>;
|
|
19
|
+
}
|