@kanonak-protocol/cli 4.19.0 → 5.0.0

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.
@@ -6,8 +6,8 @@ export { LocalFirstRepository };
6
6
  * Walks up through publisher domain directories (names containing a dot)
7
7
  * and their subdirectories, so sibling publisher directories are included.
8
8
  *
9
- * Example: given kanonak/kanonak.com/platform-connections/,
10
- * walks up through kanonak.com (publisher domain) to kanonak/.
9
+ * Example: given kanonak/example.com/platform-connections/,
10
+ * walks up through example.com (publisher domain) to kanonak/.
11
11
  */
12
12
  export declare function findWorkspaceRoot(dir: string): string;
13
13
  export declare function collectKanonakFiles(dir: string, files: string[]): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanonak-protocol/cli",
3
- "version": "4.19.0",
3
+ "version": "5.0.0",
4
4
  "description": "Command-line tool for the Kanonak Protocol — validate, resolve, preview, and publish semantic ontology packages.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -35,8 +35,8 @@
35
35
  "semantic-web"
36
36
  ],
37
37
  "dependencies": {
38
- "@kanonak-protocol/sdk": "^4.19.0",
39
- "@kanonak-protocol/types": "^4.19.0",
38
+ "@kanonak-protocol/sdk": "^5.0.0",
39
+ "@kanonak-protocol/types": "^5.0.0",
40
40
  "@peculiar/x509": "^2.0.0",
41
41
  "commander": "^13.0.0",
42
42
  "js-yaml": "^4.1.1",
@@ -1,47 +0,0 @@
1
- /**
2
- * OAuth 2.0 Authorization Server Metadata (RFC 8414).
3
- */
4
- export interface OAuthServerMetadata {
5
- issuer?: string | null;
6
- authorizationEndpoint?: string | null;
7
- tokenEndpoint?: string | null;
8
- registrationEndpoint?: string | null;
9
- revocationEndpoint?: string | null;
10
- scopesSupported?: string[] | null;
11
- responseTypesSupported?: string[] | null;
12
- grantTypesSupported?: string[] | null;
13
- codeChallengeMethodsSupported?: string[] | null;
14
- tokenEndpointAuthMethodsSupported?: string[] | null;
15
- dpopSigningAlgValuesSupported?: string[] | null;
16
- /** Endpoint that signs a submitted CSR after consent. */
17
- enrollmentEndpoint?: string | null;
18
- /** Issuance protocols the endpoint speaks, e.g. `["native"]`, `["est"]`, `["acme"]`. */
19
- enrollmentIssuanceProtocols?: string[] | null;
20
- /** Device key types accepted, e.g. `["ec-p256"]`. */
21
- enrollmentKeyTypes?: string[] | null;
22
- /** Scopes grantable to a device certificate. */
23
- enrollmentScopesSupported?: string[] | null;
24
- /**
25
- * Authorization-request parameter that carries the CSR key's RFC 7638
26
- * thumbprint to bind consent to that key (anti-substitution). Defaults to
27
- * `key_thumbprint` when the server advertises enrollment without naming it.
28
- */
29
- enrollmentConsentBindingParam?: string | null;
30
- }
31
- /** Default authorization-request parameter for the consent↔key binding. */
32
- export declare const DEFAULT_CONSENT_BINDING_PARAM = "key_thumbprint";
33
- /**
34
- * Discovers OAuth server metadata using RFC 8414.
35
- * Falls back to OpenID Connect discovery.
36
- * Port of C# OAuthDiscoveryService.
37
- */
38
- export declare class OAuthDiscovery {
39
- private readonly cache;
40
- discover(host: string): Promise<OAuthServerMetadata | null>;
41
- supportsOAuth(host: string): Promise<boolean>;
42
- static supportsPkceS256(m: OAuthServerMetadata): boolean;
43
- static supportsDynamicRegistration(m: OAuthServerMetadata): boolean;
44
- static supportsAuthorizationCode(m: OAuthServerMetadata): boolean;
45
- static supportsEnrollment(m: OAuthServerMetadata): boolean;
46
- private tryEndpoint;
47
- }
@@ -1,33 +0,0 @@
1
- import { CredentialStore } from '@kanonak-protocol/sdk';
2
- import { OAuthDiscovery } from './OAuthDiscovery.js';
3
- /**
4
- * OAuth 2.0 Authorization Code Flow with PKCE and DPoP.
5
- * Supports Dynamic Client Registration (RFC 7591).
6
- * Port of C# OAuthFlowService.
7
- */
8
- export declare class OAuthFlow {
9
- private readonly discovery;
10
- private readonly credentialStore;
11
- constructor(discovery?: OAuthDiscovery, credentialStore?: CredentialStore);
12
- /**
13
- * Full OAuth authorization flow.
14
- */
15
- authorize(host: string, scopes?: string[]): Promise<OAuthResult>;
16
- /**
17
- * Refresh an expired access token.
18
- */
19
- refresh(host: string): Promise<OAuthResult>;
20
- /**
21
- * Revoke tokens and remove credentials.
22
- */
23
- logout(host: string): Promise<OAuthResult>;
24
- private registerClient;
25
- private exchangeCode;
26
- private refreshTokenRequest;
27
- private revokeToken;
28
- }
29
- export interface OAuthResult {
30
- success: boolean;
31
- host?: string;
32
- error?: string;
33
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * kanonak login <publisher>
3
- *
4
- * Authenticate with a package publisher using OAuth 2.0.
5
- * Supports Dynamic Client Registration (RFC 7591), PKCE (RFC 7636),
6
- * and DPoP proof-of-possession tokens (RFC 9449).
7
- *
8
- * Credentials are stored in the OS credential store (macOS Keychain,
9
- * Windows Credential Manager, or Linux Secret Service).
10
- */
11
- export declare function loginCommand(publisher: string): Promise<void>;
@@ -1,6 +0,0 @@
1
- /**
2
- * kanonak logout <publisher>
3
- *
4
- * Revoke tokens and remove stored credentials for a publisher.
5
- */
6
- export declare function logoutCommand(publisher: string): Promise<void>;