@kisev/skills-opencode 2.4.1 → 3.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.
@@ -1,5 +1,6 @@
1
1
  import { LifecycleError, type SupersededPlan, type Scope, type TransactionOptions } from "./lifecycle.js";
2
- export type ReconcileStatus = "current" | "retired" | "archive-pending" | "renamed" | "modified-managed" | "user-owned" | "unknown" | "conflict" | "diagnostic-state-only";
2
+ declare const PORTABLE_SOURCE: "https://kisev.github.io/skills";
3
+ export type ReconcileStatus = "current" | "retired" | "renamed" | "modified-managed" | "user-owned" | "unknown" | "conflict" | "diagnostic-state-only";
3
4
  export type ReconcileItem = {
4
5
  path: string;
5
6
  status: ReconcileStatus;
@@ -8,14 +9,13 @@ export type ReconcileItem = {
8
9
  replacement?: string | null;
9
10
  };
10
11
  export type ReconcilePlan = {
11
- schema_version: 1;
12
+ schema_version: 2;
12
13
  domain: "reconcile";
13
14
  scope: Scope;
14
15
  root: string;
15
16
  inventory_version: string;
16
17
  current: ReconcileItem[];
17
18
  retired: ReconcileItem[];
18
- "archive-pending": ReconcileItem[];
19
19
  renamed: ReconcileItem[];
20
20
  modified_managed: ReconcileItem[];
21
21
  user_owned: ReconcileItem[];
@@ -24,9 +24,33 @@ export type ReconcilePlan = {
24
24
  diagnostic_state_only: ReconcileItem[];
25
25
  operations: Array<{
26
26
  path: string;
27
- operation: "remove" | "write";
27
+ operation: "archive" | "execute" | "remove" | "write";
28
28
  sha256?: string;
29
+ via?: "skills-cli" | "transaction";
29
30
  }>;
31
+ portable_cleanup?: {
32
+ source: typeof PORTABLE_SOURCE;
33
+ names: string[];
34
+ command: string[];
35
+ cwd: string;
36
+ environment: {
37
+ HOME: string;
38
+ XDG_CONFIG_HOME: string;
39
+ XDG_STATE_HOME?: string;
40
+ CODEX_HOME: string;
41
+ };
42
+ locks: Array<{
43
+ path: string;
44
+ before_sha256: string;
45
+ after_sha256: string;
46
+ }>;
47
+ trees: Array<{
48
+ name: string;
49
+ path: string;
50
+ tree_sha256: string;
51
+ files: number;
52
+ }>;
53
+ };
30
54
  plan_digest: string;
31
55
  confirmation_digest?: string;
32
56
  superseded_plan?: SupersededPlan;
@@ -38,10 +62,24 @@ export type ReconcileResult = {
38
62
  status: "ok";
39
63
  applied: true;
40
64
  plan: ReconcilePlan;
65
+ portable_remove?: PortableRemoveResult;
66
+ };
67
+ export type PortableRemoveResult = {
68
+ code: number | null;
69
+ signal: NodeJS.Signals | null;
70
+ stdout: string;
71
+ stderr: string;
72
+ stdout_truncated: boolean;
73
+ stderr_truncated: boolean;
74
+ timed_out?: boolean;
75
+ };
76
+ export type ReconcileOptions = TransactionOptions & {
77
+ runPortableRemove?: (command: readonly string[], cwd: string, environment: NodeJS.ProcessEnv) => Promise<PortableRemoveResult>;
41
78
  };
42
79
  export declare class ReconcileError extends LifecycleError {
43
80
  }
44
81
  export declare function previewReconcile(scope: Scope, cwd?: string, home?: string): Promise<ReconcilePlan>;
45
82
  /** Build the ownership classification without receipts, locks, or recovery. */
46
83
  export declare function inspectReconcile(scope: Scope, cwd?: string, home?: string): Promise<ReconcilePlan>;
47
- export declare function applyReconcile(scope: Scope, confirmationDigest: string, cwd?: string, home?: string, options?: TransactionOptions): Promise<ReconcileResult>;
84
+ export declare function applyReconcile(scope: Scope, confirmationDigest: string, cwd?: string, home?: string, options?: ReconcileOptions): Promise<ReconcileResult>;
85
+ export {};