@hasna/instructions 0.4.29 → 0.4.31

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.
Files changed (53) hide show
  1. package/dist/cli/index.js +3854 -2069
  2. package/dist/cli/profile-binding.test.d.ts +2 -0
  3. package/dist/cli/profile-binding.test.d.ts.map +1 -0
  4. package/dist/data/config-store.d.ts +19 -1
  5. package/dist/data/config-store.d.ts.map +1 -1
  6. package/dist/db/database.d.ts.map +1 -1
  7. package/dist/db/pg-migrations.d.ts.map +1 -1
  8. package/dist/db/profile-assets.test.d.ts +2 -0
  9. package/dist/db/profile-assets.test.d.ts.map +1 -0
  10. package/dist/db/profile-config-bindings.test.d.ts +2 -0
  11. package/dist/db/profile-config-bindings.test.d.ts.map +1 -0
  12. package/dist/db/profiles.d.ts +8 -2
  13. package/dist/db/profiles.d.ts.map +1 -1
  14. package/dist/index.d.ts +6 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +6034 -4354
  17. package/dist/lib/asset-plan.d.ts +117 -0
  18. package/dist/lib/asset-plan.d.ts.map +1 -0
  19. package/dist/lib/asset-plan.test.d.ts +2 -0
  20. package/dist/lib/asset-plan.test.d.ts.map +1 -0
  21. package/dist/lib/cursor-authority.d.ts +54 -0
  22. package/dist/lib/cursor-authority.d.ts.map +1 -0
  23. package/dist/lib/cursor-authority.test.d.ts +2 -0
  24. package/dist/lib/cursor-authority.test.d.ts.map +1 -0
  25. package/dist/lib/instruction-graph-apply.test.d.ts +2 -0
  26. package/dist/lib/instruction-graph-apply.test.d.ts.map +1 -0
  27. package/dist/lib/instruction-graph.d.ts +116 -0
  28. package/dist/lib/instruction-graph.d.ts.map +1 -0
  29. package/dist/lib/instruction-graph.test.d.ts +2 -0
  30. package/dist/lib/instruction-graph.test.d.ts.map +1 -0
  31. package/dist/lib/project-context.d.ts +18 -18
  32. package/dist/lib/provider-assets-adapters.test.d.ts +2 -0
  33. package/dist/lib/provider-assets-adapters.test.d.ts.map +1 -0
  34. package/dist/lib/provider-version-adapters.test.d.ts +2 -0
  35. package/dist/lib/provider-version-adapters.test.d.ts.map +1 -0
  36. package/dist/lib/provider-version.d.ts +2 -0
  37. package/dist/lib/provider-version.d.ts.map +1 -0
  38. package/dist/lib/session-apply.d.ts +7 -0
  39. package/dist/lib/session-apply.d.ts.map +1 -1
  40. package/dist/lib/session-render.d.ts +64 -3
  41. package/dist/lib/session-render.d.ts.map +1 -1
  42. package/dist/lib/sync.d.ts.map +1 -1
  43. package/dist/mcp/index.js +5467 -4853
  44. package/dist/server/index.js +5418 -245
  45. package/dist/server/openapi.d.ts +419 -0
  46. package/dist/server/openapi.d.ts.map +1 -1
  47. package/dist/server/v1.d.ts.map +1 -1
  48. package/dist/storage/cloud-store.d.ts +7 -1
  49. package/dist/storage/cloud-store.d.ts.map +1 -1
  50. package/dist/storage/schema.d.ts.map +1 -1
  51. package/dist/types/index.d.ts +81 -1
  52. package/dist/types/index.d.ts.map +1 -1
  53. package/package.json +1 -1
