opencode-rehydra-core 0.14.1 → 0.14.3
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.
|
@@ -14,6 +14,20 @@
|
|
|
14
14
|
import type { AnonymizerConfig } from "../../core/anonymizer.js";
|
|
15
15
|
import type { AnonymizationPolicy } from "../../types/index.js";
|
|
16
16
|
import type { RehydraPluginOptions } from "../types.js";
|
|
17
|
+
/**
|
|
18
|
+
* Resolves the canonical OpenCode config directory (`$XDG_CONFIG_HOME/opencode`
|
|
19
|
+
* or `$HOME/.config/opencode`). Returns `undefined` when no usable path can be
|
|
20
|
+
* derived. Honours `XDG_CONFIG_HOME` on every platform so distros overriding
|
|
21
|
+
* the spec keep working, and falls back to `~/.config/opencode` per the
|
|
22
|
+
* OpenCode XDG spec.
|
|
23
|
+
*/
|
|
24
|
+
export declare function opencodeConfigDirectory(env?: NodeJS.ProcessEnv, homedirFn?: () => string): string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Heuristic: returns `true` when `projectDir` is somewhere underneath (or equal
|
|
27
|
+
* to) `opencodeConfigDir`. Mirrors a directory-equality check rather than
|
|
28
|
+
* relying on a separator-suffix workaround.
|
|
29
|
+
*/
|
|
30
|
+
export declare function shouldUseOpencodeConfigDir(projectDir: string, opencodeConfigDir: string): boolean;
|
|
17
31
|
/**
|
|
18
32
|
* Validates and normalizes raw OpenCode plugin options.
|
|
19
33
|
*
|
|
@@ -26,10 +40,19 @@ import type { RehydraPluginOptions } from "../types.js";
|
|
|
26
40
|
*/
|
|
27
41
|
export declare function normalizePluginOptions(raw: unknown, ctxDirectory: string): RehydraPluginOptions;
|
|
28
42
|
/**
|
|
29
|
-
* Resolves the anonymizer configuration
|
|
30
|
-
*
|
|
43
|
+
* Resolves the anonymizer configuration.
|
|
44
|
+
*
|
|
45
|
+
* The base directory for `envFiles` paths is picked in this order:
|
|
46
|
+
* 1. `anonymizer.secrets.envBaseDirectory` if the user configured it.
|
|
47
|
+
* 2. The OpenCode config directory (`~/.config/opencode` on every supported
|
|
48
|
+
* platform) — when the user has not configured their own `anonymizer`
|
|
49
|
+
* block. This means a single `~/.config/opencode/.env` shared across all
|
|
50
|
+
* projects works without per-project paths, while project-local discovery
|
|
51
|
+
* stays opt-in by setting `secrets.envBaseDirectory` explicitly.
|
|
52
|
+
*
|
|
53
|
+
* 3. The project directory (final fallback).
|
|
31
54
|
*/
|
|
32
|
-
export declare function anonymizerConfigFromOptions(options: RehydraPluginOptions, ctxDirectory: string): AnonymizerConfig;
|
|
55
|
+
export declare function anonymizerConfigFromOptions(options: RehydraPluginOptions, ctxDirectory: string, env?: NodeJS.ProcessEnv, homedirFn?: () => string): AnonymizerConfig;
|
|
33
56
|
/**
|
|
34
57
|
* Builds the policy override implied by `disableTypes`.
|
|
35
58
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/opencode-plugin/v2/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/opencode-plugin/v2/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAMjE,OAAO,KAAK,EAAE,mBAAmB,EAA4B,MAAM,sBAAsB,CAAC;AAC1F,OAAO,KAAK,EAAe,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAMrE;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,SAAS,GAAE,MAAM,MAAgB,GAChC,MAAM,GAAG,SAAS,CAYpB;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,EAClB,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAKT;AA8CD;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,EACZ,YAAY,EAAE,MAAM,GACnB,oBAAoB,CA2BtB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,oBAAoB,EAC7B,YAAY,EAAE,MAAM,EACpB,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,SAAS,GAAE,MAAM,MAAgB,GAChC,gBAAgB,CAuBlB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAuB1C"}
|
|
@@ -11,10 +11,44 @@
|
|
|
11
11
|
* - {@link policyFromOptions} keeps URL/IP_ADDRESS disabled by default while
|
|
12
12
|
* re-adding the opt-in secret types the anonymizer enables internally.
|
|
13
13
|
*/
|
|
14
|
+
import { homedir } from "node:os";
|
|
15
|
+
import { join } from "node:path";
|
|
14
16
|
import { PIIType, SECRET_PII_TYPES, createDefaultPolicy, } from "../../types/index.js";
|
|
15
17
|
const DEFAULT_DISABLE_TYPES = ["URL", "IP_ADDRESS"];
|
|
16
18
|
const DEFAULT_ENV_FILES = ["**/.env*"];
|
|
17
19
|
const DEFAULT_MIN_VALUE_LENGTH = 4;
|
|
20
|
+
/**
|
|
21
|
+
* Resolves the canonical OpenCode config directory (`$XDG_CONFIG_HOME/opencode`
|
|
22
|
+
* or `$HOME/.config/opencode`). Returns `undefined` when no usable path can be
|
|
23
|
+
* derived. Honours `XDG_CONFIG_HOME` on every platform so distros overriding
|
|
24
|
+
* the spec keep working, and falls back to `~/.config/opencode` per the
|
|
25
|
+
* OpenCode XDG spec.
|
|
26
|
+
*/
|
|
27
|
+
export function opencodeConfigDirectory(env = process.env, homedirFn = homedir) {
|
|
28
|
+
const xdg = env.XDG_CONFIG_HOME;
|
|
29
|
+
if (typeof xdg === "string" && xdg.trim().length > 0) {
|
|
30
|
+
return join(xdg, "opencode");
|
|
31
|
+
}
|
|
32
|
+
const candidates = [env.HOME, env.USERPROFILE, homedirFn()];
|
|
33
|
+
for (const candidate of candidates) {
|
|
34
|
+
if (typeof candidate === "string" && candidate.trim().length > 0) {
|
|
35
|
+
return join(candidate, ".config", "opencode");
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Heuristic: returns `true` when `projectDir` is somewhere underneath (or equal
|
|
42
|
+
* to) `opencodeConfigDir`. Mirrors a directory-equality check rather than
|
|
43
|
+
* relying on a separator-suffix workaround.
|
|
44
|
+
*/
|
|
45
|
+
export function shouldUseOpencodeConfigDir(projectDir, opencodeConfigDir) {
|
|
46
|
+
if (projectDir === opencodeConfigDir)
|
|
47
|
+
return false;
|
|
48
|
+
const withSep = opencodeConfigDir.replace(/[\/\\]+$/, "") + "/";
|
|
49
|
+
const candidate = projectDir.replace(/[\/\\]+$/, "");
|
|
50
|
+
return candidate.startsWith(withSep);
|
|
51
|
+
}
|
|
18
52
|
function isRecord(value) {
|
|
19
53
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
20
54
|
}
|
|
@@ -44,13 +78,12 @@ function asTagFormat(value) {
|
|
|
44
78
|
const keyword = typeof value.keyword === "string" ? value.keyword : undefined;
|
|
45
79
|
return { open: value.open, close: value.close, keyword };
|
|
46
80
|
}
|
|
47
|
-
function defaultSecretsConfig(options
|
|
81
|
+
function defaultSecretsConfig(options) {
|
|
48
82
|
return {
|
|
49
83
|
enabled: true,
|
|
50
84
|
envFiles: options.envFiles ?? DEFAULT_ENV_FILES,
|
|
51
85
|
redactValues: options.redactValues,
|
|
52
86
|
minValueLength: options.minValueLength ?? DEFAULT_MIN_VALUE_LENGTH,
|
|
53
|
-
envBaseDirectory,
|
|
54
87
|
};
|
|
55
88
|
}
|
|
56
89
|
/**
|
|
@@ -77,27 +110,45 @@ export function normalizePluginOptions(raw, ctxDirectory) {
|
|
|
77
110
|
if (isRecord(source.policy)) {
|
|
78
111
|
normalized.policy = source.policy;
|
|
79
112
|
}
|
|
113
|
+
// Only forward `anonymizer` when the user actually configured one.
|
|
114
|
+
// Leaving it `undefined` lets {@link anonymizerConfigFromOptions} distinguish
|
|
115
|
+
// "user did not configure" from "user configured an empty block", which is
|
|
116
|
+
// required to honour the global `~/.config/opencode` default for
|
|
117
|
+
// `secrets.envBaseDirectory`.
|
|
80
118
|
normalized.anonymizer = isRecord(source.anonymizer)
|
|
81
119
|
? source.anonymizer
|
|
82
|
-
:
|
|
120
|
+
: undefined;
|
|
83
121
|
return normalized;
|
|
84
122
|
}
|
|
85
123
|
/**
|
|
86
|
-
* Resolves the anonymizer configuration
|
|
87
|
-
*
|
|
124
|
+
* Resolves the anonymizer configuration.
|
|
125
|
+
*
|
|
126
|
+
* The base directory for `envFiles` paths is picked in this order:
|
|
127
|
+
* 1. `anonymizer.secrets.envBaseDirectory` if the user configured it.
|
|
128
|
+
* 2. The OpenCode config directory (`~/.config/opencode` on every supported
|
|
129
|
+
* platform) — when the user has not configured their own `anonymizer`
|
|
130
|
+
* block. This means a single `~/.config/opencode/.env` shared across all
|
|
131
|
+
* projects works without per-project paths, while project-local discovery
|
|
132
|
+
* stays opt-in by setting `secrets.envBaseDirectory` explicitly.
|
|
133
|
+
*
|
|
134
|
+
* 3. The project directory (final fallback).
|
|
88
135
|
*/
|
|
89
|
-
export function anonymizerConfigFromOptions(options, ctxDirectory) {
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
136
|
+
export function anonymizerConfigFromOptions(options, ctxDirectory, env = process.env, homedirFn = homedir) {
|
|
137
|
+
const userProvided = options.anonymizer !== undefined;
|
|
138
|
+
const base = userProvided
|
|
139
|
+
? options.anonymizer
|
|
140
|
+
: { secrets: defaultSecretsConfig(options) };
|
|
93
141
|
if (base.secrets === undefined) {
|
|
94
142
|
return base;
|
|
95
143
|
}
|
|
144
|
+
const envBaseDirectory = base.secrets.envBaseDirectory ?? (userProvided
|
|
145
|
+
? ctxDirectory
|
|
146
|
+
: (opencodeConfigDirectory(env, homedirFn) ?? ctxDirectory));
|
|
96
147
|
return {
|
|
97
148
|
...base,
|
|
98
149
|
secrets: {
|
|
99
150
|
...base.secrets,
|
|
100
|
-
envBaseDirectory
|
|
151
|
+
envBaseDirectory,
|
|
101
152
|
},
|
|
102
153
|
};
|
|
103
154
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/opencode-plugin/v2/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/opencode-plugin/v2/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EACL,OAAO,EACP,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAI9B,MAAM,qBAAqB,GAAkB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;AACnE,MAAM,iBAAiB,GAAa,CAAC,UAAU,CAAC,CAAC;AACjD,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAEnC;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAAyB,OAAO,CAAC,GAAG,EACpC,YAA0B,OAAO;IAEjC,MAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC;IAChC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrD,OAAO,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IAC/B,CAAC;IACD,MAAM,UAAU,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC;IAC5D,KAAK,MAAM,SAAS,IAAI,UAAU,E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QAClC,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,iBAAiB,EAAE,eAAe,EAAE,CAAC;AACnE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-rehydra-core",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.3",
|
|
4
4
|
"description": "On-device PII anonymization core SDK (opencode-rehydra-core). Ships the OpenCode plugin as opencode-rehydar.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -84,6 +84,13 @@
|
|
|
84
84
|
"test:streaming": "npx tsx scripts/test-streaming.ts",
|
|
85
85
|
"lint": "eslint src --ext .ts",
|
|
86
86
|
"clean": "rm -rf dist",
|
|
87
|
+
"publish:core": "npm run build && npm publish --access public",
|
|
88
|
+
"publish:plugin": "npm run build && cd packages/opencode-plugin && npm publish --access public && cd ../..",
|
|
89
|
+
"publish:all": "npm run build && npm publish --access public && cd packages/opencode-plugin && npm publish --access public && cd ../..",
|
|
90
|
+
"pack:dry-run": "npm pack --dry-run && cd packages/opencode-plugin && npm pack --dry-run && cd ../..",
|
|
91
|
+
"version:patch": "npm version patch -m \"%s\"",
|
|
92
|
+
"version:minor": "npm version minor -m \"%s\"",
|
|
93
|
+
"version:major": "npm version major -m \"%s\"",
|
|
87
94
|
"setup:ner": "bash scripts/setup-ner-model.sh --quantize",
|
|
88
95
|
"setup:ner:standard": "bash scripts/setup-ner-model.sh",
|
|
89
96
|
"setup:ner:upload": "bash scripts/setup-ner-model.sh --quantize --upload",
|