@kanonak-protocol/cli 1.5.0 → 1.6.1

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.
@@ -0,0 +1,19 @@
1
+ import type { DeploymentContext, DeploymentHandler, DeployedInstance, OperationContext } from '../capabilities/DeploymentHandlerRegistry.js';
2
+ /**
3
+ * Deployment handler for the `AgentInstanceDeployment` DeploymentTarget.
4
+ *
5
+ * Transforms `kanonak.org/agents/Agent` instances into the target
6
+ * client's on-disk file format (markdown-with-frontmatter for
7
+ * Claude Code and Gemini CLI, TOML for Codex) and writes each one
8
+ * into the directory declared by the named Client instance selected
9
+ * via the `--client` option (defaulting to the "agents"
10
+ * cross-client layout).
11
+ */
12
+ export declare class AgentDeploymentHandler implements DeploymentHandler {
13
+ private readonly parser;
14
+ private readonly objectParser;
15
+ private readonly runner;
16
+ deploy(context: DeploymentContext): Promise<void>;
17
+ undeploy(name: string, context: OperationContext): Promise<void>;
18
+ list(context: OperationContext): Promise<DeployedInstance[]>;
19
+ }
@@ -0,0 +1,15 @@
1
+ export interface AgentLockEntry {
2
+ publisher: string;
3
+ package_: string;
4
+ version: string;
5
+ resolved: string;
6
+ integrity: string;
7
+ fileName: string;
8
+ }
9
+ export interface AgentLockFile {
10
+ version: string;
11
+ lastUpdated: string;
12
+ agents: Record<string, AgentLockEntry>;
13
+ }
14
+ export declare function loadAgentLock(agentsDir: string): AgentLockFile;
15
+ export declare function saveAgentLock(agentsDir: string, lock: AgentLockFile): void;
@@ -0,0 +1,23 @@
1
+ import type { IKanonakDocumentRepository } from '@kanonak-protocol/sdk';
2
+ export type AgentFileFormat = 'markdown-frontmatter' | 'toml';
3
+ export interface AgentPathOptions {
4
+ client?: string;
5
+ scope?: string;
6
+ }
7
+ export interface ResolvedAgentDeployment {
8
+ agentsDir: string;
9
+ format: AgentFileFormat;
10
+ fileExtension: string;
11
+ }
12
+ export declare function detectClient(): string | undefined;
13
+ /**
14
+ * Resolve the agent deployment settings for the requested client
15
+ * and scope: the target directory plus the on-disk format to write.
16
+ *
17
+ * Goes through the SDK object model: agent-skills is parsed, Client
18
+ * instances are looked up by clientId, the selected Client's
19
+ * projectAgentDir / userAgentDir and agentFileFormat are read, and
20
+ * the AgentFileFormat reference is followed to extract the local
21
+ * name (markdown-frontmatter / toml).
22
+ */
23
+ export declare function resolveAgentDeployment(options: AgentPathOptions, repository: IKanonakDocumentRepository): Promise<ResolvedAgentDeployment>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * `kanonak transform` command group.
3
+ *
4
+ * User-facing entry point to the declarative transformation runner
5
+ * — run, list, show, and formats subcommands. Everything here is a
6
+ * thin wrapper around TransformationRunner; no runtime logic lives
7
+ * in the CLI layer.
8
+ */
9
+ import { Command } from 'commander';
10
+ export declare function transformCommand(): Command;