@gaunt-sloth/core 2.0.0-alpha.2 → 2.0.0-alpha.4
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/.gsloth.code.md +10 -0
- package/README.md +3 -4
- package/dist/config/defaults.d.ts +84 -0
- package/dist/config/defaults.js +97 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/loader.d.ts +88 -0
- package/dist/config/loader.js +604 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/schema.d.ts +471 -0
- package/dist/config/schema.js +301 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/config/shell-policy.d.ts +212 -0
- package/dist/config/shell-policy.js +142 -0
- package/dist/config/shell-policy.js.map +1 -0
- package/dist/config/types.d.ts +453 -0
- package/dist/config/types.js +12 -0
- package/dist/config/types.js.map +1 -0
- package/dist/config.d.ts +18 -647
- package/dist/config.js +15 -516
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +6 -0
- package/dist/constants.js +6 -0
- package/dist/constants.js.map +1 -1
- package/dist/core/GthAbstractAgent.d.ts +24 -1
- package/dist/core/GthAbstractAgent.js +86 -4
- package/dist/core/GthAbstractAgent.js.map +1 -1
- package/dist/core/GthAgentRunner.d.ts +127 -1
- package/dist/core/GthAgentRunner.js +298 -4
- package/dist/core/GthAgentRunner.js.map +1 -1
- package/dist/core/shell/allowlist.d.ts +75 -0
- package/dist/core/shell/allowlist.js +187 -0
- package/dist/core/shell/allowlist.js.map +1 -0
- package/dist/core/shell/arity.d.ts +75 -0
- package/dist/core/shell/arity.js +313 -0
- package/dist/core/shell/arity.js.map +1 -0
- package/dist/core/shell/judge.d.ts +161 -0
- package/dist/core/shell/judge.js +261 -0
- package/dist/core/shell/judge.js.map +1 -0
- package/dist/core/shell/normalize.d.ts +27 -0
- package/dist/core/shell/normalize.js +53 -0
- package/dist/core/shell/normalize.js.map +1 -0
- package/dist/core/types.d.ts +75 -0
- package/dist/core/types.js.map +1 -1
- package/dist/providers/openrouter.js +2 -2
- package/dist/providers/openrouter.js.map +1 -1
- package/dist/utils/fileUtils.d.ts +4 -1
- package/dist/utils/fileUtils.js +19 -10
- package/dist/utils/fileUtils.js.map +1 -1
- package/dist/utils/systemUtils.d.ts +31 -0
- package/dist/utils/systemUtils.js +38 -0
- package/dist/utils/systemUtils.js.map +1 -1
- package/package.json +12 -8
- package/schema/gsloth-config.schema.json +1548 -0
|
@@ -10,6 +10,21 @@ export interface ProgramLike {
|
|
|
10
10
|
export declare const waitForEscape: (callback: () => void, enabled: boolean) => void;
|
|
11
11
|
export declare const stopWaitingForEscape: () => void;
|
|
12
12
|
export declare const setRawMode: (rawMode: boolean) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Ref stdin so it keeps the event loop alive, WITHOUT changing raw mode.
|
|
15
|
+
*
|
|
16
|
+
* EXT-18: the ref/unref of stdin used to be coupled to raw mode (only setRawMode(true)
|
|
17
|
+
* re-ref'd, see above), but some interactive prompts run in COOKED mode after a stream
|
|
18
|
+
* end. When an agent run suspends on a tool-approval interrupt, the stream's finally
|
|
19
|
+
* calls stopWaitingForEscape(), which unref's stdin. The readline approval prompt then
|
|
20
|
+
* does setRawMode(false) (cooked, so typed input echoes) and awaits rl.question(...) -
|
|
21
|
+
* but with stdin unref'd and nothing else holding the loop open the process exits to the
|
|
22
|
+
* shell before the user can answer. Refing stdin (decoupled from raw mode) before such a
|
|
23
|
+
* prompt keeps the loop alive so rl.question() can wait for input. This is intentionally
|
|
24
|
+
* NOT folded into setRawMode(false): the cooked-path unref is load-bearing for one-shot
|
|
25
|
+
* commands (e.g. `gth pr`) to exit, so only the interactive-prompt sites opt back in.
|
|
26
|
+
*/
|
|
27
|
+
export declare const refStdin: () => void;
|
|
13
28
|
export declare const initLogStream: (logFileName: string) => void;
|
|
14
29
|
export declare const writeToLogStream: (message: string) => void;
|
|
15
30
|
export declare const closeLogStream: () => void;
|
|
@@ -30,6 +45,22 @@ export declare const getCurrentWorkDir: () => string;
|
|
|
30
45
|
* real workspace from the protocol should use this instead.
|
|
31
46
|
*/
|
|
32
47
|
export declare const getProcessCwd: () => string;
|
|
48
|
+
/**
|
|
49
|
+
* The directory of the DISCOVERED project config (the up-tree match, or the `--config`
|
|
50
|
+
* override). It governs ONLY post-config, project-relative artifact resolution (project
|
|
51
|
+
* guidelines, prompts, `.gsloth-settings`, outputs). When unset (a global-only config, no
|
|
52
|
+
* config at all, or before discovery has run) callers fall back to cwd via {@link getProjectDir}.
|
|
53
|
+
*
|
|
54
|
+
* This is NOT the global-config dir (`~/.gsloth`): the global config stays cwd-anchored by
|
|
55
|
+
* design, so it must never be routed through this value.
|
|
56
|
+
*/
|
|
57
|
+
export declare const setProjectDir: (dir: string | undefined) => void;
|
|
58
|
+
/**
|
|
59
|
+
* The discovered project root for project-relative artifact resolution, falling back to
|
|
60
|
+
* {@link getCurrentWorkDir} when no project config has been discovered (see {@link setProjectDir}).
|
|
61
|
+
* Config DISCOVERY and DETECTION must NOT use this; they stay cwd-bound.
|
|
62
|
+
*/
|
|
63
|
+
export declare const getProjectDir: () => string;
|
|
33
64
|
export declare const getInstallDir: () => string;
|
|
34
65
|
/**
|
|
35
66
|
* Cached string from stdin. Should only be called after readStdin completes execution.
|
|
@@ -7,6 +7,7 @@ import { createWriteStream, readFileSync } from 'node:fs';
|
|
|
7
7
|
import { ProgressIndicator } from '#src/utils/ProgressIndicator.js';
|
|
8
8
|
const innerState = {
|
|
9
9
|
installDir: undefined,
|
|
10
|
+
projectDir: undefined,
|
|
10
11
|
stringFromStdin: '',
|
|
11
12
|
useColour: false,
|
|
12
13
|
waitForEscapeCallback: undefined,
|
|
@@ -82,6 +83,25 @@ export const setRawMode = (rawMode) => {
|
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
};
|
|
86
|
+
/**
|
|
87
|
+
* Ref stdin so it keeps the event loop alive, WITHOUT changing raw mode.
|
|
88
|
+
*
|
|
89
|
+
* EXT-18: the ref/unref of stdin used to be coupled to raw mode (only setRawMode(true)
|
|
90
|
+
* re-ref'd, see above), but some interactive prompts run in COOKED mode after a stream
|
|
91
|
+
* end. When an agent run suspends on a tool-approval interrupt, the stream's finally
|
|
92
|
+
* calls stopWaitingForEscape(), which unref's stdin. The readline approval prompt then
|
|
93
|
+
* does setRawMode(false) (cooked, so typed input echoes) and awaits rl.question(...) -
|
|
94
|
+
* but with stdin unref'd and nothing else holding the loop open the process exits to the
|
|
95
|
+
* shell before the user can answer. Refing stdin (decoupled from raw mode) before such a
|
|
96
|
+
* prompt keeps the loop alive so rl.question() can wait for input. This is intentionally
|
|
97
|
+
* NOT folded into setRawMode(false): the cooked-path unref is load-bearing for one-shot
|
|
98
|
+
* commands (e.g. `gth pr`) to exit, so only the interactive-prompt sites opt back in.
|
|
99
|
+
*/
|
|
100
|
+
export const refStdin = () => {
|
|
101
|
+
if (process.stdin.isTTY) {
|
|
102
|
+
process.stdin.ref?.();
|
|
103
|
+
}
|
|
104
|
+
};
|
|
85
105
|
export const initLogStream = (logFileName) => {
|
|
86
106
|
try {
|
|
87
107
|
// Close existing stream if present
|
|
@@ -149,6 +169,24 @@ export const getCurrentWorkDir = () => process.env?.INIT_CWD ?? process.cwd();
|
|
|
149
169
|
* real workspace from the protocol should use this instead.
|
|
150
170
|
*/
|
|
151
171
|
export const getProcessCwd = () => process.cwd();
|
|
172
|
+
/**
|
|
173
|
+
* The directory of the DISCOVERED project config (the up-tree match, or the `--config`
|
|
174
|
+
* override). It governs ONLY post-config, project-relative artifact resolution (project
|
|
175
|
+
* guidelines, prompts, `.gsloth-settings`, outputs). When unset (a global-only config, no
|
|
176
|
+
* config at all, or before discovery has run) callers fall back to cwd via {@link getProjectDir}.
|
|
177
|
+
*
|
|
178
|
+
* This is NOT the global-config dir (`~/.gsloth`): the global config stays cwd-anchored by
|
|
179
|
+
* design, so it must never be routed through this value.
|
|
180
|
+
*/
|
|
181
|
+
export const setProjectDir = (dir) => {
|
|
182
|
+
innerState.projectDir = dir ? resolve(dir) : undefined;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* The discovered project root for project-relative artifact resolution, falling back to
|
|
186
|
+
* {@link getCurrentWorkDir} when no project config has been discovered (see {@link setProjectDir}).
|
|
187
|
+
* Config DISCOVERY and DETECTION must NOT use this; they stay cwd-bound.
|
|
188
|
+
*/
|
|
189
|
+
export const getProjectDir = () => innerState.projectDir ?? getCurrentWorkDir();
|
|
152
190
|
export const getInstallDir = () => {
|
|
153
191
|
if (innerState.installDir) {
|
|
154
192
|
return innerState.installDir;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"systemUtils.js","sourceRoot":"","sources":["../../src/utils/systemUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,eAAe,EAAuC,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAoB,MAAM,SAAS,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"systemUtils.js","sourceRoot":"","sources":["../../src/utils/systemUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,eAAe,EAAuC,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAoB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AAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;YACtC,IAAI,KAAK,EAAE,CAAC;gBACV,MAAM,CAAC,KAAK,CAAC,CAAC;gBACd,OAAO;YACT,CAAC;YACD,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC1B,OAAO;YACT,CAAC;YACD,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACrD,MAAM,WAAW,GAAG,YAAY,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;IACjE,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC;AACzC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gaunt-sloth/core",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.4",
|
|
4
4
|
"description": "Core utilities and types for Gaunt Sloth",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Andrew Kondratev",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/
|
|
9
|
+
"url": "git+https://github.com/pukeko-robotics/gaunt-sloth.git",
|
|
10
10
|
"directory": "packages/core"
|
|
11
11
|
},
|
|
12
12
|
"bugs": {
|
|
13
|
-
"url": "https://github.com/
|
|
13
|
+
"url": "https://github.com/pukeko-robotics/gaunt-sloth/issues"
|
|
14
14
|
},
|
|
15
|
-
"homepage": "https://github.com/
|
|
15
|
+
"homepage": "https://github.com/pukeko-robotics/gaunt-sloth/tree/main/packages/core#readme",
|
|
16
16
|
"keywords": [
|
|
17
17
|
"ai",
|
|
18
18
|
"agent",
|
|
@@ -30,9 +30,11 @@
|
|
|
30
30
|
"#src/*.js": "./dist/*.js"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@langchain/core": "^1.2.
|
|
34
|
-
"@langchain/langgraph": "^1.4.
|
|
35
|
-
"
|
|
33
|
+
"@langchain/core": "^1.2.1",
|
|
34
|
+
"@langchain/langgraph": "^1.4.7",
|
|
35
|
+
"jiti": "^2.7.0",
|
|
36
|
+
"langchain": "^1.5.2",
|
|
37
|
+
"zod": "^3.25.0 || ^4.0.0"
|
|
36
38
|
},
|
|
37
39
|
"peerDependencies": {
|
|
38
40
|
"@langchain/anthropic": "^1.5.0",
|
|
@@ -64,12 +66,14 @@
|
|
|
64
66
|
},
|
|
65
67
|
"files": [
|
|
66
68
|
"./dist/*",
|
|
69
|
+
"./schema/*",
|
|
67
70
|
".gsloth.*.md"
|
|
68
71
|
],
|
|
69
72
|
"publishConfig": {
|
|
70
73
|
"tag": "alpha"
|
|
71
74
|
},
|
|
72
75
|
"scripts": {
|
|
73
|
-
"build": "tsc"
|
|
76
|
+
"build": "tsc",
|
|
77
|
+
"schema:generate": "node scripts/generate-config-schema.mjs"
|
|
74
78
|
}
|
|
75
79
|
}
|