@@ -0,0 +1,117 @@
1
+ import type { AssetDestinationStrategy, AssetKind, AssetScope, Config, ConfigAgent, ProfileAssetBinding, ProfileAssetBindingSpec } from "../types/index.js";
2
+ export declare const ASSET_PLAN_SCHEMA: "hasna.instructions.asset-plan/v1";
3
+ export declare const ASSET_CAPABILITY_SCHEMA: "hasna.instructions.asset-capability/v1";
4
+ export declare const ASSET_BUNDLE_SCHEMA: "hasna.instructions.asset-bundle/v1";
5
+ export type AssetPlanMode = "explain" | "dry-run" | "apply";
6
+ export type AssetSupport = "supported" | "conditional" | "unsupported";
7
+ export type AssetAction = "explain" | "write" | "install" | "skip";
8
+ /** Immutable, content-addressed bytes consumed by an AssetBinding. */
9
+ export interface AssetBundle {
10
+ schema: typeof ASSET_BUNDLE_SCHEMA;
11
+ bundleId: string;
12
+ sourceConfigId: string;
13
+ sourceConfigVersion: number;
14
+ kind: AssetKind;
15
+ locator: string;
16
+ digest: string;
17
+ content: string;
18
+ }
19
+ export interface AssetCapability {
20
+ schema: typeof ASSET_CAPABILITY_SCHEMA;
21
+ descriptorVersion: number;
22
+ provider: ConfigAgent;
23
+ providerVersionRange: string;
24
+ surface: string;
25
+ kind: AssetKind;
26
+ support: AssetSupport;
27
+ strategies: readonly AssetDestinationStrategy[];
28
+ note: string;
29
+ }
30
+ export interface AssetPlanDiagnostic {
31
+ severity: "info" | "warning" | "error";
32
+ code: string;
33
+ assetKey: string | null;
34
+ message: string;
35
+ }
36
+ export interface AssetPlanItem {
37
+ assetId: string;
38
+ sourceConfigId: string;
39
+ sourceConfigVersion: number;
40
+ assetKey: string;
41
+ kind: AssetKind;
42
+ selector: {
43
+ provider: ConfigAgent;
44
+ versionRange: string;
45
+ surface: string;
46
+ scope: AssetScope;
47
+ };
48
+ source: {
49
+ locator: string;
50
+ digest: string;
51
+ immutable: boolean;
52
+ allowed: boolean;
53
+ };
54
+ destination: {
55
+ strategy: AssetDestinationStrategy;
56
+ root: "target-home" | "project-root";
57
+ relativePath: string;
58
+ };
59
+ support: AssetSupport;
60
+ action: AssetAction;
61
+ mutationMode: AssetPlanMode;
62
+ enabled: boolean;
63
+ required: boolean;
64
+ uninstall: ProfileAssetBindingSpec["uninstall"];
65
+ rollback: ProfileAssetBindingSpec["rollback"];
66
+ validation: {
67
+ pathSafe: boolean;
68
+ digestVerified: boolean;
69
+ collisionFree: boolean;
70
+ sourceAllowed: boolean;
71
+ };
72
+ exactOnceKey: string;
73
+ }
74
+ export interface AssetPlan {
75
+ schema: typeof ASSET_PLAN_SCHEMA;
76
+ planDigest: string;
77
+ profileId: string;
78
+ provider: ConfigAgent;
79
+ providerVersion: string;
80
+ surface: string;
81
+ scope: AssetScope;
82
+ mode: AssetPlanMode;
83
+ assets: AssetPlanItem[];
84
+ diagnostics: AssetPlanDiagnostic[];
85
+ }
86
+ export interface CompileAssetPlanInput {
87
+ profileId: string;
88
+ provider: ConfigAgent;
89
+ providerVersion: string;
90
+ surface: string;
91
+ scope?: AssetScope;
92
+ mode: AssetPlanMode;
93
+ configs: Config[];
94
+ bindings: ProfileAssetBinding[];
95
+ allowInstallers?: boolean;
96
+ }
97
+ /**
98
+ * Code-owned provider support. Unknown combinations remain unsupported rather
99
+ * than being guessed from a similarly named provider or surface.
100
+ */
101
+ export declare const ASSET_CAPABILITY_DESCRIPTORS: readonly AssetCapability[];
102
+ export declare const DEFAULT_ASSET_SURFACES: Readonly<Partial<Record<ConfigAgent, string>>>;
103
+ export declare function configAssetLocator(configId: string, version: number): string;
104
+ export declare function configAssetDigest(content: string): string;
105
+ export declare function assetBundleFromConfig(config: Config, kind: AssetKind): AssetBundle;
106
+ export declare function normalizeProfileAssetBinding(value: unknown): ProfileAssetBindingSpec;
107
+ export declare function compileAssetPlan(input: CompileAssetPlanInput): AssetPlan;
108
+ export declare function selectAssetCapability(provider: ConfigAgent, version: string, surface: string, kind: AssetKind): AssetCapability;
109
+ export declare function resolveAssetDestination(item: Pick<AssetPlanItem, "destination" | "assetKey">, roots: {
110
+ targetHome: string;
111
+ projectRoot?: string;
112
+ }): string;
113
+ export declare class AssetPlanValidationError extends Error {
114
+ readonly diagnostics: AssetPlanDiagnostic[];
115
+ constructor(diagnostics: AssetPlanDiagnostic[]);
116
+ }
117
+ //# sourceMappingURL=asset-plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset-plan.d.ts","sourceRoot":"","sources":["../../src/lib/asset-plan.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,wBAAwB,EACxB,SAAS,EACT,UAAU,EACV,MAAM,EACN,WAAW,EACX,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAY3B,eAAO,MAAM,iBAAiB,EAAG,kCAA2C,CAAC;AAC7E,eAAO,MAAM,uBAAuB,EAAG,wCAAiD,CAAC;AACzF,eAAO,MAAM,mBAAmB,EAAG,oCAA6C,CAAC;AAEjF,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;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,EAAE,mBAAmB,EAAE;CAIxD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=asset-plan.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset-plan.test.d.ts","sourceRoot":"","sources":["../../src/lib/asset-plan.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,54 @@
1
+ export declare const CURSOR_GLOBAL_AUTHORITY_RELATIVE_PATH = ".cursor/rules/hasna-global.mdc";
2
+ export declare const CURSOR_GLOBAL_AUTHORITY_MAX_BYTES: number;
3
+ export declare const CURSOR_GLOBAL_AUTHORITY_MANAGED_MARKER = "Managed by @hasna/configs cursor global authority";
4
+ export type CursorAuthorityFileType = "missing" | "regular" | "symlink" | "directory" | "other";
5
+ export type CursorAuthorityObservationStatus = "absent" | "managed" | "unmanaged" | "invalid";
6
+ export type CursorAuthorityDetection = "missing" | "managed-marker" | "unknown-content" | "marker-integrity-mismatch" | "non-regular-file" | "oversized-file" | "unreadable-file";
7
+ export interface CursorAuthorityObservation {
8
+ tool: "cursor";
9
+ relativePath: typeof CURSOR_GLOBAL_AUTHORITY_RELATIVE_PATH;
10
+ path: string;
11
+ fileType: CursorAuthorityFileType;
12
+ status: CursorAuthorityObservationStatus;
13
+ sha256: string | null;
14
+ markers: string[];
15
+ markerSha256: string | null;
16
+ provenance: {
17
+ source: "filesystem";
18
+ authority: "absent" | "managed" | "unmanaged";
19
+ observedPath: string;
20
+ detection: CursorAuthorityDetection;
21
+ };
22
+ }
23
+ export type CursorAuthorityConflictKind = "unknown-unmanaged-authority" | "invalid-unmanaged-authority";
24
+ export interface CursorAuthorityConflict {
25
+ tool: "cursor";
26
+ relativePath: typeof CURSOR_GLOBAL_AUTHORITY_RELATIVE_PATH;
27
+ path: string;
28
+ kind: CursorAuthorityConflictKind;
29
+ sha256: string | null;
30
+ markers: string[];
31
+ provenance: {
32
+ source: "filesystem";
33
+ authority: "unmanaged";
34
+ observedPath: string;
35
+ detection: Exclude<CursorAuthorityDetection, "missing" | "managed-marker">;
36
+ };
37
+ reason: string;
38
+ }
39
+ export interface CursorAuthorityObservationOptions {
40
+ home?: string;
41
+ readFile?: (path: string) => string;
42
+ }
43
+ /**
44
+ * Cursor reads this fixed global rule before project-scoped `.cursor/rules`
45
+ * files. The session renderer owns only the project-scoped files, so an
46
+ * unmanaged global rule is a second authority. A missing file is the clean
47
+ * case. Existing content remains blocked unless a future registry-backed
48
+ * migration contract proves package ownership; a self-declared marker is
49
+ * intentionally insufficient.
50
+ */
51
+ export declare function observeCursorGlobalAuthority(options?: CursorAuthorityObservationOptions): CursorAuthorityObservation;
52
+ export declare function observeCursorGlobalAuthorityAtPath(authorityPath: string): CursorAuthorityObservation;
53
+ export declare function detectCursorAuthorityConflicts(observation?: CursorAuthorityObservation): CursorAuthorityConflict[];
54
+ //# sourceMappingURL=cursor-authority.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor-authority.d.ts","sourceRoot":"","sources":["../../src/lib/cursor-authority.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qCAAqC,mCAAmC,CAAC;AACtF,eAAO,MAAM,iCAAiC,QAAa,CAAC;AAC5D,eAAO,MAAM,sCAAsC,sDAAsD,CAAC;AAK1G,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;AAChG,MAAM,MAAM,gCAAgC,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;AAC9F,MAAM,MAAM,wBAAwB,GAChC,SAAS,GACT,gBAAgB,GAChB,iBAAiB,GACjB,2BAA2B,GAC3B,kBAAkB,GAClB,gBAAgB,GAChB,iBAAiB,CAAC;AAEtB,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,EAAE,OAAO,qCAAqC,CAAC;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,uBAAuB,CAAC;IAClC,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@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cursor-authority.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor-authority.test.d.ts","sourceRoot":"","sources":["../../src/lib/cursor-authority.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=instruction-graph-apply.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instruction-graph-apply.test.d.ts","sourceRoot":"","sources":["../../src/lib/instruction-graph-apply.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,116 @@
1
+ import type { Config, InstructionActivation, InstructionActivationMode, InstructionFallback, ProfileConfigBinding, ProfileConfigBindingSpec, ProfileAssetBinding } from "../types/index.js";
2
+ import type { SessionInstructionSource, SessionRenderInput, SessionRenderPlan, SessionProviderSurface, SessionRenderTool } from "./session-render.js";
3
+ import { type AssetPlanMode } from "./asset-plan.js";
4
+ export { providerVersionSatisfies } from "./provider-version.js";
5
+ export declare const INSTRUCTION_GRAPH_PLAN_SCHEMA: "hasna.instructions.render-plan/v1";
6
+ export declare const PROVIDER_CAPABILITY_SCHEMA: "hasna.instructions.provider-capability/v1";
7
+ export interface ProviderCapability {
8
+ schema: typeof PROVIDER_CAPABILITY_SCHEMA;
9
+ provider: SessionRenderTool;
10
+ descriptor_version: number;
11
+ provider_version_range: string;
12
+ provider_variant: string;
13
+ default_variant: boolean;
14
+ selected_representation: string;
15
+ loading_path: string;
16
+ session_surface?: SessionProviderSurface;
17
+ asset_surface: string;
18
+ activation_modes: readonly InstructionActivationMode[];
19
+ native_imports: boolean;
20
+ conditional_artifacts: boolean;
21
+ supported_fallbacks: readonly InstructionFallback[];
22
+ }
23
+ export declare const PROVIDER_CAPABILITY_DESCRIPTORS: readonly ProviderCapability[];
24
+ /** Backward-compatible default descriptor lookup for callers without variants. */
25
+ export declare const PROVIDER_CAPABILITIES: Readonly<Record<"claude" | "codex" | "opencode" | "cursor" | "codewith" | "aicopilot" | "antigravity" | "qwen" | "grok" | "copilot" | "devin" | "windsurf-legacy" | "cline", ProviderCapability>>;
26
+ export interface InstructionGraphContext {
27
+ provider: SessionRenderTool;
28
+ provider_version: string;
29
+ provider_variant?: string;
30
+ model?: string;
31
+ path?: string;
32
+ manual?: string[];
33
+ }
34
+ export interface InstructionGraphDiagnostic {
35
+ severity: "info" | "warning" | "error";
36
+ code: string;
37
+ config_id: string | null;
38
+ message: string;
39
+ }
40
+ export interface InstructionGraphUnit {
41
+ unit_id: string;
42
+ config_id: string;
43
+ config_slug: string;
44
+ config_version: number;
45
+ sort_order: number;
46
+ activation: InstructionActivation;
47
+ effective_activation: InstructionActivation;
48
+ fallback: InstructionFallback;
49
+ required: boolean;
50
+ content_sha256: string;
51
+ dependencies: string[];
52
+ }
53
+ export interface InstructionGraphArtifact {
54
+ artifact_id: string;
55
+ unit_id: string;
56
+ provider: SessionRenderTool;
57
+ representation: string;
58
+ loading_path: string;
59
+ }
60
+ export interface InstructionGraphRenderPlan {
61
+ schema: typeof INSTRUCTION_GRAPH_PLAN_SCHEMA;
62
+ profile_id: string;
63
+ provider: SessionRenderTool;
64
+ provider_version: string;
65
+ capability_descriptor_version: number;
66
+ capability: {
67
+ schema: typeof PROVIDER_CAPABILITY_SCHEMA;
68
+ descriptor_version: number;
69
+ provider_version_range: string;
70
+ provider_variant: string;
71
+ selected_representation: string;
72
+ loading_path: string;
73
+ session_surface?: SessionProviderSurface;
74
+ asset_surface: string;
75
+ };
76
+ units: InstructionGraphUnit[];
77
+ artifacts: InstructionGraphArtifact[];
78
+ diagnostics: InstructionGraphDiagnostic[];
79
+ source_hash: string;
80
+ }
81
+ export interface CompiledInstructionGraph {
82
+ plan: InstructionGraphRenderPlan;
83
+ sources: SessionInstructionSource[];
84
+ capability: ProviderCapability;
85
+ }
86
+ export interface ProfileSessionRenderPlan extends SessionRenderPlan {
87
+ instructionGraph: InstructionGraphRenderPlan;
88
+ }
89
+ export declare function legacyProfileConfigBinding(): ProfileConfigBindingSpec;
90
+ export declare function normalizeProfileConfigBinding(value: unknown): ProfileConfigBindingSpec;
91
+ export declare function selectProviderCapability(context: InstructionGraphContext): ProviderCapability;
92
+ export declare function compileInstructionGraph(input: {
93
+ profile_id: string;
94
+ configs: Config[];
95
+ bindings: ProfileConfigBinding[];
96
+ context: InstructionGraphContext;
97
+ capability?: ProviderCapability;
98
+ }): CompiledInstructionGraph;
99
+ export declare function planProfileSessionRender(input: Omit<SessionRenderInput, "sources"> & {
100
+ profile_id: string;
101
+ provider_version: string;
102
+ configs: Config[];
103
+ bindings: ProfileConfigBinding[];
104
+ asset_configs?: Config[];
105
+ asset_bindings?: ProfileAssetBinding[];
106
+ asset_plan_mode?: AssetPlanMode;
107
+ asset_scope?: "global" | "project" | "session";
108
+ asset_surface?: string;
109
+ allow_asset_installers?: boolean;
110
+ graph_context?: Omit<InstructionGraphContext, "provider" | "provider_version">;
111
+ }): ProfileSessionRenderPlan;
112
+ export declare class InstructionGraphValidationError extends Error {
113
+ readonly diagnostics: InstructionGraphDiagnostic[];
114
+ constructor(diagnostics: InstructionGraphDiagnostic[]);
115
+ }
116
+ //# sourceMappingURL=instruction-graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instruction-graph.d.ts","sourceRoot":"","sources":["../../src/lib/instruction-graph.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EAEN,qBAAqB,EACrB,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAO3B,OAAO,KAAK,EACV,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,eAAO,MAAM,6BAA6B,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BAAzC,WAAW,EAAE,0BAA0B,EAAE;CAI/D"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=instruction-graph.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instruction-graph.test.d.ts","sourceRoot":"","sources":["../../src/lib/instruction-graph.test.ts"],"names":[],"mappings":""}
@@ -69,13 +69,13 @@ declare const projectContextBundleSchema: z.ZodEffects<z.ZodObject<{
69
69
  storage: z.ZodEnum<["sqlite", "cloud", "self-hosted"]>;
70
70
  availability: z.ZodEnum<["available", "unavailable"]>;
71
71
  }, "strict", z.ZodTypeAny, {
72
- mode: "local" | "api";
73
72
  owner: "projects";
73
+ mode: "local" | "api";
74
74
  storage: "sqlite" | "cloud" | "self-hosted";
75
75
  availability: "available" | "unavailable";
76
76
  }, {
77
- mode: "local" | "api";
78
77
  owner: "projects";
78
+ mode: "local" | "api";
79
79
  storage: "sqlite" | "cloud" | "self-hosted";
80
80
  availability: "available" | "unavailable";
81
81
  }>;
