@hasna/instructions 0.4.26 → 0.4.27

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 CHANGED
@@ -52,6 +52,12 @@ small. Human output is capped at 20 rows unless you pass `--limit`; use
52
52
  - `--json` preserves full machine-readable records for automation.
53
53
  - `show`/`inspect` and `snapshot show` print full config or snapshot content.
54
54
 
55
+ `instructions report --json` emits the stable `schema_version: 1` report
56
+ envelope. Its top-level fields are `configs`, `profiles`, `drift`, `secrets`,
57
+ `by_agent`, and `by_category`. The nested count fields are numeric, and
58
+ `secrets.policy` is `redacted_on_ingest`. Run `instructions report` without
59
+ `--json` for the human-readable report.
60
+
55
61
  ## Package-Manager Secret Guard
56
62
 
57
63
  `instructions package-manager-scan` blocks package-manager credential ingress without
@@ -243,7 +249,8 @@ never silently become "overwrite renderer-owned instruction files".
243
249
  ### Managed project context
244
250
 
245
251
  `instructions project-context plan|apply` is the sole writer for the strict
246
- `hasna.projects.project_context_bundle.v1` contract emitted by Projects. It
252
+ `hasna.projects.project_context_bundle.v1` and schema-compatible
253
+ `hasna.projects.project_context_bundle.v2` contracts emitted by Projects. It
247
254
  accepts bounded structured JSON from a regular file or stdin and never invokes
248
255
  Projects, Todos, Conversations, or Mementos while rendering:
249
256
 
package/dist/cli/index.js CHANGED
@@ -7952,7 +7952,7 @@ function parseProjectContextBundleInternal(input, allowLegacyHash, normalizeLega
7952
7952
  throw new ProjectContextError("PROJECT_CONTEXT_INVALID", "bundle is not valid JSON");
7953
7953
  }
7954
7954
  const candidateSchema = isRecord(value) ? value["schema"] : undefined;
