@hegel-dev/companion 1.0.10 → 1.0.11
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/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Hegel Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/format.js
CHANGED
|
@@ -6,7 +6,7 @@ const SEVERITY_ICON = {
|
|
|
6
6
|
export function formatConcerns(concerns) {
|
|
7
7
|
if (concerns.length === 0)
|
|
8
8
|
return "";
|
|
9
|
-
const lines = ["⚖️ Hegel:"];
|
|
9
|
+
const lines = ["⚖️ Hegel [Layer 1]:"];
|
|
10
10
|
for (const c of concerns) {
|
|
11
11
|
const icon = SEVERITY_ICON[c.severity] ?? "•";
|
|
12
12
|
lines.push(`${icon} [${c.category}] ${c.message}`);
|
|
@@ -22,8 +22,8 @@ export function formatBlockMessage(concerns) {
|
|
|
22
22
|
return formatConcerns(concerns);
|
|
23
23
|
const hasCritical = actionable.some((c) => c.severity === "critical");
|
|
24
24
|
const header = hasCritical
|
|
25
|
-
? "⛔ Hegel blocked this prompt:"
|
|
26
|
-
: "⚖️ Hegel paused this prompt — please review:";
|
|
25
|
+
? "⛔ Hegel [Layer 1] blocked this prompt:"
|
|
26
|
+
: "⚖️ Hegel [Layer 1] paused this prompt — please review:";
|
|
27
27
|
const lines = [header, ""];
|
|
28
28
|
for (const c of actionable) {
|
|
29
29
|
const icon = SEVERITY_ICON[c.severity] ?? "•";
|
package/dist/format.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAA2B;IAC5C,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;CACX,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,QAAmB;IAChD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,KAAK,GAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAA2B;IAC5C,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;CACX,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,QAAmB;IAChD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,KAAK,GAAa,CAAC,qBAAqB,CAAC,CAAC;IAChD,KAAK,MAAM,CAAC,IAAI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jB,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,kEAAkE,CAAC,CAAC;IACnF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
package/dist/prompts.js
CHANGED
|
@@ -31,7 +31,7 @@ ${STRICTNESS_GUIDANCE[strictness]}
|
|
|
31
31
|
Analyze the user prompt provided in $ARGUMENTS (the "prompt" field).
|
|
32
32
|
|
|
33
33
|
- If the prompt is adequate for its purpose, return ok=true.
|
|
34
|
-
- If there are genuine concerns, return ok=false with a concise reason (1-2 sentences) explaining what's missing and how to improve it.
|
|
34
|
+
- If there are genuine concerns, return ok=false with a concise reason (1-2 sentences) explaining what's missing and how to improve it. Start your reason with "[Layer 2] ".
|
|
35
35
|
- Do NOT be pedantic about short prompts if they are clear in context (e.g., "yes, proceed" after a detailed plan is fine).
|
|
36
36
|
- Do NOT flag prompts that are questions or requests for explanation.
|
|
37
37
|
- Do NOT flag follow-up directives that reference items from a previous AI response (e.g., "fix #3 and #5" referencing a numbered list the AI just provided).
|
|
@@ -59,7 +59,7 @@ ${STRICTNESS_GUIDANCE[strictness]}
|
|
|
59
59
|
Analyze the AI assistant's response provided in $ARGUMENTS (the "text" field).
|
|
60
60
|
|
|
61
61
|
- If the response appears reasonable and well-considered, return ok=true.
|
|
62
|
-
- If there are red flags the developer should notice, return ok=false with a concise reason (1-2 sentences) describing the concern.
|
|
62
|
+
- If there are red flags the developer should notice, return ok=false with a concise reason (1-2 sentences) describing the concern. Start your reason with "[Layer 2] ".
|
|
63
63
|
- Be practical — not every response needs a lecture. Focus on things that could lead to real problems.`;
|
|
64
64
|
}
|
|
65
65
|
//# sourceMappingURL=prompts.js.map
|
|
Binary file
|
package/package.json
CHANGED