@@ -152,10 +152,10 @@ declare const projectContextBundleSchema: z.ZodEffects<z.ZodObject<{
152
152
  id: string;
153
153
  name: string;
154
154
  slug: string;
155
- kind: "open-source" | "internal-app" | "platform" | "company-website" | "scaffold" | "community" | "project" | "experiment" | "docs" | "remote-only" | "generic";
155
+ kind: "project" | "open-source" | "internal-app" | "platform" | "company-website" | "scaffold" | "community" | "experiment" | "docs" | "remote-only" | "generic";
156
156
  updated_at: string;
157
- status: "active" | "archived" | "deleted";
158
157
  path: string | null;
158
+ status: "active" | "archived" | "deleted";
159
159
  finance?: {
160
160
  schema: "hasna.projects.finance_project_metadata.v1";
161
161
  business_area: "finance";
@@ -173,10 +173,10 @@ declare const projectContextBundleSchema: z.ZodEffects<z.ZodObject<{
173
173
  id: string;
174
174
  name: string;
175
175
  slug: string;
176
- kind: "open-source" | "internal-app" | "platform" | "company-website" | "scaffold" | "community" | "project" | "experiment" | "docs" | "remote-only" | "generic";
176
+ kind: "project" | "open-source" | "internal-app" | "platform" | "company-website" | "scaffold" | "community" | "experiment" | "docs" | "remote-only" | "generic";
177
177
  updated_at: string;
178
- status: "active" | "archived" | "deleted";
179
178
  path: string | null;
179
+ status: "active" | "archived" | "deleted";
180
180
  finance?: {
181
181
  schema: "hasna.projects.finance_project_metadata.v1";
182
182
  business_area: "finance";
@@ -284,10 +284,10 @@ declare const projectContextBundleSchema: z.ZodEffects<z.ZodObject<{
284
284
  id: string;
285
285
  name: string;
286
286
  slug: string;
287
- kind: "open-source" | "internal-app" | "platform" | "company-website" | "scaffold" | "community" | "project" | "experiment" | "docs" | "remote-only" | "generic";
287
+ kind: "project" | "open-source" | "internal-app" | "platform" | "company-website" | "scaffold" | "community" | "experiment" | "docs" | "remote-only" | "generic";
288
288
  updated_at: string;
289
- status: "active" | "archived" | "deleted";
290
289
  path: string | null;
290
+ status: "active" | "archived" | "deleted";
291
291
  finance?: {
292
292
  schema: "hasna.projects.finance_project_metadata.v1";
293
293
  business_area: "finance";
@@ -313,8 +313,8 @@ declare const projectContextBundleSchema: z.ZodEffects<z.ZodObject<{
313
313
  create_allowed: boolean;
314
314
  };
315
315
  authority: {
316
- mode: "local" | "api";
317
316
  owner: "projects";
317
+ mode: "local" | "api";
318
318
  storage: "sqlite" | "cloud" | "self-hosted";
319
319
  availability: "available" | "unavailable";
320
320
  };
@@ -347,10 +347,10 @@ declare const projectContextBundleSchema: z.ZodEffects<z.ZodObject<{
347
347
  id: string;
348
348
  name: string;
349
349
  slug: string;
350
- kind: "open-source" | "internal-app" | "platform" | "company-website" | "scaffold" | "community" | "project" | "experiment" | "docs" | "remote-only" | "generic";
350
+ kind: "project" | "open-source" | "internal-app" | "platform" | "company-website" | "scaffold" | "community" | "experiment" | "docs" | "remote-only" | "generic";
351
351
  updated_at: string;
352
- status: "active" | "archived" | "deleted";
353
352
  path: string | null;
353
+ status: "active" | "archived" | "deleted";
354
354
  finance?: {
355
355
  schema: "hasna.projects.finance_project_metadata.v1";
356
356
  business_area: "finance";
@@ -376,8 +376,8 @@ declare const projectContextBundleSchema: z.ZodEffects<z.ZodObject<{
376
376
  create_allowed: boolean;
377
377
  };
378
378
  authority: {
379
- mode: "local" | "api";
380
379
  owner: "projects";
380
+ mode: "local" | "api";
381
381
  storage: "sqlite" | "cloud" | "self-hosted";
382
382
  availability: "available" | "unavailable";
383
383
  };
@@ -410,10 +410,10 @@ declare const projectContextBundleSchema: z.ZodEffects<z.ZodObject<{
410
410
  id: string;
411
411
  name: string;
412
412
  slug: string;
413
- kind: "open-source" | "internal-app" | "platform" | "company-website" | "scaffold" | "community" | "project" | "experiment" | "docs" | "remote-only" | "generic";
413
+ kind: "project" | "open-source" | "internal-app" | "platform" | "company-website" | "scaffold" | "community" | "experiment" | "docs" | "remote-only" | "generic";
414
414
  updated_at: string;
415
- status: "active" | "archived" | "deleted";
416
415
  path: string | null;
416
+ status: "active" | "archived" | "deleted";
417
417
  finance?: {
418
418
  schema: "hasna.projects.finance_project_metadata.v1";
419
419
  business_area: "finance";
@@ -439,8 +439,8 @@ declare const projectContextBundleSchema: z.ZodEffects<z.ZodObject<{
439
439
  create_allowed: boolean;
440
440
  };
441
441
  authority: {
442
- mode: "local" | "api";
443
442
  owner: "projects";
443
+ mode: "local" | "api";
444
444
  storage: "sqlite" | "cloud" | "self-hosted";
445
445
  availability: "available" | "unavailable";
446
446
  };
@@ -473,10 +473,10 @@ declare const projectContextBundleSchema: z.ZodEffects<z.ZodObject<{
473
473
  id: string;
474
474
  name: string;
475
475
  slug: string;
476
- kind: "open-source" | "internal-app" | "platform" | "company-website" | "scaffold" | "community" | "project" | "experiment" | "docs" | "remote-only" | "generic";
476
+ kind: "project" | "open-source" | "internal-app" | "platform" | "company-website" | "scaffold" | "community" | "experiment" | "docs" | "remote-only" | "generic";
477
477
  updated_at: string;
478
- status: "active" | "archived" | "deleted";
479
478
  path: string | null;
479
+ status: "active" | "archived" | "deleted";
480
480
  finance?: {
481
481
  schema: "hasna.projects.finance_project_metadata.v1";
482
482
  business_area: "finance";
@@ -502,8 +502,8 @@ declare const projectContextBundleSchema: z.ZodEffects<z.ZodObject<{
502
502
  create_allowed: boolean;
503
503
  };
504
504
  authority: {
505
- mode: "local" | "api";
506
505
  owner: "projects";
506
+ mode: "local" | "api";
507
507
  storage: "sqlite" | "cloud" | "self-hosted";
508
508
  availability: "available" | "unavailable";
509
509
  };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=provider-assets-adapters.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-assets-adapters.test.d.ts","sourceRoot":"","sources":["../../src/lib/provider-assets-adapters.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=provider-version-adapters.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-version-adapters.test.d.ts","sourceRoot":"","sources":["../../src/lib/provider-version-adapters.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare function providerVersionSatisfies(version: string, range: string): boolean;
2
+ //# sourceMappingURL=provider-version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-version.d.ts","sourceRoot":"","sources":["../../src/lib/provider-version.ts"],"names":[],"mappings":"AAAA,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAmBhF"}
@@ -31,6 +31,7 @@ export interface SessionApplyResult {
31
31
  targetHome: string;
32
32
  manifestPath: string;
33
33
  snapshotPath: string | null;
34
+ rollback: SessionRollbackReceipt;
34
35
  env: Record<string, string>;
35
36
  warnings: string[];
36
37
  skippedSources: SessionSkippedSource[];
@@ -38,6 +39,12 @@ export interface SessionApplyResult {
38
39
  conflicts: SessionApplyFileResult[];
39
40
  drift: SessionDriftCheck;
40
41
  }
42
+ export interface SessionRollbackReceipt {
43
+ schema: "hasna.configs.session-render-rollback/v1";
44
+ status: "available" | "not-required" | "unsupported" | "blocked";
45
+ snapshotPath: string | null;
46
+ reason: "snapshot-created" | "dry-run-does-not-write" | "conflicts-prevented-apply" | "new-root-snapshot-not-supported-for-adapter";
47
+ }
41
48
  export interface SessionApplyOptions {
42
49
  dryRun?: boolean;
43
50
  force?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"session-apply.d.ts","sourceRoot":"","sources":["../../src/lib/session-apply.ts"],"names":[],"mappings":"AAiBA,OAAO,EAIL,KAAK,qBAAqB,EAE1B,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC;AAE3F,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,qBAAqB,CAAC;IAC5B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,SAAS,GAAG,eAAe,CAAC;CACrC;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,OAAO,EAAE,iBAAiB,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OA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