@hasna/instructions 0.4.21 → 0.4.22
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/dist/cli/index.js +9 -2
- package/dist/index.js +10 -1
- package/dist/lib/sync.d.ts.map +1 -1
- package/dist/mcp/index.js +10 -3
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -12512,6 +12512,13 @@ function normalizeOutputs(outputs) {
|
|
|
12512
12512
|
function outputsEqual(a, b) {
|
|
12513
12513
|
return JSON.stringify(normalizeOutputs(a)) === JSON.stringify(normalizeOutputs(b));
|
|
12514
12514
|
}
|
|
12515
|
+
function normalizeKnownConfigSource(known, content) {
|
|
12516
|
+
if (known.name !== "bash-profile")
|
|
12517
|
+
return content;
|
|
12518
|
+
return content.split(`
|
|
12519
|
+
`).map((line) => line === UNGUARDED_LOCAL_ENV_HELPER ? GUARDED_LOCAL_ENV_HELPER : line).join(`
|
|
12520
|
+
`);
|
|
12521
|
+
}
|
|
12515
12522
|
function outputOwnerIdsByTarget(configs) {
|
|
12516
12523
|
const owners = new Map;
|
|
12517
12524
|
for (const config of configs) {
|
|
@@ -12683,7 +12690,7 @@ async function syncKnown(opts = {}) {
|
|
|
12683
12690
|
continue;
|
|
12684
12691
|
}
|
|
12685
12692
|
try {
|
|
12686
|
-
const rawContent = readFileSync6(abs, "utf-8");
|
|
12693
|
+
const rawContent = normalizeKnownConfigSource(known, readFileSync6(abs, "utf-8"));
|
|
12687
12694
|
if (rawContent.length > 500000) {
|
|
12688
12695
|
result.skipped.push(known.path + " (too large)");
|
|
12689
12696
|
continue;
|
|
@@ -12935,7 +12942,7 @@ function detectFormat(filePath) {
|
|
|
12935
12942
|
return "ini";
|
|
12936
12943
|
return "text";
|
|
12937
12944
|
}
|
|
12938
|
-
var CLAUDE_PROMPT_OUTPUTS, KNOWN_CONFIGS, PROJECT_CONFIG_FILES, CERTAIN_PLACEHOLDER_RE, ASSIGNED_PLACEHOLDER_RE;
|
|
12945
|
+
var CLAUDE_PROMPT_OUTPUTS, UNGUARDED_LOCAL_ENV_HELPER = '. "$HOME/.local/bin/env"', GUARDED_LOCAL_ENV_HELPER = '[ -r "$HOME/.local/bin/env" ] && . "$HOME/.local/bin/env"', KNOWN_CONFIGS, PROJECT_CONFIG_FILES, CERTAIN_PLACEHOLDER_RE, ASSIGNED_PLACEHOLDER_RE;
|
|
12939
12946
|
var init_sync = __esm(() => {
|
|
12940
12947
|
init_config_store();
|
|
12941
12948
|
init_apply();
|
package/dist/index.js
CHANGED
|
@@ -11844,6 +11844,15 @@ function normalizeOutputs(outputs) {
|
|
|
11844
11844
|
function outputsEqual(a, b) {
|
|
11845
11845
|
return JSON.stringify(normalizeOutputs(a)) === JSON.stringify(normalizeOutputs(b));
|
|
11846
11846
|
}
|
|
11847
|
+
var UNGUARDED_LOCAL_ENV_HELPER = '. "$HOME/.local/bin/env"';
|
|
11848
|
+
var GUARDED_LOCAL_ENV_HELPER = '[ -r "$HOME/.local/bin/env" ] && . "$HOME/.local/bin/env"';
|
|
11849
|
+
function normalizeKnownConfigSource(known, content) {
|
|
11850
|
+
if (known.name !== "bash-profile")
|
|
11851
|
+
return content;
|
|
11852
|
+
return content.split(`
|
|
11853
|
+
`).map((line) => line === UNGUARDED_LOCAL_ENV_HELPER ? GUARDED_LOCAL_ENV_HELPER : line).join(`
|
|
11854
|
+
`);
|
|
11855
|
+
}
|
|
11847
11856
|
function outputOwnerIdsByTarget(configs) {
|
|
11848
11857
|
const owners = new Map;
|
|
11849
11858
|
for (const config of configs) {
|
|
@@ -12062,7 +12071,7 @@ async function syncKnown(opts = {}) {
|
|
|
12062
12071
|
continue;
|
|
12063
12072
|
}
|
|
12064
12073
|
try {
|
|
12065
|
-
const rawContent = readFileSync9(abs, "utf-8");
|
|
12074
|
+
const rawContent = normalizeKnownConfigSource(known, readFileSync9(abs, "utf-8"));
|
|
12066
12075
|
if (rawContent.length > 500000) {
|
|
12067
12076
|
result.skipped.push(known.path + " (too large)");
|
|
12068
12077
|
continue;
|
package/dist/lib/sync.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/lib/sync.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACrH,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAW/E,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;CAC1B;AAED,eAAO,MAAM,qBAAqB,EAAE,YAAY,EAQ/C,CAAC;
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/lib/sync.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACrH,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAW/E,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM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B;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAkJD,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,iBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,CA+B9F;AAGD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAU/D;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAgBzD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAQ3D;AAGD,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/mcp/index.js
CHANGED
|
@@ -6643,6 +6643,13 @@ function normalizeOutputs(outputs) {
|
|
|
6643
6643
|
function outputsEqual(a, b) {
|
|
6644
6644
|
return JSON.stringify(normalizeOutputs(a)) === JSON.stringify(normalizeOutputs(b));
|
|
6645
6645
|
}
|
|
6646
|
+
function normalizeKnownConfigSource(known, content) {
|
|
6647
|
+
if (known.name !== "bash-profile")
|
|
6648
|
+
return content;
|
|
6649
|
+
return content.split(`
|
|
6650
|
+
`).map((line) => line === UNGUARDED_LOCAL_ENV_HELPER ? GUARDED_LOCAL_ENV_HELPER : line).join(`
|
|
6651
|
+
`);
|
|
6652
|
+
}
|
|
6646
6653
|
function outputOwnerIdsByTarget(configs) {
|
|
6647
6654
|
const owners = new Map;
|
|
6648
6655
|
for (const config of configs) {
|
|
@@ -6814,7 +6821,7 @@ async function syncKnown(opts = {}) {
|
|
|
6814
6821
|
continue;
|
|
6815
6822
|
}
|
|
6816
6823
|
try {
|
|
6817
|
-
const rawContent = readFileSync3(abs, "utf-8");
|
|
6824
|
+
const rawContent = normalizeKnownConfigSource(known, readFileSync3(abs, "utf-8"));
|
|
6818
6825
|
if (rawContent.length > 500000) {
|
|
6819
6826
|
result.skipped.push(known.path + " (too large)");
|
|
6820
6827
|
continue;
|
|
@@ -7066,7 +7073,7 @@ function detectFormat(filePath) {
|
|
|
7066
7073
|
return "ini";
|
|
7067
7074
|
return "text";
|
|
7068
7075
|
}
|
|
7069
|
-
var CLAUDE_PROMPT_OUTPUTS, KNOWN_CONFIGS, PROJECT_CONFIG_FILES, CERTAIN_PLACEHOLDER_RE, ASSIGNED_PLACEHOLDER_RE;
|
|
7076
|
+
var CLAUDE_PROMPT_OUTPUTS, UNGUARDED_LOCAL_ENV_HELPER = '. "$HOME/.local/bin/env"', GUARDED_LOCAL_ENV_HELPER = '[ -r "$HOME/.local/bin/env" ] && . "$HOME/.local/bin/env"', KNOWN_CONFIGS, PROJECT_CONFIG_FILES, CERTAIN_PLACEHOLDER_RE, ASSIGNED_PLACEHOLDER_RE;
|
|
7070
7077
|
var init_sync = __esm(() => {
|
|
7071
7078
|
init_config_store();
|
|
7072
7079
|
init_apply();
|
|
@@ -7229,7 +7236,7 @@ var init_sync_dir = __esm(() => {
|
|
|
7229
7236
|
var require_package = __commonJS((exports, module) => {
|
|
7230
7237
|
module.exports = {
|
|
7231
7238
|
name: "@hasna/instructions",
|
|
7232
|
-
version: "0.4.
|
|
7239
|
+
version: "0.4.22",
|
|
7233
7240
|
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.",
|
|
7234
7241
|
type: "module",
|
|
7235
7242
|
main: "dist/index.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/instructions",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.22",
|
|
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",
|