@andpipes/cli 0.1.2 → 0.1.3
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/README.md +5 -0
- package/dist/bin.cjs +578 -69
- package/dist/bin.js +1 -1
- package/dist/{chunk-ELZTOEAZ.js → chunk-6LTYTSZX.js} +549 -30
- package/dist/index.cjs +578 -69
- package/dist/index.d.cts +43 -2
- package/dist/index.d.ts +43 -2
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SupportedLocale, CliDevWorkflowMessages, CliInitWorkflowMessages, CliPublishWorkflowMessages } from '@andpipes/localization';
|
|
2
2
|
import { Command } from 'commander';
|
|
3
|
-
import { ValidateReport, PublishGateResult, OnboardingTemplateOperation, OnboardingTemplateSafeDiffEntry, ExternalSaasTemplateV1, OnboardingTemplateBindings } from '@andpipes/tool-contract';
|
|
3
|
+
import { ValidateReport, PublishGateResult, OpenApiImportUpstreamAuthMode, OpenApiImportOperationRiskOverride, OnboardingTemplateOperation, OnboardingTemplateSafeDiffEntry, ExternalSaasTemplateV1, OnboardingTemplateBindings } from '@andpipes/tool-contract';
|
|
4
4
|
export { CheckResult, CheckStatus, RISK_LEVELS, RiskLevel, ValidateReport, validateContract } from '@andpipes/tool-contract';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -466,6 +466,10 @@ interface InitCommandOptions {
|
|
|
466
466
|
readonly openapi?: string;
|
|
467
467
|
readonly baseUrl?: string;
|
|
468
468
|
readonly serviceName?: string;
|
|
469
|
+
/** `--openapi`専用。existing_oauth / token_exchange (#724)。省略時はtoken_exchange。 */
|
|
470
|
+
readonly authMode?: string;
|
|
471
|
+
/** `--openapi`専用。`<toolName>=read|draft`で副作用なしPOSTだけを明示分類する (#724)。 */
|
|
472
|
+
readonly sideEffectFree?: readonly string[];
|
|
469
473
|
readonly connector?: string;
|
|
470
474
|
readonly createConnector?: boolean;
|
|
471
475
|
readonly profile?: string;
|
|
@@ -540,11 +544,17 @@ declare const ADMIN_API_MAX_GET_ATTEMPTS = 3;
|
|
|
540
544
|
type JsonObject = Record<string, unknown>;
|
|
541
545
|
type AdminFetch = (input: string | URL, init?: RequestInit) => Promise<Response>;
|
|
542
546
|
type AdminSleep = (milliseconds: number) => Promise<void>;
|
|
547
|
+
/** OpenAPI importのconnector方式不一致 (#724)。固定enumだけを保持し、server messageは転載しない。 */
|
|
548
|
+
interface OpenApiImportAuthModeMismatch {
|
|
549
|
+
readonly connectorAuthMode: "token_exchange" | "service_account" | "existing_oauth" | "signed_request";
|
|
550
|
+
readonly requestedAuthMode: OpenApiImportUpstreamAuthMode;
|
|
551
|
+
}
|
|
543
552
|
declare class AdminApiClientError extends Error {
|
|
544
553
|
readonly code: string;
|
|
545
554
|
readonly status: number | undefined;
|
|
546
555
|
readonly confirmationRequired: PublicationConfirmationRequiredDetails | undefined;
|
|
547
|
-
|
|
556
|
+
readonly openApiAuthModeMismatch: OpenApiImportAuthModeMismatch | undefined;
|
|
557
|
+
constructor(code: string, message: string, status?: number, confirmationRequired?: PublicationConfirmationRequiredDetails, openApiAuthModeMismatch?: OpenApiImportAuthModeMismatch);
|
|
548
558
|
}
|
|
549
559
|
declare function assertProjectId(projectId: string): string;
|
|
550
560
|
declare function assertResourceId(value: string, option: string): string;
|
|
@@ -610,6 +620,8 @@ interface OpenApiImportRequest {
|
|
|
610
620
|
readonly format?: "json" | "yaml";
|
|
611
621
|
readonly baseUrl?: string;
|
|
612
622
|
readonly serviceName?: string;
|
|
623
|
+
readonly upstreamAuthMode?: OpenApiImportUpstreamAuthMode;
|
|
624
|
+
readonly operationRiskOverrides?: readonly OpenApiImportOperationRiskOverride[];
|
|
613
625
|
}
|
|
614
626
|
interface OpenApiImportOperationSummary {
|
|
615
627
|
readonly toolName: string;
|
|
@@ -734,6 +746,30 @@ interface OAuthSetupResult {
|
|
|
734
746
|
readonly issues: readonly OAuthReadinessIssue[];
|
|
735
747
|
};
|
|
736
748
|
}
|
|
749
|
+
interface UpstreamOAuthConnectionStateResult {
|
|
750
|
+
readonly connectorId: string;
|
|
751
|
+
readonly issuer: string | null;
|
|
752
|
+
readonly selectedLinkId: string | null;
|
|
753
|
+
readonly activeLink: boolean;
|
|
754
|
+
readonly mcpResource: string | null;
|
|
755
|
+
readonly smokeTools: ReadonlyArray<{
|
|
756
|
+
readonly id: string;
|
|
757
|
+
readonly versionId: string;
|
|
758
|
+
readonly name: string;
|
|
759
|
+
readonly scopes: readonly string[];
|
|
760
|
+
}>;
|
|
761
|
+
readonly requiredScopes: readonly string[];
|
|
762
|
+
readonly grantedScopes: readonly string[];
|
|
763
|
+
readonly redirectUri: string | null;
|
|
764
|
+
readonly diagnostics: ReadonlyArray<{
|
|
765
|
+
readonly id: string;
|
|
766
|
+
readonly status: "pass" | "pending" | "fail";
|
|
767
|
+
readonly detail: string;
|
|
768
|
+
}>;
|
|
769
|
+
readonly allGreen: boolean;
|
|
770
|
+
readonly currentStep: "metadata" | "test_account" | "diagnostics";
|
|
771
|
+
readonly nextAction: "discover_metadata" | "link_test_account" | "fix_diagnostics" | "configure_custom_domain" | "publish_read_tool" | "run_customer_api_smoke" | "continue_to_chatgpt";
|
|
772
|
+
}
|
|
737
773
|
interface OAuthScopesSyncResult {
|
|
738
774
|
readonly mode: "preview" | "applied";
|
|
739
775
|
readonly added: readonly string[];
|
|
@@ -975,6 +1011,7 @@ declare class AdminApiClient {
|
|
|
975
1011
|
createReviewPackage(input: ReviewPackageCreateRequest): Promise<ReviewPackageCreateResult>;
|
|
976
1012
|
downloadReviewPackage(projectId: string, id: string, format: "json" | "markdown"): Promise<ReviewPackageDownloadResult | string>;
|
|
977
1013
|
getOAuthSetup(projectId: string): Promise<OAuthSetupResult>;
|
|
1014
|
+
getUpstreamOAuthConnectionState(projectId: string, connectorId: string): Promise<UpstreamOAuthConnectionStateResult>;
|
|
978
1015
|
syncOAuthScopes(input: {
|
|
979
1016
|
projectId: string;
|
|
980
1017
|
apply: boolean;
|
|
@@ -1017,6 +1054,10 @@ interface OpenApiImportCommandOptions {
|
|
|
1017
1054
|
readonly yes?: boolean;
|
|
1018
1055
|
readonly idempotencyKey?: string;
|
|
1019
1056
|
readonly planCommitment?: string;
|
|
1057
|
+
/** existing_oauth / token_exchange (#724)。省略時はAdmin API既定のtoken_exchange。 */
|
|
1058
|
+
readonly authMode?: string;
|
|
1059
|
+
/** `<toolName>=read|draft`。副作用なしPOSTだけを明示分類する (#724)。 */
|
|
1060
|
+
readonly sideEffectFree?: readonly string[];
|
|
1020
1061
|
}
|
|
1021
1062
|
interface OpenApiImportApi {
|
|
1022
1063
|
planOpenApiImport(projectId: string, input: OpenApiImportRequest): Promise<OpenApiImportPlanResult>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SupportedLocale, CliDevWorkflowMessages, CliInitWorkflowMessages, CliPublishWorkflowMessages } from '@andpipes/localization';
|
|
2
2
|
import { Command } from 'commander';
|
|
3
|
-
import { ValidateReport, PublishGateResult, OnboardingTemplateOperation, OnboardingTemplateSafeDiffEntry, ExternalSaasTemplateV1, OnboardingTemplateBindings } from '@andpipes/tool-contract';
|
|
3
|
+
import { ValidateReport, PublishGateResult, OpenApiImportUpstreamAuthMode, OpenApiImportOperationRiskOverride, OnboardingTemplateOperation, OnboardingTemplateSafeDiffEntry, ExternalSaasTemplateV1, OnboardingTemplateBindings } from '@andpipes/tool-contract';
|
|
4
4
|
export { CheckResult, CheckStatus, RISK_LEVELS, RiskLevel, ValidateReport, validateContract } from '@andpipes/tool-contract';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -466,6 +466,10 @@ interface InitCommandOptions {
|
|
|
466
466
|
readonly openapi?: string;
|
|
467
467
|
readonly baseUrl?: string;
|
|
468
468
|
readonly serviceName?: string;
|
|
469
|
+
/** `--openapi`専用。existing_oauth / token_exchange (#724)。省略時はtoken_exchange。 */
|
|
470
|
+
readonly authMode?: string;
|
|
471
|
+
/** `--openapi`専用。`<toolName>=read|draft`で副作用なしPOSTだけを明示分類する (#724)。 */
|
|
472
|
+
readonly sideEffectFree?: readonly string[];
|
|
469
473
|
readonly connector?: string;
|
|
470
474
|
readonly createConnector?: boolean;
|
|
471
475
|
readonly profile?: string;
|
|
@@ -540,11 +544,17 @@ declare const ADMIN_API_MAX_GET_ATTEMPTS = 3;
|
|
|
540
544
|
type JsonObject = Record<string, unknown>;
|
|
541
545
|
type AdminFetch = (input: string | URL, init?: RequestInit) => Promise<Response>;
|
|
542
546
|
type AdminSleep = (milliseconds: number) => Promise<void>;
|
|
547
|
+
/** OpenAPI importのconnector方式不一致 (#724)。固定enumだけを保持し、server messageは転載しない。 */
|
|
548
|
+
interface OpenApiImportAuthModeMismatch {
|
|
549
|
+
readonly connectorAuthMode: "token_exchange" | "service_account" | "existing_oauth" | "signed_request";
|
|
550
|
+
readonly requestedAuthMode: OpenApiImportUpstreamAuthMode;
|
|
551
|
+
}
|
|
543
552
|
declare class AdminApiClientError extends Error {
|
|
544
553
|
readonly code: string;
|
|
545
554
|
readonly status: number | undefined;
|
|
546
555
|
readonly confirmationRequired: PublicationConfirmationRequiredDetails | undefined;
|
|
547
|
-
|
|
556
|
+
readonly openApiAuthModeMismatch: OpenApiImportAuthModeMismatch | undefined;
|
|
557
|
+
constructor(code: string, message: string, status?: number, confirmationRequired?: PublicationConfirmationRequiredDetails, openApiAuthModeMismatch?: OpenApiImportAuthModeMismatch);
|
|
548
558
|
}
|
|
549
559
|
declare function assertProjectId(projectId: string): string;
|
|
550
560
|
declare function assertResourceId(value: string, option: string): string;
|
|
@@ -610,6 +620,8 @@ interface OpenApiImportRequest {
|
|
|
610
620
|
readonly format?: "json" | "yaml";
|
|
611
621
|
readonly baseUrl?: string;
|
|
612
622
|
readonly serviceName?: string;
|
|
623
|
+
readonly upstreamAuthMode?: OpenApiImportUpstreamAuthMode;
|
|
624
|
+
readonly operationRiskOverrides?: readonly OpenApiImportOperationRiskOverride[];
|
|
613
625
|
}
|
|
614
626
|
interface OpenApiImportOperationSummary {
|
|
615
627
|
readonly toolName: string;
|
|
@@ -734,6 +746,30 @@ interface OAuthSetupResult {
|
|
|
734
746
|
readonly issues: readonly OAuthReadinessIssue[];
|
|
735
747
|
};
|
|
736
748
|
}
|
|
749
|
+
interface UpstreamOAuthConnectionStateResult {
|
|
750
|
+
readonly connectorId: string;
|
|
751
|
+
readonly issuer: string | null;
|
|
752
|
+
readonly selectedLinkId: string | null;
|
|
753
|
+
readonly activeLink: boolean;
|
|
754
|
+
readonly mcpResource: string | null;
|
|
755
|
+
readonly smokeTools: ReadonlyArray<{
|
|
756
|
+
readonly id: string;
|
|
757
|
+
readonly versionId: string;
|
|
758
|
+
readonly name: string;
|
|
759
|
+
readonly scopes: readonly string[];
|
|
760
|
+
}>;
|
|
761
|
+
readonly requiredScopes: readonly string[];
|
|
762
|
+
readonly grantedScopes: readonly string[];
|
|
763
|
+
readonly redirectUri: string | null;
|
|
764
|
+
readonly diagnostics: ReadonlyArray<{
|
|
765
|
+
readonly id: string;
|
|
766
|
+
readonly status: "pass" | "pending" | "fail";
|
|
767
|
+
readonly detail: string;
|
|
768
|
+
}>;
|
|
769
|
+
readonly allGreen: boolean;
|
|
770
|
+
readonly currentStep: "metadata" | "test_account" | "diagnostics";
|
|
771
|
+
readonly nextAction: "discover_metadata" | "link_test_account" | "fix_diagnostics" | "configure_custom_domain" | "publish_read_tool" | "run_customer_api_smoke" | "continue_to_chatgpt";
|
|
772
|
+
}
|
|
737
773
|
interface OAuthScopesSyncResult {
|
|
738
774
|
readonly mode: "preview" | "applied";
|
|
739
775
|
readonly added: readonly string[];
|
|
@@ -975,6 +1011,7 @@ declare class AdminApiClient {
|
|
|
975
1011
|
createReviewPackage(input: ReviewPackageCreateRequest): Promise<ReviewPackageCreateResult>;
|
|
976
1012
|
downloadReviewPackage(projectId: string, id: string, format: "json" | "markdown"): Promise<ReviewPackageDownloadResult | string>;
|
|
977
1013
|
getOAuthSetup(projectId: string): Promise<OAuthSetupResult>;
|
|
1014
|
+
getUpstreamOAuthConnectionState(projectId: string, connectorId: string): Promise<UpstreamOAuthConnectionStateResult>;
|
|
978
1015
|
syncOAuthScopes(input: {
|
|
979
1016
|
projectId: string;
|
|
980
1017
|
apply: boolean;
|
|
@@ -1017,6 +1054,10 @@ interface OpenApiImportCommandOptions {
|
|
|
1017
1054
|
readonly yes?: boolean;
|
|
1018
1055
|
readonly idempotencyKey?: string;
|
|
1019
1056
|
readonly planCommitment?: string;
|
|
1057
|
+
/** existing_oauth / token_exchange (#724)。省略時はAdmin API既定のtoken_exchange。 */
|
|
1058
|
+
readonly authMode?: string;
|
|
1059
|
+
/** `<toolName>=read|draft`。副作用なしPOSTだけを明示分類する (#724)。 */
|
|
1060
|
+
readonly sideEffectFree?: readonly string[];
|
|
1020
1061
|
}
|
|
1021
1062
|
interface OpenApiImportApi {
|
|
1022
1063
|
planOpenApiImport(projectId: string, input: OpenApiImportRequest): Promise<OpenApiImportPlanResult>;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andpipes/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "andpipe CLI — Brand MCP Gateway / OAuth Broker / Tool Contract Platform の init / dev / validate / publish を提供する公式 CLI",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"commander": "^14.0.0",
|
|
43
|
-
"@andpipes/localization": "0.1.
|
|
44
|
-
"@andpipes/tool-contract": "0.1.
|
|
43
|
+
"@andpipes/localization": "0.1.2",
|
|
44
|
+
"@andpipes/tool-contract": "0.1.2",
|
|
45
45
|
"@andpipes/mcp-adapter": "0.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|