7955
- if (typeof candidateSchema === "string" && candidateSchema !== PROJECT_CONTEXT_SCHEMA) {
7955
+ if (typeof candidateSchema === "string" && !PROJECT_CONTEXT_SUPPORTED_SCHEMAS.includes(candidateSchema)) {
7956
7956
  if (/^hasna\.projects\.project_context_bundle\.v[0-9]+$/.test(candidateSchema)) {
7957
7957
  throw new ProjectContextError("PROJECT_CONTEXT_UNSUPPORTED_VERSION", `unsupported bundle schema ${candidateSchema}`);
7958
7958
  }
@@ -8956,7 +8956,7 @@ function projectContextManifestSource(cachePath, runtime, bundle) {
8956
8956
  rules: [],
8957
8957
  renderedPayloadSha256: sha2562(JSON.stringify(bundle)),
8958
8958
  provenance: {
8959
- schema: PROJECT_CONTEXT_SCHEMA,
8959
+ schema: bundle.schema,
8960
8960
  projectId: bundle.project.id,
8961
8961
  revision: bundle.revision,
8962
8962
  hash: bundle.hash
@@ -8965,7 +8965,7 @@ function projectContextManifestSource(cachePath, runtime, bundle) {
8965
8965
  }
8966
8966
  function manifestProjectContext(plan) {
8967
8967
  return {
8968
- schema: PROJECT_CONTEXT_SCHEMA,
8968
+ schema: plan.bundle.schema,
8969
8969
  projectId: plan.bundle.project.id,
8970
8970
  revision: plan.bundle.revision,
8971
8971
  hash: plan.bundle.hash,
@@ -10437,11 +10437,13 @@ function sha2562(content) {
10437
10437
  function isRecord(value) {
10438
10438
  return !!value && typeof value === "object" && !Array.isArray(value);
10439
10439
  }
10440
- var PROJECT_CONTEXT_SCHEMA = "hasna.projects.project_context_bundle.v1", PROJECT_CONTEXT_MAX_INPUT_BYTES, PROJECT_CONTEXT_MAX_RENDERED_BYTES, PROJECT_CONTEXT_MAX_APPROX_TOKENS = 1000, PROJECT_CONTEXT_MAX_COMMANDS = 6, PROJECT_CONTEXT_MAX_WARNINGS = 3, PROJECT_CONTEXT_FRAGMENT_PATH = ".hasna/instructions/project-context.md", PROJECT_CONTEXT_MANIFEST_PATH = ".hasna/project-context-manifest.json", PROJECT_CONTEXT_CACHE_PATH = ".hasna/project-context-cache.json", PROJECT_CONTEXT_LOCK_PATH = ".hasna/project-context.lock", PROJECT_CONTEXT_SNAPSHOT_DIR = ".hasna/project-context-snapshots", PROJECT_CONTEXT_CACHE_SCHEMA = "hasna.instructions.project-context-cache/v1", PROJECT_CONTEXT_MANAGED_COMMENT = "Managed by @hasna/configs project context", SESSION_COMPATIBILITY_MANIFEST_MAX_BYTES, FOREIGN_INPUT_MAX_BYTES, SESSION_MANAGED_OUTPUT_MAX_BYTES, SESSION_MANAGED_INPUT_MAX_BYTES, SESSION_MANAGED_OUTPUT_PATHS, SESSION_MANAGED_OUTPUT_WARN_BYTES, PROJECT_CONTEXT_LOCK_STALE_MS, LEGACY_CONFIGS_PACKAGE = "@hasna/configs", LEGACY_CONFIGS_COMPAT_VERSION = "0.2.45", LEGACY_CONFIGS_EXECUTABLE = "configs", PROJECT_KINDS, PROJECT_STATUSES, LINK_STATES, RESOLUTION_SOURCES, safeId, nullableId, producerSlug, producerName, safeOptionalDisplay, isoTimestamp, revisionSchema, hashSchema, absolutePath, commandArg, commandSchema, projectContextBundleSchema, storedManifestProjectContextSchema, storedManifestFileSchema, storedManifestObservationSchema, projectContextMetadataSnapshotSchema, projectContextCacheSchema, ProjectContextError, ProjectContextHashRace, anchoredFsOps, atomicExchange, atomicExchangeLibraries;
10440
+ var PROJECT_CONTEXT_SCHEMA = "hasna.projects.project_context_bundle.v1", PROJECT_CONTEXT_SCHEMA_V2 = "hasna.projects.project_context_bundle.v2", PROJECT_CONTEXT_SUPPORTED_SCHEMAS, projectContextSchema, PROJECT_CONTEXT_MAX_INPUT_BYTES, PROJECT_CONTEXT_MAX_RENDERED_BYTES, PROJECT_CONTEXT_MAX_APPROX_TOKENS = 1000, PROJECT_CONTEXT_MAX_COMMANDS = 6, PROJECT_CONTEXT_MAX_WARNINGS = 3, PROJECT_CONTEXT_FRAGMENT_PATH = ".hasna/instructions/project-context.md", PROJECT_CONTEXT_MANIFEST_PATH = ".hasna/project-context-manifest.json", PROJECT_CONTEXT_CACHE_PATH = ".hasna/project-context-cache.json", PROJECT_CONTEXT_LOCK_PATH = ".hasna/project-context.lock", PROJECT_CONTEXT_SNAPSHOT_DIR = ".hasna/project-context-snapshots", PROJECT_CONTEXT_CACHE_SCHEMA = "hasna.instructions.project-context-cache/v1", PROJECT_CONTEXT_MANAGED_COMMENT = "Managed by @hasna/configs project context", SESSION_COMPATIBILITY_MANIFEST_MAX_BYTES, FOREIGN_INPUT_MAX_BYTES, SESSION_MANAGED_OUTPUT_MAX_BYTES, SESSION_MANAGED_INPUT_MAX_BYTES, SESSION_MANAGED_OUTPUT_PATHS, SESSION_MANAGED_OUTPUT_WARN_BYTES, PROJECT_CONTEXT_LOCK_STALE_MS, LEGACY_CONFIGS_PACKAGE = "@hasna/configs", LEGACY_CONFIGS_COMPAT_VERSION = "0.2.45", LEGACY_CONFIGS_EXECUTABLE = "configs", PROJECT_KINDS, PROJECT_STATUSES, LINK_STATES, RESOLUTION_SOURCES, safeId, nullableId, producerSlug, producerName, safeOptionalDisplay, isoTimestamp, revisionSchema, hashSchema, absolutePath, commandArg, commandSchema, projectContextBundleSchema, storedManifestProjectContextSchema, storedManifestFileSchema, storedManifestObservationSchema, projectContextMetadataSnapshotSchema, projectContextCacheSchema, ProjectContextError, ProjectContextHashRace, anchoredFsOps, atomicExchange, atomicExchangeLibraries;
10441
10441
  var init_project_context = __esm(() => {
10442
10442
  init_zod();
10443
10443
  init_redact();
10444
10444
  init_session_render_contract();
10445
+ PROJECT_CONTEXT_SUPPORTED_SCHEMAS = [PROJECT_CONTEXT_SCHEMA, PROJECT_CONTEXT_SCHEMA_V2];
10446
+ projectContextSchema = exports_external.enum(PROJECT_CONTEXT_SUPPORTED_SCHEMAS);
10445
10447
  PROJECT_CONTEXT_MAX_INPUT_BYTES = 8 * 1024;
10446
10448
  PROJECT_CONTEXT_MAX_RENDERED_BYTES = 4 * 1024;
10447
10449
  SESSION_COMPATIBILITY_MANIFEST_MAX_BYTES = 8 * 1024 * 1024;
@@ -10489,7 +10491,7 @@ var init_project_context = __esm(() => {
10489
10491
  argv: exports_external.array(commandArg).min(1).max(8)
10490
10492
  }).strict();
10491
10493
  projectContextBundleSchema = exports_external.object({
10492
- schema: exports_external.literal(PROJECT_CONTEXT_SCHEMA),
10494
+ schema: projectContextSchema,
10493
10495
  generated_at: isoTimestamp,
10494
10496
  hash: hashSchema,
10495
10497
  revision: revisionSchema,
@@ -10537,7 +10539,7 @@ var init_project_context = __esm(() => {
10537
10539
  commands: exports_external.array(commandSchema).max(PROJECT_CONTEXT_MAX_COMMANDS)
10538
10540
  }).strict();
10539
10541
  storedManifestProjectContextSchema = exports_external.object({
10540
- schema: exports_external.literal(PROJECT_CONTEXT_SCHEMA),
10542
+ schema: projectContextSchema,
10541
10543
  projectId: safeId,
10542
10544
  revision: revisionSchema,
10543
10545
  hash: hashSchema,
@@ -10808,10 +10810,13 @@ function sourceFingerprint(source) {
10808
10810
  metadata: canonicalFingerprintValue(source.metadata ?? null)
10809
10811
  };
10810
10812
  }
10811
- function slug(value) {
10813
+ function normalizeSessionInstructionSourceId(value) {
10812
10814
  const s = value.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
10813
10815
  return s || "instruction";
10814
10816
  }
10817
+ function slug(value) {
10818
+ return normalizeSessionInstructionSourceId(value);
10819
+ }
10815
10820
  function yamlQuote2(value) {
10816
10821
  return `"${value.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"`;
10817
10822
  }
@@ -10930,12 +10935,17 @@ function normalizeSources(sources, tool, allowEmptySources) {
10930
10935
  }
10931
10936
  return normalized2;
10932
10937
  });
10938
+ const originalOrder = [...normalized].sort(compareSessionInstructionSources);
10933
10939
  const deduplicated = deduplicateSemanticPolicySources(normalized);
10934
- const ordered = deduplicated.selected.sort((a, b) => SESSION_LAYER_RANK[a.resolvedLayer] - SESSION_LAYER_RANK[b.resolvedLayer] || a.resolvedOrder - b.resolvedOrder || a.id.localeCompare(b.id));
10940
+ const ordered = deduplicated.selected.sort(compareSessionInstructionSources);
10941
+ validateTargetedReplacementSources(originalOrder, ordered, deduplicated.skipped);
10935
10942
  rejectDuplicateSourceSlugs(ordered);
10936
10943
  rejectDuplicateRulePaths(ordered);
10937
10944
  return { sources: ordered, skipped: deduplicated.skipped };
10938
10945
  }
10946
+ function compareSessionInstructionSources(a, b) {
10947
+ return SESSION_LAYER_RANK[a.resolvedLayer] - SESSION_LAYER_RANK[b.resolvedLayer] || a.resolvedOrder - b.resolvedOrder || a.id.localeCompare(b.id);
10948
+ }
10939
10949
  function semanticPolicyIntegrity(body) {
10940
10950
  return sha2563(body) === AGENT_OPERATING_RULES_PAYLOAD_SHA256 ? "pinned-digest" : "unverified-self-declared";
10941
10951
  }
@@ -11062,7 +11072,52 @@ function filterProviderOnlyBlocks(content, tool) {
11062
11072
  return output.join(`
11063
11073
  `);
11064
11074
  }
11065
- function composeSources(sources) {
11075
+ function targetedReplacementTarget(source) {
11076
+ if (source.replacementScope == null)
11077
+ return null;
11078
+ if (source.resolvedMerge !== "replace") {
11079
+ throw new Error(`Session instruction source "${source.id}" uses replacement scope "${source.replacementScope}" ` + `with merge=${source.resolvedMerge}; replacement scopes require merge=replace, not append.`);
11080
+ }
11081
+ const scope = source.replacementScope.trim();
11082
+ if (!scope.startsWith("source:")) {
11083
+ throw new Error(`Invalid replacement scope "${source.replacementScope}" for source "${source.id}"; ` + 'expected "source:<normalized-source-id>".');
11084
+ }
11085
+ const target = scope.slice("source:".length);
11086
+ if (!target || target !== slug(target)) {
11087
+ throw new Error(`Invalid replacement scope "${source.replacementScope}" for source "${source.id}"; ` + "the target must be a non-empty normalized source id.");
11088
+ }
11089
+ return target;
11090
+ }
11091
+ function validateTargetedReplacementSources(originalSources, selectedSources, deduplicatedSources) {
11092
+ for (let replacerIndex = 0;replacerIndex < originalSources.length; replacerIndex++) {
11093
+ const replacer = originalSources[replacerIndex];
11094
+ const targetNormalizedId = targetedReplacementTarget(replacer);
11095
+ if (targetNormalizedId === null)
11096
+ continue;
11097
+ const matches = originalSources.filter((source) => source.normalizedId === targetNormalizedId);
11098
+ if (matches.length === 0) {
11099
+ throw new Error(`Targeted replacement source "${replacer.id}" names missing source "${targetNormalizedId}".`);
11100
+ }
11101
+ if (matches.length > 1) {
11102
+ throw new Error(`Targeted replacement source "${replacer.id}" is ambiguous after normalization: ` + `"${targetNormalizedId}" matches ${matches.map((source) => `"${source.id}"`).join(", ")}.`);
11103
+ }
11104
+ const target = matches[0];
11105
+ const targetIndex = originalSources.indexOf(target);
11106
+ if (targetIndex >= replacerIndex) {
11107
+ throw new Error(`Targeted replacement source "${replacer.id}" must name an earlier source; ` + `"${target.id}" is later than or identical to the replacer.`);
11108
+ }
11109
+ if (target.nonOverridable) {
11110
+ throw new Error(`Targeted replacement source "${replacer.id}" cannot replace non-overridable source "${target.id}".`);
11111
+ }
11112
+ if (!selectedSources.some((source) => source.id === replacer.id)) {
11113
+ throw new Error(`Targeted replacement source "${replacer.id}" was removed by semantic-policy deduplication before composition.`);
11114
+ }
11115
+ if (deduplicatedSources.some((source) => source.id === target.id)) {
11116
+ throw new Error(`Targeted replacement source "${replacer.id}" cannot claim success because target "${target.id}" ` + "was removed by semantic-policy deduplication before composition.");
11117
+ }
11118
+ }
11119
+ }
11120
+ function composeBroadReplaceSources(sources) {
11066
11121
  let start = -1;
11067
11122
  for (let i = 0;i < sources.length; i++) {
11068
11123
  if (sources[i].resolvedMerge === "replace")
@@ -11076,6 +11131,53 @@ function composeSources(sources) {
11076
11131
  const skipped = earlier.filter((source) => !source.nonOverridable).map((source) => skippedSource(source, `superseded by "${replacer.id}": a replace-merge source discards earlier overridable instruction layers`));
11077
11132
  return { sources: [...protectedSources, ...sources.slice(start)], skipped };
11078
11133
  }
11134
+ function composeSources(sources) {
11135
+ const hasTargetedReplacement = sources.some((source) => source.replacementScope !== undefined);
11136
+ if (!hasTargetedReplacement)
11137
+ return composeBroadReplaceSources(sources);
11138
+ const selected = [];
11139
+ const skipped = [];
11140
+ for (const source of sources) {
11141
+ const targetNormalizedId = targetedReplacementTarget(source);
11142
+ if (targetNormalizedId !== null) {
11143
+ const targetIndex = selected.findIndex((candidate) => candidate.normalizedId === targetNormalizedId);
11144
+ if (targetIndex < 0) {
11145
+ throw new Error(`Targeted replacement source "${source.id}" cannot replace "${targetNormalizedId}": ` + "the earlier target was already removed.");
11146
+ }
11147
+ const target = selected[targetIndex];
11148
+ if (target.nonOverridable) {
11149
+ throw new Error(`Targeted replacement source "${source.id}" cannot replace non-overridable source "${target.id}".`);
11150
+ }
11151
+ selected.splice(targetIndex, 1);
11152
+ skipped.push(skippedSource(target, `superseded by "${source.id}": targeted replacement ${source.replacementScope} ` + `removed exactly source "${target.id}"`));
11153
+ selected.push({
11154
+ ...source,
11155
+ provenance: {
11156
+ ...source.provenance ?? {},
11157
+ targetedReplacement: {
11158
+ scope: source.replacementScope,
11159
+ targetSourceId: target.id,
11160
+ targetNormalizedSourceId: target.normalizedId
11161
+ }
11162
+ }
11163
+ });
11164
+ continue;
11165
+ }
11166
+ if (source.resolvedMerge === "replace") {
11167
+ const retained = selected.filter((candidate) => candidate.nonOverridable);
11168
+ for (const candidate of selected) {
11169
+ if (candidate.nonOverridable)
11170
+ continue;
11171
+ skipped.push(skippedSource(candidate, `superseded by "${source.id}": a replace-merge source discards earlier overridable instruction layers`));
11172
+ }
11173
+ selected.length = 0;
11174
+ selected.push(...retained, source);
11175
+ continue;
11176
+ }
11177
+ selected.push(source);
11178
+ }
11179
+ return { sources: selected, skipped };
11180
+ }
11079
11181
  function sectionForSource(source) {
11080
11182
  const parts = [
11081
11183
  `<!-- ${SESSION_RENDER_MANAGED_MARKER}. Do not edit this generated file directly. -->`,
@@ -15916,7 +16018,7 @@ function parseSessionLayer(value) {
15916
16018
  return value;
15917
16019
  throw new Error(`Invalid source layer "${value}"`);
15918
16020
  }
15919
- function parseSessionSource(value, order, replaceIds) {
16021
+ function parseSessionSource(value, order) {
15920
16022
  const idx = value.indexOf("=");
15921
16023
  let id = idx > 0 ? value.slice(0, idx).trim() : "";
15922
16024
  const path = idx > 0 ? value.slice(idx + 1).trim() : value.trim();
@@ -15939,9 +16041,39 @@ function parseSessionSource(value, order, replaceIds) {
15939
16041
  id: resolvedId,
15940
16042
  label: id ? resolvedId : source.label ?? resolvedId,
15941
16043
  layer,
15942
- merge: replaceIds.has(resolvedId) ? "replace" : "append"
16044
+ merge: "append"
15943
16045
  };
15944
16046
  }
16047
+ function parseSessionSourceReplacement(value) {
16048
+ const trimmed = value.trim();
16049
+ const separator = trimmed.indexOf("=");
16050
+ const replacerId = (separator >= 0 ? trimmed.slice(0, separator) : trimmed).trim();
16051
+ if (!replacerId) {
16052
+ throw new Error(`Invalid --replace-source "${value}" (expected replacer-id or replacer-id=target-source-id)`);
16053
+ }
16054
+ if (separator < 0)
16055
+ return { replacerId };
16056
+ const targetId = trimmed.slice(separator + 1).trim();
16057
+ if (!targetId) {
16058
+ throw new Error(`Invalid --replace-source "${value}" (target source id is required after "=")`);
16059
+ }
16060
+ return {
16061
+ replacerId,
16062
+ replacementScope: `source:${normalizeSessionInstructionSourceId(targetId)}`
16063
+ };
16064
+ }
16065
+ function sessionSourceReplacements(values) {
16066
+ const replacements = new Map;
16067
+ for (const value of values) {
16068
+ const replacement = parseSessionSourceReplacement(value);
16069
+ const existing = replacements.get(replacement.replacerId);
16070
+ if (existing && existing.replacementScope !== replacement.replacementScope) {
16071
+ throw new Error(`Conflicting --replace-source values for "${replacement.replacerId}": ` + `${existing.replacementScope ?? "broad"} and ${replacement.replacementScope ?? "broad"}.`);
16072
+ }
16073
+ replacements.set(replacement.replacerId, replacement);
16074
+ }
16075
+ return replacements;
16076
+ }
15945
16077
  function readSessionInstructionSourceFile(path) {
15946
16078
  const stat = lstatSync4(path);
15947
16079
  if (stat.isSymbolicLink()) {
@@ -15972,8 +16104,8 @@ function parseLayeredReference(value) {
15972
16104
  return { id: trimmed };
15973
16105
  }
15974
16106
  async function collectSessionSources(opts, tool, store) {
15975
- const replaceIds = new Set(opts.replaceSource ?? []);
15976
- const sources = (opts.source ?? []).map((value, index) => parseSessionSource(value, index, replaceIds));
16107
+ const replacements = sessionSourceReplacements(opts.replaceSource ?? []);
16108
+ const sources = (opts.source ?? []).map((value, index) => parseSessionSource(value, index));
15977
16109
  for (const value of opts.config ?? []) {
15978
16110
  const { layer, id } = parseLayeredReference(value);
15979
16111
  sources.push(sourceFromConfig(await store.getConfig(id), sources.length, layer));
@@ -15985,7 +16117,16 @@ async function collectSessionSources(opts, tool, store) {
15985
16117
  const parsed = JSON.parse(readFileSync12(path, "utf-8"));
15986
16118
  sources.push(...sourcesFromIdentityExport(parsed, { path, tool, orderOffset: sources.length }));
15987
16119
  }
15988
- return sources.map((source) => replaceIds.has(source.id) ? { ...source, merge: "replace" } : source);
16120
+ return sources.map((source) => {
16121
+ const replacement = replacements.get(source.id);
16122
+ if (!replacement)
16123
+ return source;
16124
+ return {
16125
+ ...source,
16126
+ merge: "replace",
16127
+ replacementScope: replacement.replacementScope
16128
+ };
16129
+ });
15989
16130
  }
15990
16131
  async function checkGlobalSourceCoverage(plan, store) {
15991
16132
  const registryConfigs = await store.listConfigs({});
@@ -16728,7 +16869,7 @@ projectContextCmd.command("apply").description("Atomically write project context
16728
16869
  }
16729
16870
  });
16730
16871
  var sessionCmd = program.command("session").description("Plan and apply session-scoped agent instruction files");
16731
- sessionCmd.command("plan").description("Produce a dry-run render plan for profile-scoped instruction injection").requiredOption("--tool <tool>", `target tool (${SESSION_RENDER_TOOLS.join("|")})`).requiredOption("--profile <profile>", "account/profile name that owns the rendered instruction home").option("--target-home <path>", "override generated profile-scoped target home").option("--project-root <path>", "repository root for project-scoped adapters such as Cursor").option("--session-id <id>", "session id to include in the manifest").option("--source <layer:id=path>", `instruction source file; layers: ${SESSION_SOURCE_LAYER_HELP}`, collectOption, []).option("--config <layer:id-or-slug>", "stored config source by id/slug; repeatable; layer aliases match --source", collectOption, []).option("--identity-export <path>", "OpenIdentities configs instruction export JSON; repeatable", collectOption, []).option("--replace-source <id>", "source id that replaces earlier layers instead of appending", collectOption, []).option("--codewith-native-imports", "select the gated Codewith native @ import adapter").option("--allow-empty-sources", "allow an explicit empty render plan").option("--check-global-coverage", "warn (non-fatal) when a registered, non-retired global-* source is absent from this render's --config list; expected is read fresh from the registry, independent of this plan (todos 102d6d0a)").option("--json", "output dry-run JSON").action(async (opts) => {
16872
+ sessionCmd.command("plan").description("Produce a dry-run render plan for profile-scoped instruction injection").requiredOption("--tool <tool>", `target tool (${SESSION_RENDER_TOOLS.join("|")})`).requiredOption("--profile <profile>", "account/profile name that owns the rendered instruction home").option("--target-home <path>", "override generated profile-scoped target home").option("--project-root <path>", "repository root for project-scoped adapters such as Cursor").option("--session-id <id>", "session id to include in the manifest").option("--source <layer:id=path>", `instruction source file; layers: ${SESSION_SOURCE_LAYER_HELP}`, collectOption, []).option("--config <layer:id-or-slug>", "stored config source by id/slug; repeatable; layer aliases match --source", collectOption, []).option("--identity-export <path>", "OpenIdentities configs instruction export JSON; repeatable", collectOption, []).option("--replace-source <replacer-id>[=<target-source-id>]", "source id that broadly replaces earlier layers, or targets one earlier source", collectOption, []).option("--codewith-native-imports", "select the gated Codewith native @ import adapter").option("--allow-empty-sources", "allow an explicit empty render plan").option("--check-global-coverage", "warn (non-fatal) when a registered, non-retired global-* source is absent from this render's --config list; expected is read fresh from the registry, independent of this plan (todos 102d6d0a)").option("--json", "output dry-run JSON").action(async (opts) => {
16732
16873
  try {
16733
16874
  const tool = opts.tool;
16734
16875
  if (!SESSION_RENDER_TOOLS.includes(tool)) {
@@ -16784,7 +16925,7 @@ sessionCmd.command("plan").description("Produce a dry-run render plan for profil
16784
16925
  process.exit(1);
16785
16926
  }
16786
16927
  });
16787
- sessionCmd.command("apply").description("Write a session render plan to its managed target home or explicit project root").requiredOption("--tool <tool>", `target tool (${SESSION_RENDER_TOOLS.join("|")})`).requiredOption("--profile <profile>", "account/profile name that owns the rendered instruction home").option("--target-home <path>", "override generated profile-scoped target home").option("--project-root <path>", "repository root for project-scoped adapters such as Cursor").option("--session-id <id>", "session id to include in the manifest").option("--source <layer:id=path>", `instruction source file; layers: ${SESSION_SOURCE_LAYER_HELP}`, collectOption, []).option("--config <layer:id-or-slug>", "stored config source by id/slug; repeatable; layer aliases match --source", collectOption, []).option("--identity-export <path>", "OpenIdentities configs instruction export JSON; repeatable", collectOption, []).option("--replace-source <id>", "source id that replaces earlier layers instead of appending", collectOption, []).option("--codewith-native-imports", "select the gated Codewith native @ import adapter").option("--allow-empty-sources", "allow an explicit empty render").option("--check-global-coverage", "warn (non-fatal) when a registered, non-retired global-* source is absent from this render's --config list; expected is read fresh from the registry, independent of this plan (todos 102d6d0a)").option("--dry-run", "preview writes and conflicts without writing").option("--force", "overwrite existing unmanaged files").option("--json", "output apply JSON").action(async (opts) => {
16928
+ sessionCmd.command("apply").description("Write a session render plan to its managed target home or explicit project root").requiredOption("--tool <tool>", `target tool (${SESSION_RENDER_TOOLS.join("|")})`).requiredOption("--profile <profile>", "account/profile name that owns the rendered instruction home").option("--target-home <path>", "override generated profile-scoped target home").option("--project-root <path>", "repository root for project-scoped adapters such as Cursor").option("--session-id <id>", "session id to include in the manifest").option("--source <layer:id=path>", `instruction source file; layers: ${SESSION_SOURCE_LAYER_HELP}`, collectOption, []).option("--config <layer:id-or-slug>", "stored config source by id/slug; repeatable; layer aliases match --source", collectOption, []).option("--identity-export <path>", "OpenIdentities configs instruction export JSON; repeatable", collectOption, []).option("--replace-source <replacer-id>[=<target-source-id>]", "source id that broadly replaces earlier layers, or targets one earlier source", collectOption, []).option("--codewith-native-imports", "select the gated Codewith native @ import adapter").option("--allow-empty-sources", "allow an explicit empty render").option("--check-global-coverage", "warn (non-fatal) when a registered, non-retired global-* source is absent from this render's --config list; expected is read fresh from the registry, independent of this plan (todos 102d6d0a)").option("--dry-run", "preview writes and conflicts without writing").option("--force", "overwrite existing unmanaged files").option("--json", "output apply JSON").action(async (opts) => {
16788
16929
  try {
16789
16930
  const tool = opts.tool;
16790
16931
  if (!SESSION_RENDER_TOOLS.includes(tool)) {
@@ -17477,7 +17618,7 @@ program.command("watch").description("Watch known config files for changes and a
17477
17618
  setInterval(tick, interval);
17478
17619
  await new Promise(() => {});
17479
17620
  });
17480
- program.command("report").description("Summary of stored configs, drift, and ecosystem health").option("--json", "output as JSON").option("--markdown", "output as markdown").action(async () => {
17621
+ program.command("report").description("Summary of stored configs, drift, and ecosystem health").option("--json", "output as JSON").option("--markdown", "output as markdown").action(async (opts) => {
17481
17622
  const store = resolveConfigStore();
17482
17623
  const stats = await store.getConfigStats();
17483
17624
  const allConfigs = await store.listConfigs();
@@ -17503,6 +17644,32 @@ program.command("report").description("Summary of stored configs, drift, and eco
17503
17644
  for (const c of allConfigs)
17504
17645
  byAgent[c.agent] = (byAgent[c.agent] || 0) + 1;
17505
17646
  const projectConfigs = allConfigs.filter((c) => c.target_path && !c.target_path.startsWith("~/."));
17647
+ if (opts.json) {
17648
+ printJson({
17649
+ schema_version: 1,
17650
+ configs: {
17651
+ total: allConfigs.length,
17652
+ files: fileConfigs.length,
17653
+ references: refConfigs.length,
17654
+ templates: templates.length,
17655
+ project: projectConfigs.length
17656
+ },
17657
+ profiles: {
17658
+ total: profiles.length
17659
+ },
17660
+ drift: {
17661
+ drifted,
17662
+ missing
17663
+ },
17664
+ secrets: {
17665
+ findings: 0,
17666
+ policy: "redacted_on_ingest"
17667
+ },
17668
+ by_agent: byAgent,
17669
+ by_category: Object.fromEntries(Object.entries(stats).filter(([key]) => key !== "total").map(([key, value]) => [key, Number(value)]))
17670
+ });
17671
+ return;
17672
+ }
17506
17673
  console.log(chalk.bold(`configs report
17507
17674
  `));
17508
17675
  console.log(` Total: ${allConfigs.length} configs (${fileConfigs.length} files, ${refConfigs.length} references)`);
package/dist/index.js CHANGED
@@ -5818,6 +5818,9 @@ var SESSION_INSTRUCTION_LAYERS = [
5818
5818
 
5819
5819
  // src/lib/project-context.ts
5820
5820
  var PROJECT_CONTEXT_SCHEMA = "hasna.projects.project_context_bundle.v1";
5821
+ var PROJECT_CONTEXT_SCHEMA_V2 = "hasna.projects.project_context_bundle.v2";
5822
+ var PROJECT_CONTEXT_SUPPORTED_SCHEMAS = [PROJECT_CONTEXT_SCHEMA, PROJECT_CONTEXT_SCHEMA_V2];
5823
+ var projectContextSchema = exports_external.enum(PROJECT_CONTEXT_SUPPORTED_SCHEMAS);
5821
5824
  var PROJECT_CONTEXT_MAX_INPUT_BYTES = 8 * 1024;
5822
5825
  var PROJECT_CONTEXT_MAX_RENDERED_BYTES = 4 * 1024;
5823
5826
  var PROJECT_CONTEXT_MAX_APPROX_TOKENS = 1000;
@@ -5884,7 +5887,7 @@ var commandSchema = exports_external.object({
5884
5887
  argv: exports_external.array(commandArg).min(1).max(8)
5885
5888
  }).strict();
5886
5889
  var projectContextBundleSchema = exports_external.object({
5887
- schema: exports_external.literal(PROJECT_CONTEXT_SCHEMA),
5890
+ schema: projectContextSchema,
5888
5891
  generated_at: isoTimestamp,
5889
5892
  hash: hashSchema,
5890
5893
  revision: revisionSchema,
@@ -5932,7 +5935,7 @@ var projectContextBundleSchema = exports_external.object({
5932
5935
  commands: exports_external.array(commandSchema).max(PROJECT_CONTEXT_MAX_COMMANDS)
5933
5936
  }).strict();
5934
5937
  var storedManifestProjectContextSchema = exports_external.object({
5935
- schema: exports_external.literal(PROJECT_CONTEXT_SCHEMA),
5938
+ schema: projectContextSchema,
5936
5939
  projectId: safeId,
5937
5940
  revision: revisionSchema,
5938
5941
  hash: hashSchema,
@@ -6040,7 +6043,7 @@ function parseProjectContextBundleInternal(input, allowLegacyHash, normalizeLega
6040
6043
  throw new ProjectContextError("PROJECT_CONTEXT_INVALID", "bundle is not valid JSON");
6041
6044
  }
6042
6045
  const candidateSchema = isRecord(value) ? value["schema"] : undefined;
6043
- if (typeof candidateSchema === "string" && candidateSchema !== PROJECT_CONTEXT_SCHEMA) {
6046
+ if (typeof candidateSchema === "string" && !PROJECT_CONTEXT_SUPPORTED_SCHEMAS.includes(candidateSchema)) {
6044
6047
  if (/^hasna\.projects\.project_context_bundle\.v[0-9]+$/.test(candidateSchema)) {
6045
6048
  throw new ProjectContextError("PROJECT_CONTEXT_UNSUPPORTED_VERSION", `unsupported bundle schema ${candidateSchema}`);
6046
6049
  }
@@ -7044,7 +7047,7 @@ function projectContextManifestSource(cachePath, runtime, bundle) {
7044
7047
  rules: [],
7045
7048
  renderedPayloadSha256: sha2562(JSON.stringify(bundle)),
7046
7049
  provenance: {
7047
- schema: PROJECT_CONTEXT_SCHEMA,
7050
+ schema: bundle.schema,
7048
7051
  projectId: bundle.project.id,
7049
7052
  revision: bundle.revision,
7050
7053
  hash: bundle.hash
@@ -7053,7 +7056,7 @@ function projectContextManifestSource(cachePath, runtime, bundle) {
7053
7056
  }
7054
7057
  function manifestProjectContext(plan) {
7055
7058
  return {
7056
- schema: PROJECT_CONTEXT_SCHEMA,
7059
+ schema: plan.bundle.schema,
7057
7060
  projectId: plan.bundle.project.id,
7058
7061
  revision: plan.bundle.revision,
7059
7062
  hash: plan.bundle.hash,
@@ -8844,10 +8847,13 @@ function sourceFingerprint(source) {
8844
8847
  metadata: canonicalFingerprintValue(source.metadata ?? null)
8845
8848
  };
8846
8849
  }
8847
- function slug(value) {
8850
+ function normalizeSessionInstructionSourceId(value) {
8848
8851
  const s = value.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
8849
8852
  return s || "instruction";
8850
8853
  }
8854
+ function slug(value) {
8855
+ return normalizeSessionInstructionSourceId(value);
8856
+ }
8851
8857
  function yamlQuote2(value) {
8852
8858
  return `"${value.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"`;
8853
8859
  }
@@ -8966,12 +8972,17 @@ function normalizeSources(sources, tool, allowEmptySources) {
8966
8972
  }
8967
8973
  return normalized2;
8968
8974
  });
8975
+ const originalOrder = [...normalized].sort(compareSessionInstructionSources);
8969
8976
  const deduplicated = deduplicateSemanticPolicySources(normalized);
8970
- const ordered = deduplicated.selected.sort((a, b) => SESSION_LAYER_RANK[a.resolvedLayer] - SESSION_LAYER_RANK[b.resolvedLayer] || a.resolvedOrder - b.resolvedOrder || a.id.localeCompare(b.id));
8977
+ const ordered = deduplicated.selected.sort(compareSessionInstructionSources);
8978
+ validateTargetedReplacementSources(originalOrder, ordered, deduplicated.skipped);
8971
8979
  rejectDuplicateSourceSlugs(ordered);
8972
8980
  rejectDuplicateRulePaths(ordered);
8973
8981
  return { sources: ordered, skipped: deduplicated.skipped };
8974
8982
  }
8983
+ function compareSessionInstructionSources(a, b) {
8984
+ return SESSION_LAYER_RANK[a.resolvedLayer] - SESSION_LAYER_RANK[b.resolvedLayer] || a.resolvedOrder - b.resolvedOrder || a.id.localeCompare(b.id);
8985
+ }
8975
8986
  function semanticPolicyIntegrity(body) {
8976
8987
  return sha2563(body) === AGENT_OPERATING_RULES_PAYLOAD_SHA256 ? "pinned-digest" : "unverified-self-declared";
8977
8988
  }
@@ -9098,7 +9109,52 @@ function filterProviderOnlyBlocks(content, tool) {
9098
9109
  return output.join(`
9099
9110
  `);
9100
9111
  }
9101
- function composeSources(sources) {
9112
+ function targetedReplacementTarget(source) {
9113
+ if (source.replacementScope == null)
9114
+ return null;
9115
+ if (source.resolvedMerge !== "replace") {
9116
+ throw new Error(`Session instruction source "${source.id}" uses replacement scope "${source.replacementScope}" ` + `with merge=${source.resolvedMerge}; replacement scopes require merge=replace, not append.`);
9117
+ }
9118
+ const scope = source.replacementScope.trim();
9119
+ if (!scope.startsWith("source:")) {
9120
+ throw new Error(`Invalid replacement scope "${source.replacementScope}" for source "${source.id}"; ` + 'expected "source:<normalized-source-id>".');
9121
+ }
9122
+ const target = scope.slice("source:".length);
9123
+ if (!target || target !== slug(target)) {
9124
+ throw new Error(`Invalid replacement scope "${source.replacementScope}" for source "${source.id}"; ` + "the target must be a non-empty normalized source id.");
9125
+ }
9126
+ return target;
9127
+ }
9128
+ function validateTargetedReplacementSources(originalSources, selectedSources, deduplicatedSources) {
9129
+ for (let replacerIndex = 0;replacerIndex < originalSources.length; replacerIndex++) {
9130
+ const replacer = originalSources[replacerIndex];
9131
+ const targetNormalizedId = targetedReplacementTarget(replacer);
9132
+ if (targetNormalizedId === null)
9133
+ continue;
9134
+ const matches = originalSources.filter((source) => source.normalizedId === targetNormalizedId);
9135
+ if (matches.length === 0) {
9136
+ throw new Error(`Targeted replacement source "${replacer.id}" names missing source "${targetNormalizedId}".`);
9137
+ }
9138
+ if (matches.length > 1) {
9139
+ throw new Error(`Targeted replacement source "${replacer.id}" is ambiguous after normalization: ` + `"${targetNormalizedId}" matches ${matches.map((source) => `"${source.id}"`).join(", ")}.`);
9140
+ }
9141
+ const target = matches[0];
9142
+ const targetIndex = originalSources.indexOf(target);
9143
+ if (targetIndex >= replacerIndex) {
9144
+ throw new Error(`Targeted replacement source "${replacer.id}" must name an earlier source; ` + `"${target.id}" is later than or identical to the replacer.`);
9145
+ }
9146
+ if (target.nonOverridable) {
9147
+ throw new Error(`Targeted replacement source "${replacer.id}" cannot replace non-overridable source "${target.id}".`);
9148
+ }
9149
+ if (!selectedSources.some((source) => source.id === replacer.id)) {
9150
+ throw new Error(`Targeted replacement source "${replacer.id}" was removed by semantic-policy deduplication before composition.`);
9151
+ }
9152
+ if (deduplicatedSources.some((source) => source.id === target.id)) {
9153
+ throw new Error(`Targeted replacement source "${replacer.id}" cannot claim success because target "${target.id}" ` + "was removed by semantic-policy deduplication before composition.");
9154
+ }
9155
+ }
9156
+ }
9157
+ function composeBroadReplaceSources(sources) {
9102
9158
  let start = -1;
9103
9159
  for (let i = 0;i < sources.length; i++) {
9104
9160
  if (sources[i].resolvedMerge === "replace")
@@ -9112,6 +9168,53 @@ function composeSources(sources) {
9112
9168
  const skipped = earlier.filter((source) => !source.nonOverridable).map((source) => skippedSource(source, `superseded by "${replacer.id}": a replace-merge source discards earlier overridable instruction layers`));
9113
9169
  return { sources: [...protectedSources, ...sources.slice(start)], skipped };
9114
9170
  }
9171
+ function composeSources(sources) {
9172
+ const hasTargetedReplacement = sources.some((source) => source.replacementScope !== undefined);
9173
+ if (!hasTargetedReplacement)
9174
+ return composeBroadReplaceSources(sources);
9175
+ const selected = [];
9176
+ const skipped = [];
9177
+ for (const source of sources) {
9178
+ const targetNormalizedId = targetedReplacementTarget(source);
9179
+ if (targetNormalizedId !== null) {
9180
+ const targetIndex = selected.findIndex((candidate) => candidate.normalizedId === targetNormalizedId);
9181
+ if (targetIndex < 0) {
9182
+ throw new Error(`Targeted replacement source "${source.id}" cannot replace "${targetNormalizedId}": ` + "the earlier target was already removed.");
9183
+ }
9184
+ const target = selected[targetIndex];
9185
+ if (target.nonOverridable) {
9186
+ throw new Error(`Targeted replacement source "${source.id}" cannot replace non-overridable source "${target.id}".`);
9187
+ }
9188
+ selected.splice(targetIndex, 1);
9189
+ skipped.push(skippedSource(target, `superseded by "${source.id}": targeted replacement ${source.replacementScope} ` + `removed exactly source "${target.id}"`));
9190
+ selected.push({
9191
+ ...source,
9192
+ provenance: {
9193
+ ...source.provenance ?? {},
9194
+ targetedReplacement: {
9195
+ scope: source.replacementScope,
9196
+ targetSourceId: target.id,
9197
+ targetNormalizedSourceId: target.normalizedId
9198
+ }
9199
+ }
9200
+ });
9201
+ continue;
9202
+ }
9203
+ if (source.resolvedMerge === "replace") {
9204
+ const retained = selected.filter((candidate) => candidate.nonOverridable);
9205
+ for (const candidate of selected) {
9206
+ if (candidate.nonOverridable)
9207
+ continue;
9208
+ skipped.push(skippedSource(candidate, `superseded by "${source.id}": a replace-merge source discards earlier overridable instruction layers`));
9209
+ }
9210
+ selected.length = 0;
9211
+ selected.push(...retained, source);
9212
+ continue;
9213
+ }
9214
+ selected.push(source);
9215
+ }
9216
+ return { sources: selected, skipped };
9217
+ }
9115
9218
  function sectionForSource(source) {
9116
9219
  const parts = [
9117
9220
  `<!-- ${SESSION_RENDER_MANAGED_MARKER}. Do not edit this generated file directly. -->`,
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import type { SessionRenderFile, SessionRenderManifest, SessionRenderMode, SessionRenderTool } from "./session-render.js";
3
3
  export declare const PROJECT_CONTEXT_SCHEMA: "hasna.projects.project_context_bundle.v1";
4
+ export declare const PROJECT_CONTEXT_SCHEMA_V2: "hasna.projects.project_context_bundle.v2";
4
5
  export declare const PROJECT_CONTEXT_MAX_INPUT_BYTES: number;
5
6
  export declare const PROJECT_CONTEXT_MAX_RENDERED_BYTES: number;
6
7
  export declare const PROJECT_CONTEXT_MAX_APPROX_TOKENS = 1000;
@@ -44,7 +45,7 @@ export declare const LEGACY_CONFIGS_PACKAGE: "@hasna/configs";
44
45
  export declare const LEGACY_CONFIGS_COMPAT_VERSION: "0.2.45";
45
46
  export declare const LEGACY_CONFIGS_EXECUTABLE: "configs";
46
47
  declare const projectContextBundleSchema: z.ZodObject<{
47
- schema: z.ZodLiteral<"hasna.projects.project_context_bundle.v1">;
48
+ schema: z.ZodEnum<["hasna.projects.project_context_bundle.v1", "hasna.projects.project_context_bundle.v2"]>;
48
49
  generated_at: z.ZodEffects<z.ZodString, string, string>;
49
50
  hash: z.ZodString;
50
51
  revision: z.ZodEffects<z.ZodString, string, string>;
@@ -201,7 +202,7 @@ declare const projectContextBundleSchema: z.ZodObject<{
201
202
  status: "active" | "archived" | "deleted";
202
203
  path: string | null;
203
204
  };
204
- schema: "hasna.projects.project_context_bundle.v1";
205
+ schema: "hasna.projects.project_context_bundle.v1" | "hasna.projects.project_context_bundle.v2";
205
206
  generated_at: string;
206
207
  hash: string;
207
208
  revision: string;
@@ -251,7 +252,7 @@ declare const projectContextBundleSchema: z.ZodObject<{
251
252
  status: "active" | "archived" | "deleted";
252
253
  path: string | null;
253
254
  };
254
- schema: "hasna.projects.project_context_bundle.v1";
255
+ schema: "hasna.projects.project_context_bundle.v1" | "hasna.projects.project_context_bundle.v2";
255
256
  generated_at: string;
256
257
  hash: string;
257
258
  revision: string;
@@ -1 +1 @@
1
- {"version":3,"file":"project-context.d.ts","sourceRoot":"","sources":["../../src/lib/project-context.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAQ1H,eAAO,MAAM,sBAAsB,EAAG,0CAAmD,CAAC;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,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,UAAU,CAAC,EAAE;QACX,cAAc,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;KAClD,CAAC;CACH,GAAG,IAAI,CAkEP;AAwPD,wBAAgB,+BAA+B,CAAC,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAMpG;AAMD,wBAAgB,gCAAgC,IAAI;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;CAC1B,CAOA"}
@@ -249,6 +249,7 @@ export declare const SESSION_RENDER_SHARED_MANAGED_DIRS: readonly string[];
249
249
  export declare const SESSION_RENDER_EXCLUSIVE_MANAGED_PATHS: readonly string[];
250
250
  export declare const SESSION_LAYER_RANK: Record<SessionInstructionLayer, number>;
251
251
  export declare function normalizeSessionInstructionLayer(value: unknown): SessionInstructionLayer;
252
+ export declare function normalizeSessionInstructionSourceId(value: string): string;
252
253
  export declare function cleanSessionPathInput(path: string): string;
253
254
  export declare function resolveSessionPath(path: string): string;
254
255
  export declare function resolveSessionTargetOwnership(input: Pick<SessionRenderInput, "tool" | "profile" | "projectRoot">, target: {
@@ -1 +1 @@
1
- {"version":3,"file":"session-render.d.ts","sourceRoot":"","sources":["../../src/lib/session-render.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAehD,OAAO,EAML,KAAK,0BAA0B,EAChC,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAEL,0BAA0B,EAI1B,qBAAqB,EAEtB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,uCAAuC,EACvC,6BAA6B,EAC7B,gCAAgC,EAChC,qCAAqC,EACrC,qBAAqB,EACrB,oCAAoC,GACrC,MAAM,8BAA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KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,CAAC,EAAE,MAAM,EAAE;IACzH,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,uBAAuB,CAAC;CACrC,GAAG,kBAAkB,CAqDrB;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,kBAAkB,GAAG,iBAAiB,CAgL9E;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,wBAAwB,CAUrG;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAC,EAC3E,KAAK,SAAI,EACT,KAAK,CAAC,EAAE,uBAAuB,GAC9B,wBAAwB,CA4B1B;AAED,wBAAgB,oCAAoC,CAClD,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,EAAE,iBAAiB,GACtB,6BAA6B,CAoF/B;AA2CD,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,OAAO,EACd,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9E,wBAAwB,EAAE,CAmB5B"}
package/dist/mcp/index.js CHANGED
@@ -5729,11 +5729,13 @@ function isSafeSingleLine(value) {
5729
5729
  function isSafeCommandArgument(value) {
5730
5730
  return /^[A-Za-z0-9_./:@+=,-]+$/.test(value) && !value.includes("://") && !value.startsWith("-") || /^--[a-z][a-z0-9-]*$/.test(value);
5731
5731
  }
5732
- var PROJECT_CONTEXT_SCHEMA = "hasna.projects.project_context_bundle.v1", PROJECT_CONTEXT_MAX_INPUT_BYTES, PROJECT_CONTEXT_MAX_RENDERED_BYTES, PROJECT_CONTEXT_MAX_COMMANDS = 6, PROJECT_CONTEXT_FRAGMENT_PATH = ".hasna/instructions/project-context.md", PROJECT_CONTEXT_CACHE_SCHEMA = "hasna.instructions.project-context-cache/v1", SESSION_COMPATIBILITY_MANIFEST_MAX_BYTES, FOREIGN_INPUT_MAX_BYTES, SESSION_MANAGED_OUTPUT_MAX_BYTES, SESSION_MANAGED_OUTPUT_WARN_BYTES, PROJECT_CONTEXT_LOCK_STALE_MS, PROJECT_KINDS, PROJECT_STATUSES, LINK_STATES, RESOLUTION_SOURCES, safeId, nullableId, producerSlug, producerName, safeOptionalDisplay, isoTimestamp, revisionSchema, hashSchema, absolutePath, commandArg, commandSchema, projectContextBundleSchema, storedManifestProjectContextSchema, storedManifestFileSchema, storedManifestObservationSchema, projectContextMetadataSnapshotSchema, projectContextCacheSchema;
5732
+ var PROJECT_CONTEXT_SCHEMA = "hasna.projects.project_context_bundle.v1", PROJECT_CONTEXT_SCHEMA_V2 = "hasna.projects.project_context_bundle.v2", PROJECT_CONTEXT_SUPPORTED_SCHEMAS, projectContextSchema, PROJECT_CONTEXT_MAX_INPUT_BYTES, PROJECT_CONTEXT_MAX_RENDERED_BYTES, PROJECT_CONTEXT_MAX_COMMANDS = 6, PROJECT_CONTEXT_FRAGMENT_PATH = ".hasna/instructions/project-context.md", PROJECT_CONTEXT_CACHE_SCHEMA = "hasna.instructions.project-context-cache/v1", SESSION_COMPATIBILITY_MANIFEST_MAX_BYTES, FOREIGN_INPUT_MAX_BYTES, SESSION_MANAGED_OUTPUT_MAX_BYTES, SESSION_MANAGED_OUTPUT_WARN_BYTES, PROJECT_CONTEXT_LOCK_STALE_MS, PROJECT_KINDS, PROJECT_STATUSES, LINK_STATES, RESOLUTION_SOURCES, safeId, nullableId, producerSlug, producerName, safeOptionalDisplay, isoTimestamp, revisionSchema, hashSchema, absolutePath, commandArg, commandSchema, projectContextBundleSchema, storedManifestProjectContextSchema, storedManifestFileSchema, storedManifestObservationSchema, projectContextMetadataSnapshotSchema, projectContextCacheSchema;
5733
5733
  var init_project_context = __esm(() => {
5734
5734
  init_zod();
5735
5735
  init_redact();
5736
5736
  init_session_render_contract();
5737
+ PROJECT_CONTEXT_SUPPORTED_SCHEMAS = [PROJECT_CONTEXT_SCHEMA, PROJECT_CONTEXT_SCHEMA_V2];
5738
+ projectContextSchema = exports_external.enum(PROJECT_CONTEXT_SUPPORTED_SCHEMAS);
5737
5739
  PROJECT_CONTEXT_MAX_INPUT_BYTES = 8 * 1024;
5738
5740
  PROJECT_CONTEXT_MAX_RENDERED_BYTES = 4 * 1024;
5739
5741
  SESSION_COMPATIBILITY_MANIFEST_MAX_BYTES = 8 * 1024 * 1024;
@@ -5772,7 +5774,7 @@ var init_project_context = __esm(() => {
5772
5774
  argv: exports_external.array(commandArg).min(1).max(8)
5773
5775
  }).strict();
5774
5776
  projectContextBundleSchema = exports_external.object({
5775
- schema: exports_external.literal(PROJECT_CONTEXT_SCHEMA),
5777
+ schema: projectContextSchema,
5776
5778
  generated_at: isoTimestamp,
5777
5779
  hash: hashSchema,
5778
5780
  revision: revisionSchema,
@@ -5820,7 +5822,7 @@ var init_project_context = __esm(() => {
5820
5822
  commands: exports_external.array(commandSchema).max(PROJECT_CONTEXT_MAX_COMMANDS)
5821
5823
  }).strict();
5822
5824
  storedManifestProjectContextSchema = exports_external.object({
5823
- schema: exports_external.literal(PROJECT_CONTEXT_SCHEMA),
5825
+ schema: projectContextSchema,
5824
5826
  projectId: safeId,
5825
5827
  revision: revisionSchema,
5826
5828
  hash: hashSchema,
@@ -7258,7 +7260,7 @@ var init_sync_dir = __esm(() => {
7258
7260
  var require_package = __commonJS((exports, module) => {
7259
7261
  module.exports = {
7260
7262
  name: "@hasna/instructions",
7261
- version: "0.4.26",
7263
+ version: "0.4.27",
7262
7264
  description: "AI coding agent instruction & configuration manager \u2014 store, version, apply, and share all your AI coding configs. CLI + MCP + HTTP API (instructions-serve) + generated SDK + Dashboard.",
7263
7265
  type: "module",
7264
7266
  main: "dist/index.js",
@@ -3141,6 +3141,27 @@ function buildV1OpenApiDocument(version = getPackageVersion()) {
3141
3141
  variables: { type: "object" }
3142
3142
  }
3143
3143
  },
3144
+ AddProfileConfigInput: {
3145
+ type: "object",
3146
+ required: ["config_id"],
3147
+ properties: {
3148
+ config_id: { type: "string" }
3149
+ }
3150
+ },
3151
+ ProfileConfigAddedResponse: {
3152
+ type: "object",
3153
+ required: ["added"],
3154
+ properties: {
3155
+ added: { type: "boolean", const: true }
3156
+ }
3157
+ },
3158
+ ProfileConfigRemovedResponse: {
3159
+ type: "object",
3160
+ required: ["removed"],
3161
+ properties: {
3162
+ removed: { type: "boolean", const: true }
3163
+ }
3164
+ },
3144
3165
  ProfileWithConfigs: {
3145
3166
  type: "object",
3146
3167
  properties: {
@@ -3378,6 +3399,55 @@ function buildV1OpenApiDocument(version = getPackageVersion()) {
3378
3399
  responses: { "200": { content: { "application/json": { schema: { type: "object", properties: { deleted: { type: "boolean" }, id: { type: "string" } } } } } } }
3379
3400
  }
3380
3401
  },
3402
+ "/v1/profiles/{id}/configs": {
3403
+ post: {
3404
+ operationId: "addConfigToProfile",
3405
+ summary: "Add a config to a profile",
3406
+ description: "Requires an API key with the `instructions:write` scope.",
3407
+ security: [{ apiKey: [] }],
3408
+ parameters: [
3409
+ { name: "id", in: "path", required: true, schema: { type: "string" } }
3410
+ ],
3411
+ requestBody: {
3412
+ required: true,
3413
+ content: {
3414
+ "application/json": {
3415
+ schema: { $ref: "#/components/schemas/AddProfileConfigInput" }
3416
+ }
3417
+ }
3418
+ },
3419
+ responses: {
3420
+ "200": {
3421
+ content: {
3422
+ "application/json": {
3423
+ schema: { $ref: "#/components/schemas/ProfileConfigAddedResponse" }
3424
+ }
3425
+ }
3426
+ }
3427
+ }
3428
+ }
3429
+ },
3430
+ "/v1/profiles/{id}/configs/{configId}": {
3431
+ delete: {
3432
+ operationId: "removeConfigFromProfile",
3433
+ summary: "Remove a config from a profile",
3434
+ description: "Requires an API key with the `instructions:write` scope.",
3435
+ security: [{ apiKey: [] }],
3436
+ parameters: [
3437
+ { name: "id", in: "path", required: true, schema: { type: "string" } },
3438
+ { name: "configId", in: "path", required: true, schema: { type: "string" } }
3439
+ ],
3440
+ responses: {
3441
+ "200": {
3442
+ content: {
3443
+ "application/json": {
3444
+ schema: { $ref: "#/components/schemas/ProfileConfigRemovedResponse" }
3445
+ }
3446
+ }
3447
+ }
3448
+ }
3449
+ }
3450
+ },
3381
3451
  "/v1/stats": {
3382
3452
  get: {
3383
3453
  operationId: "getStats",
@@ -198,6 +198,35 @@ export declare function buildV1OpenApiDocument(version?: string): {
198
198
  };
199
199
  };
200
200
  };
201
+ AddProfileConfigInput: {
202
+ type: string;
203
+ required: string[];
204
+ properties: {
205
+ config_id: {
206
+ type: string;
207
+ };
208
+ };
209
+ };
210
+ ProfileConfigAddedResponse: {
211
+ type: string;
212
+ required: string[];
213
+ properties: {
214
+ added: {
215
+ type: string;
216
+ const: boolean;
217
+ };
218
+ };
219
+ };
220
+ ProfileConfigRemovedResponse: {
221
+ type: string;
222
+ required: string[];
223
+ properties: {
224
+ removed: {
225
+ type: string;
226
+ const: boolean;
227
+ };
228
+ };
229
+ };
201
230
  ProfileWithConfigs: {
202
231
  type: string;
203
232
  properties: {
@@ -777,6 +806,74 @@ export declare function buildV1OpenApiDocument(version?: string): {
777
806
  };
778
807
  };
779
808
  };
809
+ "/v1/profiles/{id}/configs": {
810
+ post: {
811
+ operationId: string;
812
+ summary: string;
813
+ description: string;
814
+ security: {
815
+ apiKey: never[];
816
+ }[];
817
+ parameters: {
818
+ name: string;
819
+ in: string;
820
+ required: boolean;
821
+ schema: {
822
+ type: string;
823
+ };
824
+ }[];
825
+ requestBody: {
826
+ required: boolean;
827
+ content: {
828
+ "application/json": {
829
+ schema: {
830
+ $ref: string;
831
+ };
832
+ };
833
+ };
834
+ };
835
+ responses: {
836
+ "200": {
837
+ content: {
838
+ "application/json": {
839
+ schema: {
840
+ $ref: string;
841
+ };
842
+ };
843
+ };
844
+ };
845
+ };
846
+ };
847
+ };
848
+ "/v1/profiles/{id}/configs/{configId}": {
849
+ delete: {
850
+ operationId: string;
851
+ summary: string;
852
+ description: string;
853
+ security: {
854
+ apiKey: never[];
855
+ }[];
856
+ parameters: {
857
+ name: string;
858
+ in: string;
859
+ required: boolean;
860
+ schema: {
861
+ type: string;
862
+ };
863
+ }[];
864
+ responses: {
865
+ "200": {
866
+ content: {
867
+ "application/json": {
868
+ schema: {
869
+ $ref: string;
870
+ };
871
+ };
872
+ };
873
+ };
874
+ };
875
+ };
876
+ };
780
877
  "/v1/stats": {
781
878
  get: {
782
879
  operationId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/server/openapi.ts"],"names":[],"mappings":"AA4CA,wBAAgB,sBAAsB,CAAC,OAAO,SAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmXnE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/instructions",
3
- "version": "0.4.26",
3
+ "version": "0.4.27",
4
4
  "description": "AI coding agent instruction & configuration manager \u2014 store, version, apply, and share all your AI coding configs. CLI + MCP + HTTP API (instructions-serve) + generated SDK + Dashboard.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",