the-citadel 0.8.4 → 0.9.0
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.
Potentially problematic release.
This version of the-citadel might be problematic. Click here for more details.
- package/dist/config/schema.d.ts +3 -0
- package/dist/core/formula.d.ts +2 -0
- package/dist/core/instruction.d.ts +1 -1
- package/dist/index.js +127 -74
- package/package.json +2 -2
- package/dist/agents/router.d.ts +0 -1
- package/dist/core/beads.d.ts +0 -70
- package/dist/tools/router.d.ts +0 -1
package/dist/config/schema.d.ts
CHANGED
|
@@ -72,6 +72,9 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
72
72
|
maxToolResponseSize: z.ZodDefault<z.ZodNumber>;
|
|
73
73
|
maxMessageSize: z.ZodDefault<z.ZodNumber>;
|
|
74
74
|
}, z.core.$strip>>;
|
|
75
|
+
hooks: z.ZodOptional<z.ZodObject<{
|
|
76
|
+
onPearlDone: z.ZodOptional<z.ZodAny>;
|
|
77
|
+
}, z.core.$strip>>;
|
|
75
78
|
}, z.core.$strip>;
|
|
76
79
|
export type CitadelConfig = z.infer<typeof ConfigSchema>;
|
|
77
80
|
export type CitadelConfigInput = z.input<typeof ConfigSchema>;
|
package/dist/core/formula.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare const FormulaStepSchema: z.ZodObject<{
|
|
|
18
18
|
output_schema: z.ZodOptional<z.ZodAny>;
|
|
19
19
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
20
20
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
21
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
21
22
|
}, z.core.$strip>;
|
|
22
23
|
export declare const FormulaSchema: z.ZodObject<{
|
|
23
24
|
formula: z.ZodString;
|
|
@@ -43,6 +44,7 @@ export declare const FormulaSchema: z.ZodObject<{
|
|
|
43
44
|
output_schema: z.ZodOptional<z.ZodAny>;
|
|
44
45
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
45
46
|
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
47
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
46
48
|
}, z.core.$strip>>;
|
|
47
49
|
}, z.core.$strip>;
|
|
48
50
|
export type Formula = z.infer<typeof FormulaSchema>;
|
|
@@ -16,7 +16,7 @@ export interface InstructionProvider {
|
|
|
16
16
|
export declare class GlobalProvider implements InstructionProvider {
|
|
17
17
|
name: string;
|
|
18
18
|
priority: number;
|
|
19
|
-
getInstructions(
|
|
19
|
+
getInstructions(ctx: InstructionContext): Promise<string | null>;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Hardcoded defaults for Citadel roles.
|
package/dist/index.js
CHANGED
|
@@ -3021,7 +3021,7 @@ var require_signal_exit = __commonJS((exports, module) => {
|
|
|
3021
3021
|
emitter.on(ev, cb);
|
|
3022
3022
|
return remove;
|
|
3023
3023
|
};
|
|
3024
|
-
unload = function
|
|
3024
|
+
unload = function unload2() {
|
|
3025
3025
|
if (!loaded || !processOk(global.process)) {
|
|
3026
3026
|
return;
|
|
3027
3027
|
}
|
|
@@ -3036,7 +3036,7 @@ var require_signal_exit = __commonJS((exports, module) => {
|
|
|
3036
3036
|
emitter.count -= 1;
|
|
3037
3037
|
};
|
|
3038
3038
|
module.exports.unload = unload;
|
|
3039
|
-
emit = function
|
|
3039
|
+
emit = function emit2(event, code, signal) {
|
|
3040
3040
|
if (emitter.emitted[event]) {
|
|
3041
3041
|
return;
|
|
3042
3042
|
}
|
|
@@ -3065,7 +3065,7 @@ var require_signal_exit = __commonJS((exports, module) => {
|
|
|
3065
3065
|
return signals;
|
|
3066
3066
|
};
|
|
3067
3067
|
loaded = false;
|
|
3068
|
-
load = function
|
|
3068
|
+
load = function load2() {
|
|
3069
3069
|
if (loaded || !processOk(global.process)) {
|
|
3070
3070
|
return;
|
|
3071
3071
|
}
|
|
@@ -3084,7 +3084,7 @@ var require_signal_exit = __commonJS((exports, module) => {
|
|
|
3084
3084
|
};
|
|
3085
3085
|
module.exports.load = load;
|
|
3086
3086
|
originalProcessReallyExit = process3.reallyExit;
|
|
3087
|
-
processReallyExit = function
|
|
3087
|
+
processReallyExit = function processReallyExit2(code) {
|
|
3088
3088
|
if (!processOk(global.process)) {
|
|
3089
3089
|
return;
|
|
3090
3090
|
}
|
|
@@ -3094,7 +3094,7 @@ var require_signal_exit = __commonJS((exports, module) => {
|
|
|
3094
3094
|
originalProcessReallyExit.call(process3, process3.exitCode);
|
|
3095
3095
|
};
|
|
3096
3096
|
originalProcessEmit = process3.emit;
|
|
3097
|
-
processEmit = function
|
|
3097
|
+
processEmit = function processEmit2(ev, arg) {
|
|
3098
3098
|
if (ev === "exit" && processOk(global.process)) {
|
|
3099
3099
|
if (arg !== undefined) {
|
|
3100
3100
|
process3.exitCode = arg;
|
|
@@ -18169,7 +18169,7 @@ var require_backend = __commonJS((exports, module) => {
|
|
|
18169
18169
|
var LRU_LIST = Symbol("lruList");
|
|
18170
18170
|
var CACHE = Symbol("cache");
|
|
18171
18171
|
var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
|
|
18172
|
-
var naiveLength = function
|
|
18172
|
+
var naiveLength = function naiveLength2() {
|
|
18173
18173
|
return 1;
|
|
18174
18174
|
};
|
|
18175
18175
|
var LRUCache = /* @__PURE__ */ function() {
|
|
@@ -18420,7 +18420,7 @@ var require_backend = __commonJS((exports, module) => {
|
|
|
18420
18420
|
}
|
|
18421
18421
|
}]);
|
|
18422
18422
|
}();
|
|
18423
|
-
var _get = function
|
|
18423
|
+
var _get = function _get2(self2, key, doUse) {
|
|
18424
18424
|
var node = self2[CACHE].get(key);
|
|
18425
18425
|
if (node) {
|
|
18426
18426
|
var hit = node.value;
|
|
@@ -18438,13 +18438,13 @@ var require_backend = __commonJS((exports, module) => {
|
|
|
18438
18438
|
return hit.value;
|
|
18439
18439
|
}
|
|
18440
18440
|
};
|
|
18441
|
-
var isStale = function
|
|
18441
|
+
var isStale = function isStale2(self2, hit) {
|
|
18442
18442
|
if (!hit || !hit.maxAge && !self2[MAX_AGE])
|
|
18443
18443
|
return false;
|
|
18444
18444
|
var diff = Date.now() - hit.now;
|
|
18445
18445
|
return hit.maxAge ? diff > hit.maxAge : self2[MAX_AGE] && diff > self2[MAX_AGE];
|
|
18446
18446
|
};
|
|
18447
|
-
var trim = function
|
|
18447
|
+
var trim = function trim2(self2) {
|
|
18448
18448
|
if (self2[LENGTH] > self2[MAX]) {
|
|
18449
18449
|
for (var walker = self2[LRU_LIST].tail;self2[LENGTH] > self2[MAX] && walker !== null; ) {
|
|
18450
18450
|
var prev = walker.prev;
|
|
@@ -18453,7 +18453,7 @@ var require_backend = __commonJS((exports, module) => {
|
|
|
18453
18453
|
}
|
|
18454
18454
|
}
|
|
18455
18455
|
};
|
|
18456
|
-
var _del = function
|
|
18456
|
+
var _del = function _del2(self2, node) {
|
|
18457
18457
|
if (node) {
|
|
18458
18458
|
var hit = node.value;
|
|
18459
18459
|
if (self2[DISPOSE])
|
|
@@ -18463,15 +18463,15 @@ var require_backend = __commonJS((exports, module) => {
|
|
|
18463
18463
|
self2[LRU_LIST].removeNode(node);
|
|
18464
18464
|
}
|
|
18465
18465
|
};
|
|
18466
|
-
var Entry = /* @__PURE__ */ _createClass(function
|
|
18467
|
-
_classCallCheck(this,
|
|
18466
|
+
var Entry = /* @__PURE__ */ _createClass(function Entry2(key, value, length, now, maxAge) {
|
|
18467
|
+
_classCallCheck(this, Entry2);
|
|
18468
18468
|
this.key = key;
|
|
18469
18469
|
this.value = value;
|
|
18470
18470
|
this.length = length;
|
|
18471
18471
|
this.now = now;
|
|
18472
18472
|
this.maxAge = maxAge || 0;
|
|
18473
18473
|
});
|
|
18474
|
-
var forEachStep = function
|
|
18474
|
+
var forEachStep = function forEachStep2(self2, fn, node, thisp) {
|
|
18475
18475
|
var hit = node.value;
|
|
18476
18476
|
if (isStale(self2, hit)) {
|
|
18477
18477
|
_del(self2, node);
|
|
@@ -18780,7 +18780,7 @@ var require_backend = __commonJS((exports, module) => {
|
|
|
18780
18780
|
}
|
|
18781
18781
|
function _regeneratorRuntime() {
|
|
18782
18782
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
18783
|
-
_regeneratorRuntime = function
|
|
18783
|
+
_regeneratorRuntime = function _regeneratorRuntime2() {
|
|
18784
18784
|
return e;
|
|
18785
18785
|
};
|
|
18786
18786
|
var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function(t2, e2, r2) {
|
|
@@ -18792,7 +18792,7 @@ var require_backend = __commonJS((exports, module) => {
|
|
|
18792
18792
|
try {
|
|
18793
18793
|
define2({}, "");
|
|
18794
18794
|
} catch (t2) {
|
|
18795
|
-
define2 = function
|
|
18795
|
+
define2 = function define3(t3, e2, r2) {
|
|
18796
18796
|
return t3[e2] = r2;
|
|
18797
18797
|
};
|
|
18798
18798
|
}
|
|
@@ -19708,7 +19708,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
19708
19708
|
if (Array.isArray(arr))
|
|
19709
19709
|
return arr;
|
|
19710
19710
|
}
|
|
19711
|
-
var compareVersions = function
|
|
19711
|
+
var compareVersions = function compareVersions2(v1, v2) {
|
|
19712
19712
|
var n1 = validateAndParse(v1);
|
|
19713
19713
|
var n2 = validateAndParse(v2);
|
|
19714
19714
|
var p1 = n1.pop();
|
|
@@ -19723,15 +19723,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
19723
19723
|
}
|
|
19724
19724
|
return 0;
|
|
19725
19725
|
};
|
|
19726
|
-
var validate2 = function
|
|
19726
|
+
var validate2 = function validate3(version) {
|
|
19727
19727
|
return typeof version === "string" && /^[v\d]/.test(version) && semver.test(version);
|
|
19728
19728
|
};
|
|
19729
|
-
var compare = function
|
|
19729
|
+
var compare = function compare2(v1, v2, operator) {
|
|
19730
19730
|
assertValidOperator(operator);
|
|
19731
19731
|
var res = compareVersions(v1, v2);
|
|
19732
19732
|
return operatorResMap[operator].includes(res);
|
|
19733
19733
|
};
|
|
19734
|
-
var satisfies = function
|
|
19734
|
+
var satisfies = function satisfies2(version, range) {
|
|
19735
19735
|
var m = range.match(/^([<>=~^]+)/);
|
|
19736
19736
|
var op = m ? m[1] : "=";
|
|
19737
19737
|
if (op !== "^" && op !== "~")
|
|
@@ -19759,7 +19759,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
19759
19759
|
return true;
|
|
19760
19760
|
};
|
|
19761
19761
|
var semver = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;
|
|
19762
|
-
var validateAndParse = function
|
|
19762
|
+
var validateAndParse = function validateAndParse2(version) {
|
|
19763
19763
|
if (typeof version !== "string") {
|
|
19764
19764
|
throw new TypeError("Invalid argument expected string");
|
|
19765
19765
|
}
|
|
@@ -19770,17 +19770,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
19770
19770
|
match.shift();
|
|
19771
19771
|
return match;
|
|
19772
19772
|
};
|
|
19773
|
-
var isWildcard = function
|
|
19773
|
+
var isWildcard = function isWildcard2(s) {
|
|
19774
19774
|
return s === "*" || s === "x" || s === "X";
|
|
19775
19775
|
};
|
|
19776
|
-
var tryParse = function
|
|
19776
|
+
var tryParse = function tryParse2(v) {
|
|
19777
19777
|
var n = parseInt(v, 10);
|
|
19778
19778
|
return isNaN(n) ? v : n;
|
|
19779
19779
|
};
|
|
19780
|
-
var forceType = function
|
|
19780
|
+
var forceType = function forceType2(a, b) {
|
|
19781
19781
|
return esm_typeof(a) !== esm_typeof(b) ? [String(a), String(b)] : [a, b];
|
|
19782
19782
|
};
|
|
19783
|
-
var compareStrings = function
|
|
19783
|
+
var compareStrings = function compareStrings2(a, b) {
|
|
19784
19784
|
if (isWildcard(a) || isWildcard(b))
|
|
19785
19785
|
return 0;
|
|
19786
19786
|
var _forceType = forceType(tryParse(a), tryParse(b)), _forceType2 = _slicedToArray(_forceType, 2), ap = _forceType2[0], bp = _forceType2[1];
|
|
@@ -19790,7 +19790,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
19790
19790
|
return -1;
|
|
19791
19791
|
return 0;
|
|
19792
19792
|
};
|
|
19793
|
-
var compareSegments = function
|
|
19793
|
+
var compareSegments = function compareSegments2(a, b) {
|
|
19794
19794
|
for (var i = 0;i < Math.max(a.length, b.length); i++) {
|
|
19795
19795
|
var r = compareStrings(a[i] || "0", b[i] || "0");
|
|
19796
19796
|
if (r !== 0)
|
|
@@ -19806,7 +19806,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
19806
19806
|
"<": [-1]
|
|
19807
19807
|
};
|
|
19808
19808
|
var allowedOperators = Object.keys(operatorResMap);
|
|
19809
|
-
var assertValidOperator = function
|
|
19809
|
+
var assertValidOperator = function assertValidOperator2(op) {
|
|
19810
19810
|
if (typeof op !== "string") {
|
|
19811
19811
|
throw new TypeError("Invalid operator type, expected string but got ".concat(esm_typeof(op)));
|
|
19812
19812
|
}
|
|
@@ -20047,7 +20047,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
20047
20047
|
function getAllEnumerableKeys(obj) {
|
|
20048
20048
|
var keys = new Set;
|
|
20049
20049
|
var current = obj;
|
|
20050
|
-
var _loop = function
|
|
20050
|
+
var _loop = function _loop2() {
|
|
20051
20051
|
var currentKeys = [].concat(_toConsumableArray(Object.keys(current)), _toConsumableArray(Object.getOwnPropertySymbols(current)));
|
|
20052
20052
|
var descriptors = Object.getOwnPropertyDescriptors(current);
|
|
20053
20053
|
currentKeys.forEach(function(key) {
|
|
@@ -20848,7 +20848,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
20848
20848
|
}
|
|
20849
20849
|
}
|
|
20850
20850
|
}
|
|
20851
|
-
var isPlainObject = function
|
|
20851
|
+
var isPlainObject = function isPlainObject2(object) {
|
|
20852
20852
|
var objectPrototype = Object.getPrototypeOf(object);
|
|
20853
20853
|
if (!objectPrototype)
|
|
20854
20854
|
return true;
|
|
@@ -21644,7 +21644,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
21644
21644
|
var b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
21645
21645
|
return compareVersions(a, b) > -1;
|
|
21646
21646
|
}
|
|
21647
|
-
var isReactNativeEnvironment = function
|
|
21647
|
+
var isReactNativeEnvironment = function isReactNativeEnvironment2() {
|
|
21648
21648
|
return window.document == null;
|
|
21649
21649
|
};
|
|
21650
21650
|
function formatDurationToMicrosecondsGranularity(duration) {
|
|
@@ -22384,7 +22384,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
22384
22384
|
event.preventDefault();
|
|
22385
22385
|
event.stopPropagation();
|
|
22386
22386
|
}
|
|
22387
|
-
var selectElementForNode = function
|
|
22387
|
+
var selectElementForNode = function selectElementForNode2(node) {
|
|
22388
22388
|
var match = agent2.getIDForHostInstance(node, inspectOnlySuspenseNodes);
|
|
22389
22389
|
if (match !== null) {
|
|
22390
22390
|
bridge.send("selectElement", match.id);
|
|
@@ -22782,12 +22782,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
22782
22782
|
try {
|
|
22783
22783
|
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
22784
22784
|
} catch (t2) {}
|
|
22785
|
-
return (_isNativeReflectConstruct = function
|
|
22785
|
+
return (_isNativeReflectConstruct = function _isNativeReflectConstruct2() {
|
|
22786
22786
|
return !!t;
|
|
22787
22787
|
})();
|
|
22788
22788
|
}
|
|
22789
22789
|
function _getPrototypeOf(o) {
|
|
22790
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function
|
|
22790
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
|
|
22791
22791
|
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
22792
22792
|
};
|
|
22793
22793
|
return _getPrototypeOf(o);
|
|
@@ -22802,7 +22802,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
22802
22802
|
_setPrototypeOf(subClass, superClass);
|
|
22803
22803
|
}
|
|
22804
22804
|
function _setPrototypeOf(o, p) {
|
|
22805
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function
|
|
22805
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
|
|
22806
22806
|
o2.__proto__ = p2;
|
|
22807
22807
|
return o2;
|
|
22808
22808
|
};
|
|
@@ -23055,12 +23055,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
23055
23055
|
try {
|
|
23056
23056
|
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
23057
23057
|
} catch (t2) {}
|
|
23058
|
-
return (agent_isNativeReflectConstruct = function
|
|
23058
|
+
return (agent_isNativeReflectConstruct = function _isNativeReflectConstruct2() {
|
|
23059
23059
|
return !!t;
|
|
23060
23060
|
})();
|
|
23061
23061
|
}
|
|
23062
23062
|
function agent_getPrototypeOf(o) {
|
|
23063
|
-
agent_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function
|
|
23063
|
+
agent_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
|
|
23064
23064
|
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
23065
23065
|
};
|
|
23066
23066
|
return agent_getPrototypeOf(o);
|
|
@@ -23075,7 +23075,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
23075
23075
|
agent_setPrototypeOf(subClass, superClass);
|
|
23076
23076
|
}
|
|
23077
23077
|
function agent_setPrototypeOf(o, p) {
|
|
23078
|
-
agent_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function
|
|
23078
|
+
agent_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
|
|
23079
23079
|
o2.__proto__ = p2;
|
|
23080
23080
|
return o2;
|
|
23081
23081
|
};
|
|
@@ -23106,7 +23106,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
23106
23106
|
}
|
|
23107
23107
|
return (r === "string" ? String : Number)(t);
|
|
23108
23108
|
}
|
|
23109
|
-
var debug = function
|
|
23109
|
+
var debug = function debug2(methodName) {
|
|
23110
23110
|
if (__DEBUG__) {
|
|
23111
23111
|
var _console;
|
|
23112
23112
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1;_key < _len; _key++) {
|
|
@@ -24058,7 +24058,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24058
24058
|
var control;
|
|
24059
24059
|
try {
|
|
24060
24060
|
if (construct) {
|
|
24061
|
-
var Fake = function
|
|
24061
|
+
var Fake = function Fake2() {
|
|
24062
24062
|
throw Error();
|
|
24063
24063
|
};
|
|
24064
24064
|
Object.defineProperty(Fake.prototype, "props", {
|
|
@@ -26124,7 +26124,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
26124
26124
|
if (it)
|
|
26125
26125
|
o = it;
|
|
26126
26126
|
var i = 0;
|
|
26127
|
-
var F = function
|
|
26127
|
+
var F = function F2() {};
|
|
26128
26128
|
return { s: F, n: function n() {
|
|
26129
26129
|
if (i >= o.length)
|
|
26130
26130
|
return { done: true };
|
|
@@ -31292,7 +31292,7 @@ The error thrown in the component is:
|
|
|
31292
31292
|
isFullMatch: trackedPathMatchDepth === trackedPath.length - 1
|
|
31293
31293
|
};
|
|
31294
31294
|
}
|
|
31295
|
-
var formatPriorityLevel = function
|
|
31295
|
+
var formatPriorityLevel = function formatPriorityLevel2(priorityLevel) {
|
|
31296
31296
|
if (priorityLevel == null) {
|
|
31297
31297
|
return "Unknown";
|
|
31298
31298
|
}
|
|
@@ -31540,19 +31540,19 @@ The error thrown in the component is:
|
|
|
31540
31540
|
var internalInstanceToRootIDMap = new WeakMap;
|
|
31541
31541
|
var getElementIDForHostInstance = null;
|
|
31542
31542
|
var findHostInstanceForInternalID;
|
|
31543
|
-
var getNearestMountedDOMNode = function
|
|
31543
|
+
var getNearestMountedDOMNode = function getNearestMountedDOMNode2(node) {
|
|
31544
31544
|
return null;
|
|
31545
31545
|
};
|
|
31546
31546
|
if (renderer.ComponentTree) {
|
|
31547
|
-
getElementIDForHostInstance = function
|
|
31547
|
+
getElementIDForHostInstance = function getElementIDForHostInstance2(node) {
|
|
31548
31548
|
var internalInstance = renderer.ComponentTree.getClosestInstanceFromNode(node);
|
|
31549
31549
|
return internalInstanceToIDMap.get(internalInstance) || null;
|
|
31550
31550
|
};
|
|
31551
|
-
findHostInstanceForInternalID = function
|
|
31551
|
+
findHostInstanceForInternalID = function findHostInstanceForInternalID2(id) {
|
|
31552
31552
|
var internalInstance = idToInternalInstanceMap.get(id);
|
|
31553
31553
|
return renderer.ComponentTree.getNodeFromInstance(internalInstance);
|
|
31554
31554
|
};
|
|
31555
|
-
getNearestMountedDOMNode = function
|
|
31555
|
+
getNearestMountedDOMNode = function getNearestMountedDOMNode2(node) {
|
|
31556
31556
|
var internalInstance = renderer.ComponentTree.getClosestInstanceFromNode(node);
|
|
31557
31557
|
if (internalInstance != null) {
|
|
31558
31558
|
return renderer.ComponentTree.getNodeFromInstance(internalInstance);
|
|
@@ -31560,10 +31560,10 @@ The error thrown in the component is:
|
|
|
31560
31560
|
return null;
|
|
31561
31561
|
};
|
|
31562
31562
|
} else if (renderer.Mount.getID && renderer.Mount.getNode) {
|
|
31563
|
-
getElementIDForHostInstance = function
|
|
31563
|
+
getElementIDForHostInstance = function getElementIDForHostInstance2(node) {
|
|
31564
31564
|
return null;
|
|
31565
31565
|
};
|
|
31566
|
-
findHostInstanceForInternalID = function
|
|
31566
|
+
findHostInstanceForInternalID = function findHostInstanceForInternalID2(id) {
|
|
31567
31567
|
return null;
|
|
31568
31568
|
};
|
|
31569
31569
|
}
|
|
@@ -32274,29 +32274,29 @@ The error thrown in the component is:
|
|
|
32274
32274
|
}
|
|
32275
32275
|
}
|
|
32276
32276
|
}
|
|
32277
|
-
var getProfilingData = function
|
|
32277
|
+
var getProfilingData = function getProfilingData2() {
|
|
32278
32278
|
throw new Error("getProfilingData not supported by this renderer");
|
|
32279
32279
|
};
|
|
32280
|
-
var handleCommitFiberRoot = function
|
|
32280
|
+
var handleCommitFiberRoot = function handleCommitFiberRoot2() {
|
|
32281
32281
|
throw new Error("handleCommitFiberRoot not supported by this renderer");
|
|
32282
32282
|
};
|
|
32283
|
-
var handleCommitFiberUnmount = function
|
|
32283
|
+
var handleCommitFiberUnmount = function handleCommitFiberUnmount2() {
|
|
32284
32284
|
throw new Error("handleCommitFiberUnmount not supported by this renderer");
|
|
32285
32285
|
};
|
|
32286
|
-
var handlePostCommitFiberRoot = function
|
|
32286
|
+
var handlePostCommitFiberRoot = function handlePostCommitFiberRoot2() {
|
|
32287
32287
|
throw new Error("handlePostCommitFiberRoot not supported by this renderer");
|
|
32288
32288
|
};
|
|
32289
|
-
var overrideError = function
|
|
32289
|
+
var overrideError = function overrideError2() {
|
|
32290
32290
|
throw new Error("overrideError not supported by this renderer");
|
|
32291
32291
|
};
|
|
32292
|
-
var overrideSuspense = function
|
|
32292
|
+
var overrideSuspense = function overrideSuspense2() {
|
|
32293
32293
|
throw new Error("overrideSuspense not supported by this renderer");
|
|
32294
32294
|
};
|
|
32295
|
-
var overrideSuspenseMilestone = function
|
|
32295
|
+
var overrideSuspenseMilestone = function overrideSuspenseMilestone2() {
|
|
32296
32296
|
throw new Error("overrideSuspenseMilestone not supported by this renderer");
|
|
32297
32297
|
};
|
|
32298
|
-
var startProfiling = function
|
|
32299
|
-
var stopProfiling = function
|
|
32298
|
+
var startProfiling = function startProfiling2() {};
|
|
32299
|
+
var stopProfiling = function stopProfiling2() {};
|
|
32300
32300
|
function getBestMatchForTrackedPath() {
|
|
32301
32301
|
return null;
|
|
32302
32302
|
}
|
|
@@ -32514,7 +32514,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
32514
32514
|
if (it)
|
|
32515
32515
|
o = it;
|
|
32516
32516
|
var i = 0;
|
|
32517
|
-
var F = function
|
|
32517
|
+
var F = function F2() {};
|
|
32518
32518
|
return { s: F, n: function n() {
|
|
32519
32519
|
if (i >= o.length)
|
|
32520
32520
|
return { done: true };
|
|
@@ -32762,10 +32762,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
32762
32762
|
return;
|
|
32763
32763
|
}
|
|
32764
32764
|
var consoleMethodsToOverrideForStrictMode = ["group", "groupCollapsed", "info", "log"];
|
|
32765
|
-
var _loop = function
|
|
32765
|
+
var _loop = function _loop2() {
|
|
32766
32766
|
var method = _consoleMethodsToOver[_i];
|
|
32767
32767
|
var originalMethod = targetConsole[method];
|
|
32768
|
-
var overrideMethod = function
|
|
32768
|
+
var overrideMethod = function overrideMethod2() {
|
|
32769
32769
|
var settings = hook.settings;
|
|
32770
32770
|
for (var _len = arguments.length, args = new Array(_len), _key = 0;_key < _len; _key++) {
|
|
32771
32771
|
args[_key] = arguments[_key];
|
|
@@ -32827,10 +32827,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
32827
32827
|
return;
|
|
32828
32828
|
}
|
|
32829
32829
|
var consoleMethodsToOverrideForErrorsAndWarnings = ["error", "trace", "warn"];
|
|
32830
|
-
var _loop2 = function
|
|
32830
|
+
var _loop2 = function _loop22() {
|
|
32831
32831
|
var method = _consoleMethodsToOver2[_i2];
|
|
32832
32832
|
var originalMethod = targetConsole[method];
|
|
32833
|
-
var overrideMethod = function
|
|
32833
|
+
var overrideMethod = function overrideMethod2() {
|
|
32834
32834
|
var settings = hook.settings;
|
|
32835
32835
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0;_key2 < _len2; _key2++) {
|
|
32836
32836
|
args[_key2] = arguments[_key2];
|
|
@@ -32851,7 +32851,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
32851
32851
|
var shouldShowInlineWarningsAndErrors = settings.showInlineWarningsAndErrors && (method === "error" || method === "warn");
|
|
32852
32852
|
var _iterator = hook_createForOfIteratorHelper(hook.rendererInterfaces.values()), _step;
|
|
32853
32853
|
try {
|
|
32854
|
-
var _loop3 = function
|
|
32854
|
+
var _loop3 = function _loop32() {
|
|
32855
32855
|
var rendererInterface = _step.value;
|
|
32856
32856
|
var { onErrorOrWarning, getComponentStack } = rendererInterface;
|
|
32857
32857
|
try {
|
|
@@ -33006,7 +33006,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
33006
33006
|
});
|
|
33007
33007
|
hook.emit("react-devtools", agent2);
|
|
33008
33008
|
hook.reactDevtoolsAgent = agent2;
|
|
33009
|
-
var onAgentShutdown = function
|
|
33009
|
+
var onAgentShutdown = function onAgentShutdown2() {
|
|
33010
33010
|
subs.forEach(function(fn) {
|
|
33011
33011
|
return fn();
|
|
33012
33012
|
});
|
|
@@ -33442,7 +33442,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
33442
33442
|
} else {
|
|
33443
33443
|
var lazyResolveRNStyle;
|
|
33444
33444
|
var lazyNativeStyleEditorValidAttributes;
|
|
33445
|
-
var initAfterTick = function
|
|
33445
|
+
var initAfterTick = function initAfterTick2() {
|
|
33446
33446
|
if (bridge !== null) {
|
|
33447
33447
|
setupNativeStyleEditor(bridge, agent2, lazyResolveRNStyle, lazyNativeStyleEditorValidAttributes);
|
|
33448
33448
|
}
|
|
@@ -42612,7 +42612,7 @@ var require_formats = __commonJS((exports) => {
|
|
|
42612
42612
|
}
|
|
42613
42613
|
var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
|
|
42614
42614
|
function getTime(strictTimeZone) {
|
|
42615
|
-
return function
|
|
42615
|
+
return function time3(str) {
|
|
42616
42616
|
const matches = TIME.exec(str);
|
|
42617
42617
|
if (!matches)
|
|
42618
42618
|
return false;
|
|
@@ -65048,7 +65048,10 @@ var ConfigSchema = exports_external.object({
|
|
|
65048
65048
|
maxHistoryMessages: 20,
|
|
65049
65049
|
maxToolResponseSize: 50000,
|
|
65050
65050
|
maxMessageSize: 1e5
|
|
65051
|
-
})
|
|
65051
|
+
}),
|
|
65052
|
+
hooks: exports_external.object({
|
|
65053
|
+
onPearlDone: exports_external.any().optional()
|
|
65054
|
+
}).optional()
|
|
65052
65055
|
});
|
|
65053
65056
|
|
|
65054
65057
|
// src/config/index.ts
|
|
@@ -84833,9 +84836,23 @@ ${stderr}`));
|
|
|
84833
84836
|
const valStr = JSON.stringify(changes.output);
|
|
84834
84837
|
await this.runCommand(["meta", "set", id, "output", valStr, "--format", "json"]);
|
|
84835
84838
|
}
|
|
84836
|
-
|
|
84837
|
-
|
|
84838
|
-
|
|
84839
|
+
let finalPearl;
|
|
84840
|
+
if (!output) {
|
|
84841
|
+
finalPearl = await this.get(id);
|
|
84842
|
+
} else {
|
|
84843
|
+
finalPearl = this.parseRaw(output);
|
|
84844
|
+
}
|
|
84845
|
+
if (changes.status === "done" && current?.status !== "done") {
|
|
84846
|
+
try {
|
|
84847
|
+
const config2 = getConfig();
|
|
84848
|
+
if (config2.hooks?.onPearlDone) {
|
|
84849
|
+
await config2.hooks.onPearlDone(finalPearl);
|
|
84850
|
+
}
|
|
84851
|
+
} catch (err) {
|
|
84852
|
+
logger.error(`[Pearls] Error executing onPearlDone hook for ${id}:`, err);
|
|
84853
|
+
}
|
|
84854
|
+
}
|
|
84855
|
+
return finalPearl;
|
|
84839
84856
|
}
|
|
84840
84857
|
validateTransition(current, next) {
|
|
84841
84858
|
const validTransitions = {
|
|
@@ -84897,7 +84914,8 @@ var FormulaStepSchema = exports_external.object({
|
|
|
84897
84914
|
on_failure: exports_external.string().optional(),
|
|
84898
84915
|
output_schema: exports_external.any().optional(),
|
|
84899
84916
|
context: exports_external.record(exports_external.string(), exports_external.string()).optional(),
|
|
84900
|
-
labels: exports_external.array(exports_external.string()).optional()
|
|
84917
|
+
labels: exports_external.array(exports_external.string()).optional(),
|
|
84918
|
+
agent: exports_external.string().optional()
|
|
84901
84919
|
});
|
|
84902
84920
|
var FormulaSchema = exports_external.object({
|
|
84903
84921
|
formula: exports_external.string(),
|
|
@@ -85034,7 +85052,27 @@ ${results.join(`
|
|
|
85034
85052
|
class GlobalProvider {
|
|
85035
85053
|
name = "global";
|
|
85036
85054
|
priority = 10;
|
|
85037
|
-
async getInstructions(
|
|
85055
|
+
async getInstructions(ctx) {
|
|
85056
|
+
if (ctx.pearlId) {
|
|
85057
|
+
try {
|
|
85058
|
+
const pearl = await getPearls().get(ctx.pearlId);
|
|
85059
|
+
if (pearl.assignee) {
|
|
85060
|
+
const agentPath = resolve7(process.cwd(), `agents/${pearl.assignee}.md`);
|
|
85061
|
+
if (existsSync6(agentPath)) {
|
|
85062
|
+
const content = await readFile3(agentPath, "utf-8");
|
|
85063
|
+
return `
|
|
85064
|
+
# AGENT ROLE: ${pearl.assignee.toUpperCase()}
|
|
85065
|
+
You are acting as ${pearl.assignee}. Follow these specific instructions and style guidelines:
|
|
85066
|
+
|
|
85067
|
+
## Role Configuration
|
|
85068
|
+
${content}
|
|
85069
|
+
`;
|
|
85070
|
+
}
|
|
85071
|
+
}
|
|
85072
|
+
} catch (err) {
|
|
85073
|
+
logger.warn(`[GlobalProvider] Error fetching assignee prompt for ${ctx.pearlId}: ${err}`);
|
|
85074
|
+
}
|
|
85075
|
+
}
|
|
85038
85076
|
const projectContext = await getProjectContext().resolveContext(process.cwd(), process.cwd());
|
|
85039
85077
|
if (!projectContext)
|
|
85040
85078
|
return null;
|
|
@@ -96565,9 +96603,23 @@ ${stderr}`));
|
|
|
96565
96603
|
const valStr = JSON.stringify(changes.output);
|
|
96566
96604
|
await this.runCommand(["meta", "set", id, "output", valStr, "--format", "json"]);
|
|
96567
96605
|
}
|
|
96568
|
-
|
|
96569
|
-
|
|
96570
|
-
|
|
96606
|
+
let finalPearl;
|
|
96607
|
+
if (!output) {
|
|
96608
|
+
finalPearl = await this.get(id);
|
|
96609
|
+
} else {
|
|
96610
|
+
finalPearl = this.parseRaw(output);
|
|
96611
|
+
}
|
|
96612
|
+
if (changes.status === "done" && current?.status !== "done") {
|
|
96613
|
+
try {
|
|
96614
|
+
const config2 = getConfig();
|
|
96615
|
+
if (config2.hooks?.onPearlDone) {
|
|
96616
|
+
await config2.hooks.onPearlDone(finalPearl);
|
|
96617
|
+
}
|
|
96618
|
+
} catch (err) {
|
|
96619
|
+
logger.error(`[Pearls] Error executing onPearlDone hook for ${id}:`, err);
|
|
96620
|
+
}
|
|
96621
|
+
}
|
|
96622
|
+
return finalPearl;
|
|
96571
96623
|
}
|
|
96572
96624
|
validateTransition(current, next) {
|
|
96573
96625
|
const validTransitions = {
|
|
@@ -97219,7 +97271,8 @@ class WorkflowEngine {
|
|
|
97219
97271
|
parent: rootPearl.id,
|
|
97220
97272
|
description,
|
|
97221
97273
|
context: finalContext,
|
|
97222
|
-
labels: step.labels
|
|
97274
|
+
labels: step.labels,
|
|
97275
|
+
assignee: step.agent
|
|
97223
97276
|
});
|
|
97224
97277
|
await pearls.update(pearl.id, {
|
|
97225
97278
|
labels: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "the-citadel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "A deterministic agent orchestration system for Knowledge Work",
|
|
5
5
|
"module": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -58,4 +58,4 @@
|
|
|
58
58
|
"react": "^19.2.3",
|
|
59
59
|
"zod": "^4.3.6"
|
|
60
60
|
}
|
|
61
|
-
}
|
|
61
|
+
}
|
package/dist/agents/router.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/core/beads.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const BeadStatusSchema: z.ZodEnum<{
|
|
3
|
-
open: "open";
|
|
4
|
-
in_progress: "in_progress";
|
|
5
|
-
verify: "verify";
|
|
6
|
-
done: "done";
|
|
7
|
-
}>;
|
|
8
|
-
export type BeadStatus = z.infer<typeof BeadStatusSchema>;
|
|
9
|
-
export declare const BeadPrioritySchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<"0">, z.ZodLiteral<"1">, z.ZodLiteral<"2">, z.ZodLiteral<"3">]>, z.ZodTransform<0 | 2 | 3 | 1, 0 | "0" | "1" | 2 | "2" | 3 | 1 | "3">>;
|
|
10
|
-
export type BeadPriority = z.infer<typeof BeadPrioritySchema>;
|
|
11
|
-
export declare const BeadSchema: z.ZodObject<{
|
|
12
|
-
id: z.ZodString;
|
|
13
|
-
title: z.ZodString;
|
|
14
|
-
status: z.ZodEnum<{
|
|
15
|
-
open: "open";
|
|
16
|
-
in_progress: "in_progress";
|
|
17
|
-
verify: "verify";
|
|
18
|
-
done: "done";
|
|
19
|
-
}>;
|
|
20
|
-
priority: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<"0">, z.ZodLiteral<"1">, z.ZodLiteral<"2">, z.ZodLiteral<"3">]>, z.ZodTransform<0 | 2 | 3 | 1, 0 | "0" | "1" | 2 | "2" | 3 | 1 | "3">>;
|
|
21
|
-
assignee: z.ZodOptional<z.ZodString>;
|
|
22
|
-
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
23
|
-
blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
|
-
acceptance_test: z.ZodOptional<z.ZodString>;
|
|
25
|
-
parent: z.ZodOptional<z.ZodString>;
|
|
26
|
-
type: z.ZodOptional<z.ZodString>;
|
|
27
|
-
description: z.ZodOptional<z.ZodString>;
|
|
28
|
-
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
29
|
-
created_at: z.ZodString;
|
|
30
|
-
updated_at: z.ZodString;
|
|
31
|
-
}, z.core.$strip>;
|
|
32
|
-
export type Bead = z.infer<typeof BeadSchema>;
|
|
33
|
-
export interface CreateOptions {
|
|
34
|
-
priority?: 0 | 1 | 2 | 3;
|
|
35
|
-
assignee?: string;
|
|
36
|
-
blockers?: string[];
|
|
37
|
-
acceptance_test?: string;
|
|
38
|
-
description?: string;
|
|
39
|
-
parent?: string;
|
|
40
|
-
type?: string;
|
|
41
|
-
context?: Record<string, unknown>;
|
|
42
|
-
labels?: string[];
|
|
43
|
-
}
|
|
44
|
-
export declare class BeadsClient {
|
|
45
|
-
private basePath;
|
|
46
|
-
private binary;
|
|
47
|
-
constructor(basePath?: string, binary?: string);
|
|
48
|
-
protected runCommand(args: string, retryCount?: number): Promise<string>;
|
|
49
|
-
init(): Promise<void>;
|
|
50
|
-
protected execute(command: string, cwd: string): Promise<{
|
|
51
|
-
stdout: string;
|
|
52
|
-
stderr: string;
|
|
53
|
-
}>;
|
|
54
|
-
sync(): Promise<void>;
|
|
55
|
-
doctor(): Promise<boolean>;
|
|
56
|
-
private parseRaw;
|
|
57
|
-
private parseRawList;
|
|
58
|
-
private mapToDomain;
|
|
59
|
-
list(status?: BeadStatus): Promise<Bead[]>;
|
|
60
|
-
ready(): Promise<Bead[]>;
|
|
61
|
-
getAll(): Promise<Bead[]>;
|
|
62
|
-
get(id: string): Promise<Bead>;
|
|
63
|
-
create(title: string, options?: CreateOptions): Promise<Bead>;
|
|
64
|
-
update(id: string, changes: Partial<Bead>): Promise<Bead>;
|
|
65
|
-
private validateTransition;
|
|
66
|
-
addDependency(childId: string, parentId: string): Promise<void>;
|
|
67
|
-
addComment(id: string, comment: string): Promise<string>;
|
|
68
|
-
}
|
|
69
|
-
export declare function getBeads(basePath?: string): BeadsClient;
|
|
70
|
-
export declare function setBeadsInstance(beads: BeadsClient): void;
|
package/dist/tools/router.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|