replicas-mcp 0.2.0 → 0.2.2
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/README.md +3 -3
- package/dist/chunk-2KQ6OUSY.js +1033 -0
- package/dist/chunk-2Y7PD56W.js +164 -0
- package/dist/chunk-5VUQ55WW.js +242 -0
- package/dist/chunk-AAVVX4U5.js +175 -0
- package/dist/chunk-CXFLI7S3.js +5706 -0
- package/dist/chunk-ERL3EC7G.js +44 -0
- package/dist/chunk-MO4EEYFW.js +38 -0
- package/dist/chunk-SGITM26Q.js +877 -0
- package/dist/chunk-ST5JVROM.js +39 -0
- package/dist/chunk-SWX24AGM.js +62 -0
- package/dist/chunk-WPAL27HA.js +29 -0
- package/dist/chunk-ZDZBYCXV.js +52 -0
- package/dist/chunk-ZNARSMJG.js +14 -0
- package/dist/dist-es-7T436X7S.js +89 -0
- package/dist/dist-es-BPXINP6D.js +325 -0
- package/dist/dist-es-BSYEGR6D.js +381 -0
- package/dist/dist-es-HU5E5HQ2.js +71 -0
- package/dist/dist-es-RNSS2U3E.js +490 -0
- package/dist/dist-es-SCPV3ZCZ.js +168 -0
- package/dist/dist-es-VRURAF5E.js +47 -0
- package/dist/event-streams-EHSSWA6E.js +253 -0
- package/dist/index.js +1431 -206
- package/dist/loadSso-XSERNFCM.js +552 -0
- package/dist/signin-GATCKLJP.js +649 -0
- package/dist/sso-oidc-JF4BALR2.js +789 -0
- package/dist/sts-UFAVCISZ.js +6070 -0
- package/package.json +1 -1
- package/src/index.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -1,39 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
-
}) : x)(function(x) {
|
|
11
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
-
});
|
|
14
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
15
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
|
-
};
|
|
17
|
-
var __copyProps = (to, from, except, desc) => {
|
|
18
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
-
for (let key of __getOwnPropNames(from))
|
|
20
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
-
}
|
|
23
|
-
return to;
|
|
24
|
-
};
|
|
25
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
26
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
27
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
28
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31
|
-
mod
|
|
32
|
-
));
|
|
33
|
-
|
|
34
|
-
// ../node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.js
|
|
2
|
+
import {
|
|
3
|
+
__commonJS,
|
|
4
|
+
__require,
|
|
5
|
+
__toESM
|
|
6
|
+
} from "./chunk-MO4EEYFW.js";
|
|
7
|
+
|
|
8
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/identity.js
|
|
35
9
|
var require_identity = __commonJS({
|
|
36
|
-
"../node_modules/.bun/yaml@2.8.
|
|
10
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/identity.js"(exports) {
|
|
37
11
|
"use strict";
|
|
38
12
|
var ALIAS = /* @__PURE__ */ Symbol.for("yaml.alias");
|
|
39
13
|
var DOC = /* @__PURE__ */ Symbol.for("yaml.document");
|
|
@@ -88,9 +62,9 @@ var require_identity = __commonJS({
|
|
|
88
62
|
}
|
|
89
63
|
});
|
|
90
64
|
|
|
91
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
65
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/visit.js
|
|
92
66
|
var require_visit = __commonJS({
|
|
93
|
-
"../node_modules/.bun/yaml@2.8.
|
|
67
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/visit.js"(exports) {
|
|
94
68
|
"use strict";
|
|
95
69
|
var identity = require_identity();
|
|
96
70
|
var BREAK = /* @__PURE__ */ Symbol("break visit");
|
|
@@ -246,9 +220,9 @@ var require_visit = __commonJS({
|
|
|
246
220
|
}
|
|
247
221
|
});
|
|
248
222
|
|
|
249
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
223
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/doc/directives.js
|
|
250
224
|
var require_directives = __commonJS({
|
|
251
|
-
"../node_modules/.bun/yaml@2.8.
|
|
225
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/doc/directives.js"(exports) {
|
|
252
226
|
"use strict";
|
|
253
227
|
var identity = require_identity();
|
|
254
228
|
var visit = require_visit();
|
|
@@ -417,9 +391,9 @@ var require_directives = __commonJS({
|
|
|
417
391
|
}
|
|
418
392
|
});
|
|
419
393
|
|
|
420
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
394
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/doc/anchors.js
|
|
421
395
|
var require_anchors = __commonJS({
|
|
422
|
-
"../node_modules/.bun/yaml@2.8.
|
|
396
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/doc/anchors.js"(exports) {
|
|
423
397
|
"use strict";
|
|
424
398
|
var identity = require_identity();
|
|
425
399
|
var visit = require_visit();
|
|
@@ -487,9 +461,9 @@ var require_anchors = __commonJS({
|
|
|
487
461
|
}
|
|
488
462
|
});
|
|
489
463
|
|
|
490
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
464
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/doc/applyReviver.js
|
|
491
465
|
var require_applyReviver = __commonJS({
|
|
492
|
-
"../node_modules/.bun/yaml@2.8.
|
|
466
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/doc/applyReviver.js"(exports) {
|
|
493
467
|
"use strict";
|
|
494
468
|
function applyReviver(reviver, obj, key, val) {
|
|
495
469
|
if (val && typeof val === "object") {
|
|
@@ -537,9 +511,9 @@ var require_applyReviver = __commonJS({
|
|
|
537
511
|
}
|
|
538
512
|
});
|
|
539
513
|
|
|
540
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
514
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/toJS.js
|
|
541
515
|
var require_toJS = __commonJS({
|
|
542
|
-
"../node_modules/.bun/yaml@2.8.
|
|
516
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/toJS.js"(exports) {
|
|
543
517
|
"use strict";
|
|
544
518
|
var identity = require_identity();
|
|
545
519
|
function toJS(value, arg, ctx) {
|
|
@@ -567,9 +541,9 @@ var require_toJS = __commonJS({
|
|
|
567
541
|
}
|
|
568
542
|
});
|
|
569
543
|
|
|
570
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
544
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/Node.js
|
|
571
545
|
var require_Node = __commonJS({
|
|
572
|
-
"../node_modules/.bun/yaml@2.8.
|
|
546
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/Node.js"(exports) {
|
|
573
547
|
"use strict";
|
|
574
548
|
var applyReviver = require_applyReviver();
|
|
575
549
|
var identity = require_identity();
|
|
@@ -608,9 +582,9 @@ var require_Node = __commonJS({
|
|
|
608
582
|
}
|
|
609
583
|
});
|
|
610
584
|
|
|
611
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
585
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/Alias.js
|
|
612
586
|
var require_Alias = __commonJS({
|
|
613
|
-
"../node_modules/.bun/yaml@2.8.
|
|
587
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/Alias.js"(exports) {
|
|
614
588
|
"use strict";
|
|
615
589
|
var anchors = require_anchors();
|
|
616
590
|
var visit = require_visit();
|
|
@@ -632,6 +606,8 @@ var require_Alias = __commonJS({
|
|
|
632
606
|
* instance of the `source` anchor before this node.
|
|
633
607
|
*/
|
|
634
608
|
resolve(doc, ctx) {
|
|
609
|
+
if (ctx?.maxAliasCount === 0)
|
|
610
|
+
throw new ReferenceError("Alias resolution is disabled");
|
|
635
611
|
let nodes;
|
|
636
612
|
if (ctx?.aliasResolveCache) {
|
|
637
613
|
nodes = ctx.aliasResolveCache;
|
|
@@ -722,9 +698,9 @@ var require_Alias = __commonJS({
|
|
|
722
698
|
}
|
|
723
699
|
});
|
|
724
700
|
|
|
725
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
701
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/Scalar.js
|
|
726
702
|
var require_Scalar = __commonJS({
|
|
727
|
-
"../node_modules/.bun/yaml@2.8.
|
|
703
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/Scalar.js"(exports) {
|
|
728
704
|
"use strict";
|
|
729
705
|
var identity = require_identity();
|
|
730
706
|
var Node = require_Node();
|
|
@@ -752,9 +728,9 @@ var require_Scalar = __commonJS({
|
|
|
752
728
|
}
|
|
753
729
|
});
|
|
754
730
|
|
|
755
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
731
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/doc/createNode.js
|
|
756
732
|
var require_createNode = __commonJS({
|
|
757
|
-
"../node_modules/.bun/yaml@2.8.
|
|
733
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/doc/createNode.js"(exports) {
|
|
758
734
|
"use strict";
|
|
759
735
|
var Alias = require_Alias();
|
|
760
736
|
var identity = require_identity();
|
|
@@ -827,9 +803,9 @@ var require_createNode = __commonJS({
|
|
|
827
803
|
}
|
|
828
804
|
});
|
|
829
805
|
|
|
830
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
806
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/Collection.js
|
|
831
807
|
var require_Collection = __commonJS({
|
|
832
|
-
"../node_modules/.bun/yaml@2.8.
|
|
808
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/Collection.js"(exports) {
|
|
833
809
|
"use strict";
|
|
834
810
|
var createNode = require_createNode();
|
|
835
811
|
var identity = require_identity();
|
|
@@ -970,9 +946,9 @@ var require_Collection = __commonJS({
|
|
|
970
946
|
}
|
|
971
947
|
});
|
|
972
948
|
|
|
973
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
949
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/stringifyComment.js
|
|
974
950
|
var require_stringifyComment = __commonJS({
|
|
975
|
-
"../node_modules/.bun/yaml@2.8.
|
|
951
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/stringifyComment.js"(exports) {
|
|
976
952
|
"use strict";
|
|
977
953
|
var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
|
|
978
954
|
function indentComment(comment, indent) {
|
|
@@ -987,9 +963,9 @@ var require_stringifyComment = __commonJS({
|
|
|
987
963
|
}
|
|
988
964
|
});
|
|
989
965
|
|
|
990
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
966
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/foldFlowLines.js
|
|
991
967
|
var require_foldFlowLines = __commonJS({
|
|
992
|
-
"../node_modules/.bun/yaml@2.8.
|
|
968
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/foldFlowLines.js"(exports) {
|
|
993
969
|
"use strict";
|
|
994
970
|
var FOLD_FLOW = "flow";
|
|
995
971
|
var FOLD_BLOCK = "block";
|
|
@@ -1123,9 +1099,9 @@ ${indent}${text.slice(fold + 1, end2)}`;
|
|
|
1123
1099
|
}
|
|
1124
1100
|
});
|
|
1125
1101
|
|
|
1126
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
1102
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/stringifyString.js
|
|
1127
1103
|
var require_stringifyString = __commonJS({
|
|
1128
|
-
"../node_modules/.bun/yaml@2.8.
|
|
1104
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/stringifyString.js"(exports) {
|
|
1129
1105
|
"use strict";
|
|
1130
1106
|
var Scalar = require_Scalar();
|
|
1131
1107
|
var foldFlowLines = require_foldFlowLines();
|
|
@@ -1406,9 +1382,9 @@ ${indent}`);
|
|
|
1406
1382
|
}
|
|
1407
1383
|
});
|
|
1408
1384
|
|
|
1409
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
1385
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/stringify.js
|
|
1410
1386
|
var require_stringify = __commonJS({
|
|
1411
|
-
"../node_modules/.bun/yaml@2.8.
|
|
1387
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/stringify.js"(exports) {
|
|
1412
1388
|
"use strict";
|
|
1413
1389
|
var anchors = require_anchors();
|
|
1414
1390
|
var identity = require_identity();
|
|
@@ -1530,9 +1506,9 @@ ${ctx.indent}${str}`;
|
|
|
1530
1506
|
}
|
|
1531
1507
|
});
|
|
1532
1508
|
|
|
1533
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
1509
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/stringifyPair.js
|
|
1534
1510
|
var require_stringifyPair = __commonJS({
|
|
1535
|
-
"../node_modules/.bun/yaml@2.8.
|
|
1511
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/stringifyPair.js"(exports) {
|
|
1536
1512
|
"use strict";
|
|
1537
1513
|
var identity = require_identity();
|
|
1538
1514
|
var Scalar = require_Scalar();
|
|
@@ -1663,9 +1639,9 @@ ${ctx.indent}`;
|
|
|
1663
1639
|
}
|
|
1664
1640
|
});
|
|
1665
1641
|
|
|
1666
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
1642
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/log.js
|
|
1667
1643
|
var require_log = __commonJS({
|
|
1668
|
-
"../node_modules/.bun/yaml@2.8.
|
|
1644
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/log.js"(exports) {
|
|
1669
1645
|
"use strict";
|
|
1670
1646
|
var node_process = __require("process");
|
|
1671
1647
|
function debug(logLevel, ...messages) {
|
|
@@ -1685,9 +1661,9 @@ var require_log = __commonJS({
|
|
|
1685
1661
|
}
|
|
1686
1662
|
});
|
|
1687
1663
|
|
|
1688
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
1664
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/merge.js
|
|
1689
1665
|
var require_merge = __commonJS({
|
|
1690
|
-
"../node_modules/.bun/yaml@2.8.
|
|
1666
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports) {
|
|
1691
1667
|
"use strict";
|
|
1692
1668
|
var identity = require_identity();
|
|
1693
1669
|
var Scalar = require_Scalar();
|
|
@@ -1704,18 +1680,18 @@ var require_merge = __commonJS({
|
|
|
1704
1680
|
};
|
|
1705
1681
|
var isMergeKey = (ctx, key) => (merge.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
|
|
1706
1682
|
function addMergeToJSMap(ctx, map, value) {
|
|
1707
|
-
|
|
1708
|
-
if (identity.isSeq(
|
|
1709
|
-
for (const it of
|
|
1683
|
+
const source = resolveAliasValue(ctx, value);
|
|
1684
|
+
if (identity.isSeq(source))
|
|
1685
|
+
for (const it of source.items)
|
|
1710
1686
|
mergeValue(ctx, map, it);
|
|
1711
|
-
else if (Array.isArray(
|
|
1712
|
-
for (const it of
|
|
1687
|
+
else if (Array.isArray(source))
|
|
1688
|
+
for (const it of source)
|
|
1713
1689
|
mergeValue(ctx, map, it);
|
|
1714
1690
|
else
|
|
1715
|
-
mergeValue(ctx, map,
|
|
1691
|
+
mergeValue(ctx, map, source);
|
|
1716
1692
|
}
|
|
1717
1693
|
function mergeValue(ctx, map, value) {
|
|
1718
|
-
const source = ctx
|
|
1694
|
+
const source = resolveAliasValue(ctx, value);
|
|
1719
1695
|
if (!identity.isMap(source))
|
|
1720
1696
|
throw new Error("Merge sources must be maps or map aliases");
|
|
1721
1697
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
@@ -1736,15 +1712,18 @@ var require_merge = __commonJS({
|
|
|
1736
1712
|
}
|
|
1737
1713
|
return map;
|
|
1738
1714
|
}
|
|
1715
|
+
function resolveAliasValue(ctx, value) {
|
|
1716
|
+
return ctx && identity.isAlias(value) ? value.resolve(ctx.doc, ctx) : value;
|
|
1717
|
+
}
|
|
1739
1718
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
1740
1719
|
exports.isMergeKey = isMergeKey;
|
|
1741
1720
|
exports.merge = merge;
|
|
1742
1721
|
}
|
|
1743
1722
|
});
|
|
1744
1723
|
|
|
1745
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
1724
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
1746
1725
|
var require_addPairToJSMap = __commonJS({
|
|
1747
|
-
"../node_modules/.bun/yaml@2.8.
|
|
1726
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports) {
|
|
1748
1727
|
"use strict";
|
|
1749
1728
|
var log = require_log();
|
|
1750
1729
|
var merge = require_merge();
|
|
@@ -1806,9 +1785,9 @@ var require_addPairToJSMap = __commonJS({
|
|
|
1806
1785
|
}
|
|
1807
1786
|
});
|
|
1808
1787
|
|
|
1809
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
1788
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/Pair.js
|
|
1810
1789
|
var require_Pair = __commonJS({
|
|
1811
|
-
"../node_modules/.bun/yaml@2.8.
|
|
1790
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/Pair.js"(exports) {
|
|
1812
1791
|
"use strict";
|
|
1813
1792
|
var createNode = require_createNode();
|
|
1814
1793
|
var stringifyPair = require_stringifyPair();
|
|
@@ -1846,9 +1825,9 @@ var require_Pair = __commonJS({
|
|
|
1846
1825
|
}
|
|
1847
1826
|
});
|
|
1848
1827
|
|
|
1849
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
1828
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/stringifyCollection.js
|
|
1850
1829
|
var require_stringifyCollection = __commonJS({
|
|
1851
|
-
"../node_modules/.bun/yaml@2.8.
|
|
1830
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/stringifyCollection.js"(exports) {
|
|
1852
1831
|
"use strict";
|
|
1853
1832
|
var identity = require_identity();
|
|
1854
1833
|
var stringify = require_stringify();
|
|
@@ -1997,9 +1976,9 @@ ${indent}${end}`;
|
|
|
1997
1976
|
}
|
|
1998
1977
|
});
|
|
1999
1978
|
|
|
2000
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
1979
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/YAMLMap.js
|
|
2001
1980
|
var require_YAMLMap = __commonJS({
|
|
2002
|
-
"../node_modules/.bun/yaml@2.8.
|
|
1981
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/YAMLMap.js"(exports) {
|
|
2003
1982
|
"use strict";
|
|
2004
1983
|
var stringifyCollection = require_stringifyCollection();
|
|
2005
1984
|
var addPairToJSMap = require_addPairToJSMap();
|
|
@@ -2141,9 +2120,9 @@ var require_YAMLMap = __commonJS({
|
|
|
2141
2120
|
}
|
|
2142
2121
|
});
|
|
2143
2122
|
|
|
2144
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2123
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/common/map.js
|
|
2145
2124
|
var require_map = __commonJS({
|
|
2146
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2125
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/common/map.js"(exports) {
|
|
2147
2126
|
"use strict";
|
|
2148
2127
|
var identity = require_identity();
|
|
2149
2128
|
var YAMLMap = require_YAMLMap();
|
|
@@ -2163,9 +2142,9 @@ var require_map = __commonJS({
|
|
|
2163
2142
|
}
|
|
2164
2143
|
});
|
|
2165
2144
|
|
|
2166
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2145
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/YAMLSeq.js
|
|
2167
2146
|
var require_YAMLSeq = __commonJS({
|
|
2168
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2147
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/nodes/YAMLSeq.js"(exports) {
|
|
2169
2148
|
"use strict";
|
|
2170
2149
|
var createNode = require_createNode();
|
|
2171
2150
|
var stringifyCollection = require_stringifyCollection();
|
|
@@ -2279,9 +2258,9 @@ var require_YAMLSeq = __commonJS({
|
|
|
2279
2258
|
}
|
|
2280
2259
|
});
|
|
2281
2260
|
|
|
2282
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2261
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/common/seq.js
|
|
2283
2262
|
var require_seq = __commonJS({
|
|
2284
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2263
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/common/seq.js"(exports) {
|
|
2285
2264
|
"use strict";
|
|
2286
2265
|
var identity = require_identity();
|
|
2287
2266
|
var YAMLSeq = require_YAMLSeq();
|
|
@@ -2301,9 +2280,9 @@ var require_seq = __commonJS({
|
|
|
2301
2280
|
}
|
|
2302
2281
|
});
|
|
2303
2282
|
|
|
2304
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2283
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/common/string.js
|
|
2305
2284
|
var require_string = __commonJS({
|
|
2306
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2285
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/common/string.js"(exports) {
|
|
2307
2286
|
"use strict";
|
|
2308
2287
|
var stringifyString = require_stringifyString();
|
|
2309
2288
|
var string = {
|
|
@@ -2320,9 +2299,9 @@ var require_string = __commonJS({
|
|
|
2320
2299
|
}
|
|
2321
2300
|
});
|
|
2322
2301
|
|
|
2323
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2302
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/common/null.js
|
|
2324
2303
|
var require_null = __commonJS({
|
|
2325
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2304
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/common/null.js"(exports) {
|
|
2326
2305
|
"use strict";
|
|
2327
2306
|
var Scalar = require_Scalar();
|
|
2328
2307
|
var nullTag = {
|
|
@@ -2338,9 +2317,9 @@ var require_null = __commonJS({
|
|
|
2338
2317
|
}
|
|
2339
2318
|
});
|
|
2340
2319
|
|
|
2341
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2320
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/core/bool.js
|
|
2342
2321
|
var require_bool = __commonJS({
|
|
2343
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2322
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/core/bool.js"(exports) {
|
|
2344
2323
|
"use strict";
|
|
2345
2324
|
var Scalar = require_Scalar();
|
|
2346
2325
|
var boolTag = {
|
|
@@ -2362,9 +2341,9 @@ var require_bool = __commonJS({
|
|
|
2362
2341
|
}
|
|
2363
2342
|
});
|
|
2364
2343
|
|
|
2365
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2344
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
2366
2345
|
var require_stringifyNumber = __commonJS({
|
|
2367
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2346
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/stringifyNumber.js"(exports) {
|
|
2368
2347
|
"use strict";
|
|
2369
2348
|
function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
2370
2349
|
if (typeof value === "bigint")
|
|
@@ -2373,7 +2352,7 @@ var require_stringifyNumber = __commonJS({
|
|
|
2373
2352
|
if (!isFinite(num))
|
|
2374
2353
|
return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf";
|
|
2375
2354
|
let n = Object.is(value, -0) ? "-0" : JSON.stringify(value);
|
|
2376
|
-
if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") &&
|
|
2355
|
+
if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^-?\d/.test(n) && !n.includes("e")) {
|
|
2377
2356
|
let i = n.indexOf(".");
|
|
2378
2357
|
if (i < 0) {
|
|
2379
2358
|
i = n.length;
|
|
@@ -2389,9 +2368,9 @@ var require_stringifyNumber = __commonJS({
|
|
|
2389
2368
|
}
|
|
2390
2369
|
});
|
|
2391
2370
|
|
|
2392
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2371
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/core/float.js
|
|
2393
2372
|
var require_float = __commonJS({
|
|
2394
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2373
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/core/float.js"(exports) {
|
|
2395
2374
|
"use strict";
|
|
2396
2375
|
var Scalar = require_Scalar();
|
|
2397
2376
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -2435,9 +2414,9 @@ var require_float = __commonJS({
|
|
|
2435
2414
|
}
|
|
2436
2415
|
});
|
|
2437
2416
|
|
|
2438
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2417
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/core/int.js
|
|
2439
2418
|
var require_int = __commonJS({
|
|
2440
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2419
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/core/int.js"(exports) {
|
|
2441
2420
|
"use strict";
|
|
2442
2421
|
var stringifyNumber = require_stringifyNumber();
|
|
2443
2422
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -2480,9 +2459,9 @@ var require_int = __commonJS({
|
|
|
2480
2459
|
}
|
|
2481
2460
|
});
|
|
2482
2461
|
|
|
2483
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2462
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/core/schema.js
|
|
2484
2463
|
var require_schema = __commonJS({
|
|
2485
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2464
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/core/schema.js"(exports) {
|
|
2486
2465
|
"use strict";
|
|
2487
2466
|
var map = require_map();
|
|
2488
2467
|
var _null = require_null();
|
|
@@ -2508,9 +2487,9 @@ var require_schema = __commonJS({
|
|
|
2508
2487
|
}
|
|
2509
2488
|
});
|
|
2510
2489
|
|
|
2511
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2490
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/json/schema.js
|
|
2512
2491
|
var require_schema2 = __commonJS({
|
|
2513
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2492
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/json/schema.js"(exports) {
|
|
2514
2493
|
"use strict";
|
|
2515
2494
|
var Scalar = require_Scalar();
|
|
2516
2495
|
var map = require_map();
|
|
@@ -2575,9 +2554,9 @@ var require_schema2 = __commonJS({
|
|
|
2575
2554
|
}
|
|
2576
2555
|
});
|
|
2577
2556
|
|
|
2578
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2557
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/binary.js
|
|
2579
2558
|
var require_binary = __commonJS({
|
|
2580
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2559
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports) {
|
|
2581
2560
|
"use strict";
|
|
2582
2561
|
var node_buffer = __require("buffer");
|
|
2583
2562
|
var Scalar = require_Scalar();
|
|
@@ -2641,9 +2620,9 @@ var require_binary = __commonJS({
|
|
|
2641
2620
|
}
|
|
2642
2621
|
});
|
|
2643
2622
|
|
|
2644
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2623
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
|
|
2645
2624
|
var require_pairs = __commonJS({
|
|
2646
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2625
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports) {
|
|
2647
2626
|
"use strict";
|
|
2648
2627
|
var identity = require_identity();
|
|
2649
2628
|
var Pair = require_Pair();
|
|
@@ -2719,9 +2698,9 @@ ${cn.comment}` : item.comment;
|
|
|
2719
2698
|
}
|
|
2720
2699
|
});
|
|
2721
2700
|
|
|
2722
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2701
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/omap.js
|
|
2723
2702
|
var require_omap = __commonJS({
|
|
2724
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2703
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports) {
|
|
2725
2704
|
"use strict";
|
|
2726
2705
|
var identity = require_identity();
|
|
2727
2706
|
var toJS = require_toJS();
|
|
@@ -2797,9 +2776,9 @@ var require_omap = __commonJS({
|
|
|
2797
2776
|
}
|
|
2798
2777
|
});
|
|
2799
2778
|
|
|
2800
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2779
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/bool.js
|
|
2801
2780
|
var require_bool2 = __commonJS({
|
|
2802
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2781
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports) {
|
|
2803
2782
|
"use strict";
|
|
2804
2783
|
var Scalar = require_Scalar();
|
|
2805
2784
|
function boolStringify({ value, source }, ctx) {
|
|
@@ -2829,9 +2808,9 @@ var require_bool2 = __commonJS({
|
|
|
2829
2808
|
}
|
|
2830
2809
|
});
|
|
2831
2810
|
|
|
2832
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2811
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/float.js
|
|
2833
2812
|
var require_float2 = __commonJS({
|
|
2834
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2813
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports) {
|
|
2835
2814
|
"use strict";
|
|
2836
2815
|
var Scalar = require_Scalar();
|
|
2837
2816
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -2878,9 +2857,9 @@ var require_float2 = __commonJS({
|
|
|
2878
2857
|
}
|
|
2879
2858
|
});
|
|
2880
2859
|
|
|
2881
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2860
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/int.js
|
|
2882
2861
|
var require_int2 = __commonJS({
|
|
2883
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2862
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/int.js"(exports) {
|
|
2884
2863
|
"use strict";
|
|
2885
2864
|
var stringifyNumber = require_stringifyNumber();
|
|
2886
2865
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -2957,9 +2936,9 @@ var require_int2 = __commonJS({
|
|
|
2957
2936
|
}
|
|
2958
2937
|
});
|
|
2959
2938
|
|
|
2960
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
2939
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/set.js
|
|
2961
2940
|
var require_set = __commonJS({
|
|
2962
|
-
"../node_modules/.bun/yaml@2.8.
|
|
2941
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports) {
|
|
2963
2942
|
"use strict";
|
|
2964
2943
|
var identity = require_identity();
|
|
2965
2944
|
var Pair = require_Pair();
|
|
@@ -3046,9 +3025,9 @@ var require_set = __commonJS({
|
|
|
3046
3025
|
}
|
|
3047
3026
|
});
|
|
3048
3027
|
|
|
3049
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
3028
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
|
|
3050
3029
|
var require_timestamp = __commonJS({
|
|
3051
|
-
"../node_modules/.bun/yaml@2.8.
|
|
3030
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports) {
|
|
3052
3031
|
"use strict";
|
|
3053
3032
|
var stringifyNumber = require_stringifyNumber();
|
|
3054
3033
|
function parseSexagesimal(str, asBigInt) {
|
|
@@ -3134,9 +3113,9 @@ var require_timestamp = __commonJS({
|
|
|
3134
3113
|
}
|
|
3135
3114
|
});
|
|
3136
3115
|
|
|
3137
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
3116
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/schema.js
|
|
3138
3117
|
var require_schema3 = __commonJS({
|
|
3139
|
-
"../node_modules/.bun/yaml@2.8.
|
|
3118
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports) {
|
|
3140
3119
|
"use strict";
|
|
3141
3120
|
var map = require_map();
|
|
3142
3121
|
var _null = require_null();
|
|
@@ -3178,9 +3157,9 @@ var require_schema3 = __commonJS({
|
|
|
3178
3157
|
}
|
|
3179
3158
|
});
|
|
3180
3159
|
|
|
3181
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
3160
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/tags.js
|
|
3182
3161
|
var require_tags = __commonJS({
|
|
3183
|
-
"../node_modules/.bun/yaml@2.8.
|
|
3162
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/tags.js"(exports) {
|
|
3184
3163
|
"use strict";
|
|
3185
3164
|
var map = require_map();
|
|
3186
3165
|
var _null = require_null();
|
|
@@ -3272,9 +3251,9 @@ var require_tags = __commonJS({
|
|
|
3272
3251
|
}
|
|
3273
3252
|
});
|
|
3274
3253
|
|
|
3275
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
3254
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/Schema.js
|
|
3276
3255
|
var require_Schema = __commonJS({
|
|
3277
|
-
"../node_modules/.bun/yaml@2.8.
|
|
3256
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/schema/Schema.js"(exports) {
|
|
3278
3257
|
"use strict";
|
|
3279
3258
|
var identity = require_identity();
|
|
3280
3259
|
var map = require_map();
|
|
@@ -3304,9 +3283,9 @@ var require_Schema = __commonJS({
|
|
|
3304
3283
|
}
|
|
3305
3284
|
});
|
|
3306
3285
|
|
|
3307
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
3286
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/stringifyDocument.js
|
|
3308
3287
|
var require_stringifyDocument = __commonJS({
|
|
3309
|
-
"../node_modules/.bun/yaml@2.8.
|
|
3288
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/stringify/stringifyDocument.js"(exports) {
|
|
3310
3289
|
"use strict";
|
|
3311
3290
|
var identity = require_identity();
|
|
3312
3291
|
var stringify = require_stringify();
|
|
@@ -3384,9 +3363,9 @@ var require_stringifyDocument = __commonJS({
|
|
|
3384
3363
|
}
|
|
3385
3364
|
});
|
|
3386
3365
|
|
|
3387
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
3366
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/doc/Document.js
|
|
3388
3367
|
var require_Document = __commonJS({
|
|
3389
|
-
"../node_modules/.bun/yaml@2.8.
|
|
3368
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/doc/Document.js"(exports) {
|
|
3390
3369
|
"use strict";
|
|
3391
3370
|
var Alias = require_Alias();
|
|
3392
3371
|
var Collection = require_Collection();
|
|
@@ -3693,9 +3672,9 @@ var require_Document = __commonJS({
|
|
|
3693
3672
|
}
|
|
3694
3673
|
});
|
|
3695
3674
|
|
|
3696
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
3675
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/errors.js
|
|
3697
3676
|
var require_errors = __commonJS({
|
|
3698
|
-
"../node_modules/.bun/yaml@2.8.
|
|
3677
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/errors.js"(exports) {
|
|
3699
3678
|
"use strict";
|
|
3700
3679
|
var YAMLError = class extends Error {
|
|
3701
3680
|
constructor(name, pos, code, message) {
|
|
@@ -3758,9 +3737,9 @@ ${pointer}
|
|
|
3758
3737
|
}
|
|
3759
3738
|
});
|
|
3760
3739
|
|
|
3761
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
3740
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/resolve-props.js
|
|
3762
3741
|
var require_resolve_props = __commonJS({
|
|
3763
|
-
"../node_modules/.bun/yaml@2.8.
|
|
3742
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/resolve-props.js"(exports) {
|
|
3764
3743
|
"use strict";
|
|
3765
3744
|
function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
|
|
3766
3745
|
let spaceBefore = false;
|
|
@@ -3892,9 +3871,9 @@ var require_resolve_props = __commonJS({
|
|
|
3892
3871
|
}
|
|
3893
3872
|
});
|
|
3894
3873
|
|
|
3895
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
3874
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/util-contains-newline.js
|
|
3896
3875
|
var require_util_contains_newline = __commonJS({
|
|
3897
|
-
"../node_modules/.bun/yaml@2.8.
|
|
3876
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/util-contains-newline.js"(exports) {
|
|
3898
3877
|
"use strict";
|
|
3899
3878
|
function containsNewline(key) {
|
|
3900
3879
|
if (!key)
|
|
@@ -3934,9 +3913,9 @@ var require_util_contains_newline = __commonJS({
|
|
|
3934
3913
|
}
|
|
3935
3914
|
});
|
|
3936
3915
|
|
|
3937
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
3916
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/util-flow-indent-check.js
|
|
3938
3917
|
var require_util_flow_indent_check = __commonJS({
|
|
3939
|
-
"../node_modules/.bun/yaml@2.8.
|
|
3918
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/util-flow-indent-check.js"(exports) {
|
|
3940
3919
|
"use strict";
|
|
3941
3920
|
var utilContainsNewline = require_util_contains_newline();
|
|
3942
3921
|
function flowIndentCheck(indent, fc, onError) {
|
|
@@ -3952,9 +3931,9 @@ var require_util_flow_indent_check = __commonJS({
|
|
|
3952
3931
|
}
|
|
3953
3932
|
});
|
|
3954
3933
|
|
|
3955
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
3934
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/util-map-includes.js
|
|
3956
3935
|
var require_util_map_includes = __commonJS({
|
|
3957
|
-
"../node_modules/.bun/yaml@2.8.
|
|
3936
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/util-map-includes.js"(exports) {
|
|
3958
3937
|
"use strict";
|
|
3959
3938
|
var identity = require_identity();
|
|
3960
3939
|
function mapIncludes(ctx, items, search) {
|
|
@@ -3968,9 +3947,9 @@ var require_util_map_includes = __commonJS({
|
|
|
3968
3947
|
}
|
|
3969
3948
|
});
|
|
3970
3949
|
|
|
3971
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
3950
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/resolve-block-map.js
|
|
3972
3951
|
var require_resolve_block_map = __commonJS({
|
|
3973
|
-
"../node_modules/.bun/yaml@2.8.
|
|
3952
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/resolve-block-map.js"(exports) {
|
|
3974
3953
|
"use strict";
|
|
3975
3954
|
var Pair = require_Pair();
|
|
3976
3955
|
var YAMLMap = require_YAMLMap();
|
|
@@ -4076,9 +4055,9 @@ var require_resolve_block_map = __commonJS({
|
|
|
4076
4055
|
}
|
|
4077
4056
|
});
|
|
4078
4057
|
|
|
4079
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
4058
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/resolve-block-seq.js
|
|
4080
4059
|
var require_resolve_block_seq = __commonJS({
|
|
4081
|
-
"../node_modules/.bun/yaml@2.8.
|
|
4060
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/resolve-block-seq.js"(exports) {
|
|
4082
4061
|
"use strict";
|
|
4083
4062
|
var YAMLSeq = require_YAMLSeq();
|
|
4084
4063
|
var resolveProps = require_resolve_props();
|
|
@@ -4127,9 +4106,9 @@ var require_resolve_block_seq = __commonJS({
|
|
|
4127
4106
|
}
|
|
4128
4107
|
});
|
|
4129
4108
|
|
|
4130
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
4109
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/resolve-end.js
|
|
4131
4110
|
var require_resolve_end = __commonJS({
|
|
4132
|
-
"../node_modules/.bun/yaml@2.8.
|
|
4111
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/resolve-end.js"(exports) {
|
|
4133
4112
|
"use strict";
|
|
4134
4113
|
function resolveEnd(end, offset, reqSpace, onError) {
|
|
4135
4114
|
let comment = "";
|
|
@@ -4170,9 +4149,9 @@ var require_resolve_end = __commonJS({
|
|
|
4170
4149
|
}
|
|
4171
4150
|
});
|
|
4172
4151
|
|
|
4173
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
4152
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/resolve-flow-collection.js
|
|
4174
4153
|
var require_resolve_flow_collection = __commonJS({
|
|
4175
|
-
"../node_modules/.bun/yaml@2.8.
|
|
4154
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/resolve-flow-collection.js"(exports) {
|
|
4176
4155
|
"use strict";
|
|
4177
4156
|
var identity = require_identity();
|
|
4178
4157
|
var Pair = require_Pair();
|
|
@@ -4364,9 +4343,9 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
4364
4343
|
}
|
|
4365
4344
|
});
|
|
4366
4345
|
|
|
4367
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
4346
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/compose-collection.js
|
|
4368
4347
|
var require_compose_collection = __commonJS({
|
|
4369
|
-
"../node_modules/.bun/yaml@2.8.
|
|
4348
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/compose-collection.js"(exports) {
|
|
4370
4349
|
"use strict";
|
|
4371
4350
|
var identity = require_identity();
|
|
4372
4351
|
var Scalar = require_Scalar();
|
|
@@ -4429,9 +4408,9 @@ var require_compose_collection = __commonJS({
|
|
|
4429
4408
|
}
|
|
4430
4409
|
});
|
|
4431
4410
|
|
|
4432
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
4411
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/resolve-block-scalar.js
|
|
4433
4412
|
var require_resolve_block_scalar = __commonJS({
|
|
4434
|
-
"../node_modules/.bun/yaml@2.8.
|
|
4413
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/resolve-block-scalar.js"(exports) {
|
|
4435
4414
|
"use strict";
|
|
4436
4415
|
var Scalar = require_Scalar();
|
|
4437
4416
|
function resolveBlockScalar(ctx, scalar, onError) {
|
|
@@ -4612,9 +4591,9 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4612
4591
|
}
|
|
4613
4592
|
});
|
|
4614
4593
|
|
|
4615
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
4594
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/resolve-flow-scalar.js
|
|
4616
4595
|
var require_resolve_flow_scalar = __commonJS({
|
|
4617
|
-
"../node_modules/.bun/yaml@2.8.
|
|
4596
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/resolve-flow-scalar.js"(exports) {
|
|
4618
4597
|
"use strict";
|
|
4619
4598
|
var Scalar = require_Scalar();
|
|
4620
4599
|
var resolveEnd = require_resolve_end();
|
|
@@ -4745,7 +4724,7 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
4745
4724
|
while (next === " " || next === " ")
|
|
4746
4725
|
next = source[++i + 1];
|
|
4747
4726
|
} else if (next === "x" || next === "u" || next === "U") {
|
|
4748
|
-
const length =
|
|
4727
|
+
const length = next === "x" ? 2 : next === "u" ? 4 : 8;
|
|
4749
4728
|
res += parseCharCode(source, i + 1, length, onError);
|
|
4750
4729
|
i += length;
|
|
4751
4730
|
} else {
|
|
@@ -4820,20 +4799,21 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
4820
4799
|
const cc = source.substr(offset, length);
|
|
4821
4800
|
const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
|
|
4822
4801
|
const code = ok ? parseInt(cc, 16) : NaN;
|
|
4823
|
-
|
|
4802
|
+
try {
|
|
4803
|
+
return String.fromCodePoint(code);
|
|
4804
|
+
} catch {
|
|
4824
4805
|
const raw = source.substr(offset - 2, length + 2);
|
|
4825
4806
|
onError(offset - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`);
|
|
4826
4807
|
return raw;
|
|
4827
4808
|
}
|
|
4828
|
-
return String.fromCodePoint(code);
|
|
4829
4809
|
}
|
|
4830
4810
|
exports.resolveFlowScalar = resolveFlowScalar;
|
|
4831
4811
|
}
|
|
4832
4812
|
});
|
|
4833
4813
|
|
|
4834
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
4814
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/compose-scalar.js
|
|
4835
4815
|
var require_compose_scalar = __commonJS({
|
|
4836
|
-
"../node_modules/.bun/yaml@2.8.
|
|
4816
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/compose-scalar.js"(exports) {
|
|
4837
4817
|
"use strict";
|
|
4838
4818
|
var identity = require_identity();
|
|
4839
4819
|
var Scalar = require_Scalar();
|
|
@@ -4912,9 +4892,9 @@ var require_compose_scalar = __commonJS({
|
|
|
4912
4892
|
}
|
|
4913
4893
|
});
|
|
4914
4894
|
|
|
4915
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
4895
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/util-empty-scalar-position.js
|
|
4916
4896
|
var require_util_empty_scalar_position = __commonJS({
|
|
4917
|
-
"../node_modules/.bun/yaml@2.8.
|
|
4897
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/util-empty-scalar-position.js"(exports) {
|
|
4918
4898
|
"use strict";
|
|
4919
4899
|
function emptyScalarPosition(offset, before, pos) {
|
|
4920
4900
|
if (before) {
|
|
@@ -4942,9 +4922,9 @@ var require_util_empty_scalar_position = __commonJS({
|
|
|
4942
4922
|
}
|
|
4943
4923
|
});
|
|
4944
4924
|
|
|
4945
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
4925
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/compose-node.js
|
|
4946
4926
|
var require_compose_node = __commonJS({
|
|
4947
|
-
"../node_modules/.bun/yaml@2.8.
|
|
4927
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/compose-node.js"(exports) {
|
|
4948
4928
|
"use strict";
|
|
4949
4929
|
var Alias = require_Alias();
|
|
4950
4930
|
var identity = require_identity();
|
|
@@ -5048,9 +5028,9 @@ var require_compose_node = __commonJS({
|
|
|
5048
5028
|
}
|
|
5049
5029
|
});
|
|
5050
5030
|
|
|
5051
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
5031
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/compose-doc.js
|
|
5052
5032
|
var require_compose_doc = __commonJS({
|
|
5053
|
-
"../node_modules/.bun/yaml@2.8.
|
|
5033
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/compose-doc.js"(exports) {
|
|
5054
5034
|
"use strict";
|
|
5055
5035
|
var Document = require_Document();
|
|
5056
5036
|
var composeNode = require_compose_node();
|
|
@@ -5091,9 +5071,9 @@ var require_compose_doc = __commonJS({
|
|
|
5091
5071
|
}
|
|
5092
5072
|
});
|
|
5093
5073
|
|
|
5094
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
5074
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/composer.js
|
|
5095
5075
|
var require_composer = __commonJS({
|
|
5096
|
-
"../node_modules/.bun/yaml@2.8.
|
|
5076
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/compose/composer.js"(exports) {
|
|
5097
5077
|
"use strict";
|
|
5098
5078
|
var node_process = __require("process");
|
|
5099
5079
|
var directives = require_directives();
|
|
@@ -5297,9 +5277,9 @@ ${end.comment}` : end.comment;
|
|
|
5297
5277
|
}
|
|
5298
5278
|
});
|
|
5299
5279
|
|
|
5300
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
5280
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/parse/cst-scalar.js
|
|
5301
5281
|
var require_cst_scalar = __commonJS({
|
|
5302
|
-
"../node_modules/.bun/yaml@2.8.
|
|
5282
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/parse/cst-scalar.js"(exports) {
|
|
5303
5283
|
"use strict";
|
|
5304
5284
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
5305
5285
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
@@ -5482,9 +5462,9 @@ var require_cst_scalar = __commonJS({
|
|
|
5482
5462
|
}
|
|
5483
5463
|
});
|
|
5484
5464
|
|
|
5485
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
5465
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/parse/cst-stringify.js
|
|
5486
5466
|
var require_cst_stringify = __commonJS({
|
|
5487
|
-
"../node_modules/.bun/yaml@2.8.
|
|
5467
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/parse/cst-stringify.js"(exports) {
|
|
5488
5468
|
"use strict";
|
|
5489
5469
|
var stringify = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst);
|
|
5490
5470
|
function stringifyToken(token) {
|
|
@@ -5543,9 +5523,9 @@ var require_cst_stringify = __commonJS({
|
|
|
5543
5523
|
}
|
|
5544
5524
|
});
|
|
5545
5525
|
|
|
5546
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
5526
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/parse/cst-visit.js
|
|
5547
5527
|
var require_cst_visit = __commonJS({
|
|
5548
|
-
"../node_modules/.bun/yaml@2.8.
|
|
5528
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/parse/cst-visit.js"(exports) {
|
|
5549
5529
|
"use strict";
|
|
5550
5530
|
var BREAK = /* @__PURE__ */ Symbol("break visit");
|
|
5551
5531
|
var SKIP = /* @__PURE__ */ Symbol("skip children");
|
|
@@ -5605,9 +5585,9 @@ var require_cst_visit = __commonJS({
|
|
|
5605
5585
|
}
|
|
5606
5586
|
});
|
|
5607
5587
|
|
|
5608
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
5588
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/parse/cst.js
|
|
5609
5589
|
var require_cst = __commonJS({
|
|
5610
|
-
"../node_modules/.bun/yaml@2.8.
|
|
5590
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/parse/cst.js"(exports) {
|
|
5611
5591
|
"use strict";
|
|
5612
5592
|
var cstScalar = require_cst_scalar();
|
|
5613
5593
|
var cstStringify = require_cst_stringify();
|
|
@@ -5707,9 +5687,9 @@ var require_cst = __commonJS({
|
|
|
5707
5687
|
}
|
|
5708
5688
|
});
|
|
5709
5689
|
|
|
5710
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
5690
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/parse/lexer.js
|
|
5711
5691
|
var require_lexer = __commonJS({
|
|
5712
|
-
"../node_modules/.bun/yaml@2.8.
|
|
5692
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/parse/lexer.js"(exports) {
|
|
5713
5693
|
"use strict";
|
|
5714
5694
|
var cst = require_cst();
|
|
5715
5695
|
function isEmpty(ch) {
|
|
@@ -6286,9 +6266,9 @@ var require_lexer = __commonJS({
|
|
|
6286
6266
|
}
|
|
6287
6267
|
});
|
|
6288
6268
|
|
|
6289
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
6269
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/parse/line-counter.js
|
|
6290
6270
|
var require_line_counter = __commonJS({
|
|
6291
|
-
"../node_modules/.bun/yaml@2.8.
|
|
6271
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/parse/line-counter.js"(exports) {
|
|
6292
6272
|
"use strict";
|
|
6293
6273
|
var LineCounter = class {
|
|
6294
6274
|
constructor() {
|
|
@@ -6317,9 +6297,9 @@ var require_line_counter = __commonJS({
|
|
|
6317
6297
|
}
|
|
6318
6298
|
});
|
|
6319
6299
|
|
|
6320
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
6300
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/parse/parser.js
|
|
6321
6301
|
var require_parser = __commonJS({
|
|
6322
|
-
"../node_modules/.bun/yaml@2.8.
|
|
6302
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/parse/parser.js"(exports) {
|
|
6323
6303
|
"use strict";
|
|
6324
6304
|
var node_process = __require("process");
|
|
6325
6305
|
var cst = require_cst();
|
|
@@ -7184,9 +7164,9 @@ var require_parser = __commonJS({
|
|
|
7184
7164
|
}
|
|
7185
7165
|
});
|
|
7186
7166
|
|
|
7187
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
7167
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/public-api.js
|
|
7188
7168
|
var require_public_api = __commonJS({
|
|
7189
|
-
"../node_modules/.bun/yaml@2.8.
|
|
7169
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/public-api.js"(exports) {
|
|
7190
7170
|
"use strict";
|
|
7191
7171
|
var composer = require_composer();
|
|
7192
7172
|
var Document = require_Document();
|
|
@@ -7281,9 +7261,9 @@ var require_public_api = __commonJS({
|
|
|
7281
7261
|
}
|
|
7282
7262
|
});
|
|
7283
7263
|
|
|
7284
|
-
// ../node_modules/.bun/yaml@2.8.
|
|
7264
|
+
// ../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/index.js
|
|
7285
7265
|
var require_dist = __commonJS({
|
|
7286
|
-
"../node_modules/.bun/yaml@2.8.
|
|
7266
|
+
"../node_modules/.bun/yaml@2.8.4/node_modules/yaml/dist/index.js"(exports) {
|
|
7287
7267
|
"use strict";
|
|
7288
7268
|
var composer = require_composer();
|
|
7289
7269
|
var Document = require_Document();
|
|
@@ -7338,6 +7318,9 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
7338
7318
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
7339
7319
|
import { z } from "zod";
|
|
7340
7320
|
|
|
7321
|
+
// ../shared/src/event.ts
|
|
7322
|
+
var CODEX_QUOTA_STATUS_EVENT_TYPE = "codex-quota-status";
|
|
7323
|
+
|
|
7341
7324
|
// ../shared/src/pricing.ts
|
|
7342
7325
|
var PLANS = {
|
|
7343
7326
|
hobby: {
|
|
@@ -7345,31 +7328,47 @@ var PLANS = {
|
|
|
7345
7328
|
name: "Hobby",
|
|
7346
7329
|
monthlyPrice: 0,
|
|
7347
7330
|
seatPriceCents: 0,
|
|
7348
|
-
creditsIncluded:
|
|
7349
|
-
features: [
|
|
7331
|
+
creditsIncluded: 1200,
|
|
7332
|
+
features: [
|
|
7333
|
+
"1,200 minutes of human-initiated workspace usage (one-time)",
|
|
7334
|
+
"1,200 minutes of API + automation usage (one-time)",
|
|
7335
|
+
"Automations (limited to 2)",
|
|
7336
|
+
"Warm pools and warm hooks",
|
|
7337
|
+
"Up to 3 repositories",
|
|
7338
|
+
"Up to 5 environments"
|
|
7339
|
+
]
|
|
7350
7340
|
},
|
|
7351
7341
|
developer: {
|
|
7352
7342
|
id: "developer",
|
|
7353
7343
|
name: "Developer",
|
|
7354
|
-
monthlyPrice:
|
|
7355
|
-
seatPriceCents:
|
|
7344
|
+
monthlyPrice: 120,
|
|
7345
|
+
seatPriceCents: 12e3,
|
|
7356
7346
|
creditsIncluded: 0,
|
|
7357
|
-
features: [
|
|
7347
|
+
features: [
|
|
7348
|
+
"Unlimited human-initiated workspaces",
|
|
7349
|
+
"5,000 included automation/API minutes per month",
|
|
7350
|
+
"Up to 10 repositories",
|
|
7351
|
+
"Up to 15 environments",
|
|
7352
|
+
"Up to 5 automations",
|
|
7353
|
+
"Warm pools and warm hooks",
|
|
7354
|
+
"API access"
|
|
7355
|
+
]
|
|
7358
7356
|
},
|
|
7359
7357
|
team: {
|
|
7360
7358
|
id: "team",
|
|
7361
7359
|
name: "Team",
|
|
7362
|
-
monthlyPrice:
|
|
7363
|
-
seatPriceCents:
|
|
7360
|
+
monthlyPrice: 300,
|
|
7361
|
+
seatPriceCents: 3e4,
|
|
7364
7362
|
creditsIncluded: 0,
|
|
7365
7363
|
features: [
|
|
7366
|
-
"Unlimited
|
|
7364
|
+
"Unlimited human-initiated workspaces",
|
|
7365
|
+
"15,000 included automation/API minutes per month",
|
|
7366
|
+
"Unlimited repositories",
|
|
7367
7367
|
"Unlimited automations",
|
|
7368
|
-
"API access",
|
|
7369
7368
|
"Higher API rate limits",
|
|
7370
|
-
"Warm
|
|
7371
|
-
"
|
|
7372
|
-
"
|
|
7369
|
+
"Warm pools and warm hooks",
|
|
7370
|
+
"Auto-upgraded sandbox resources (4 vCPU, 32 GB disk, 16 GB memory)",
|
|
7371
|
+
"Shared Slack support channel"
|
|
7373
7372
|
]
|
|
7374
7373
|
},
|
|
7375
7374
|
enterprise: {
|
|
@@ -7399,6 +7398,1113 @@ var SANDBOX_LIFECYCLE = {
|
|
|
7399
7398
|
AUTO_DELETE_MINUTES: -1,
|
|
7400
7399
|
SSH_TOKEN_EXPIRATION_MINUTES: 3 * 60
|
|
7401
7400
|
};
|
|
7401
|
+
function buildPaths(homeDir) {
|
|
7402
|
+
return {
|
|
7403
|
+
HOME_DIR: homeDir,
|
|
7404
|
+
WORKSPACES_DIR: `${homeDir}/workspaces`,
|
|
7405
|
+
REPLICAS_DIR: `${homeDir}/.replicas`,
|
|
7406
|
+
REPLICAS_FILES_DIR: `${homeDir}/.replicas/files`,
|
|
7407
|
+
REPLICAS_RUNTIME_ENV_FILE: `${homeDir}/.replicas/runtime-env.sh`
|
|
7408
|
+
};
|
|
7409
|
+
}
|
|
7410
|
+
var DAYTONA_PATHS = buildPaths("/home/ubuntu");
|
|
7411
|
+
var E2B_PATHS = buildPaths("/home/user");
|
|
7412
|
+
|
|
7413
|
+
// ../shared/src/default-skills/replicas-agent/abilities/docker.ts
|
|
7414
|
+
var SECTION = `### Docker
|
|
7415
|
+
Start and use the Docker daemon in Replicas workspaces. Docker is pre-installed but the daemon does not auto-start.
|
|
7416
|
+
|
|
7417
|
+
**Reference:** \`references/DOCKER.md\`
|
|
7418
|
+
|
|
7419
|
+
Use this when:
|
|
7420
|
+
- You need to run \`docker\` or \`docker compose\` commands
|
|
7421
|
+
- You need to build or run Docker containers
|
|
7422
|
+
- Your task involves containerized services or Docker-based workflows`;
|
|
7423
|
+
var REFERENCE = `# Docker
|
|
7424
|
+
|
|
7425
|
+
Docker is pre-installed in Replicas workspaces, but the daemon does **not** auto-start. You must start it manually before running any \`docker\` or \`docker compose\` commands.
|
|
7426
|
+
|
|
7427
|
+
## Starting the Docker Daemon
|
|
7428
|
+
|
|
7429
|
+
\`\`\`bash
|
|
7430
|
+
sudo service docker start
|
|
7431
|
+
\`\`\`
|
|
7432
|
+
|
|
7433
|
+
After starting, verify the daemon is running:
|
|
7434
|
+
|
|
7435
|
+
\`\`\`bash
|
|
7436
|
+
docker info
|
|
7437
|
+
\`\`\`
|
|
7438
|
+
|
|
7439
|
+
## Important Notes
|
|
7440
|
+
|
|
7441
|
+
- **Start once per session.** The daemon stays running until the workspace shuts down. You do not need to restart it between commands.
|
|
7442
|
+
- **Check before starting.** If you are unsure whether the daemon is already running, check first to avoid an unnecessary restart:
|
|
7443
|
+
\`\`\`bash
|
|
7444
|
+
docker info > /dev/null 2>&1 || sudo service docker start
|
|
7445
|
+
\`\`\`
|
|
7446
|
+
- **Sudo is required** for starting the daemon, but regular \`docker\` commands run without sudo (the user is in the \`docker\` group).
|
|
7447
|
+
`;
|
|
7448
|
+
var DOCKER_ABILITY = {
|
|
7449
|
+
label: "Docker",
|
|
7450
|
+
description: "Start the daemon, build/run containers, drive `docker compose`.",
|
|
7451
|
+
bullet: "- Using Docker (starting the daemon, running containers, docker compose)",
|
|
7452
|
+
section: SECTION,
|
|
7453
|
+
referenceFile: { name: "DOCKER.md", content: REFERENCE }
|
|
7454
|
+
};
|
|
7455
|
+
|
|
7456
|
+
// ../shared/src/default-skills/replicas-agent/abilities/github.ts
|
|
7457
|
+
var SECTION2 = `### GitHub
|
|
7458
|
+
Use the pre-authenticated \`gh\` CLI for pull requests, issues, actions, and API calls.
|
|
7459
|
+
|
|
7460
|
+
**Reference:** \`references/GITHUB.md\`
|
|
7461
|
+
|
|
7462
|
+
Use this when:
|
|
7463
|
+
- You need to create, review, or manage pull requests
|
|
7464
|
+
- You need to interact with GitHub issues or actions
|
|
7465
|
+
- You need to use the GitHub API for advanced operations
|
|
7466
|
+
- You need to include images in PR descriptions`;
|
|
7467
|
+
var REFERENCE2 = `# GitHub Integration
|
|
7468
|
+
|
|
7469
|
+
This guide covers how to interact with GitHub from within your Replicas workspace.
|
|
7470
|
+
|
|
7471
|
+
## Prerequisites
|
|
7472
|
+
|
|
7473
|
+
The \`gh\` CLI is pre-installed and authenticated in your workspace. You can verify this:
|
|
7474
|
+
|
|
7475
|
+
\`\`\`bash
|
|
7476
|
+
gh auth status
|
|
7477
|
+
\`\`\`
|
|
7478
|
+
|
|
7479
|
+
If authenticated, you can immediately use \`gh\` for all GitHub operations. No additional setup is needed.
|
|
7480
|
+
|
|
7481
|
+
## Using the \`gh\` CLI
|
|
7482
|
+
|
|
7483
|
+
The GitHub CLI (\`gh\`) is the recommended way to interact with GitHub. It handles authentication, pagination, and API formatting automatically.
|
|
7484
|
+
|
|
7485
|
+
### Pull Requests
|
|
7486
|
+
|
|
7487
|
+
\`\`\`bash
|
|
7488
|
+
# Create a PR
|
|
7489
|
+
gh pr create --title "Title" --body "Description"
|
|
7490
|
+
|
|
7491
|
+
# List open PRs
|
|
7492
|
+
gh pr list
|
|
7493
|
+
|
|
7494
|
+
# View a specific PR
|
|
7495
|
+
gh pr view 123
|
|
7496
|
+
|
|
7497
|
+
# Review/check PR status
|
|
7498
|
+
gh pr checks 123
|
|
7499
|
+
|
|
7500
|
+
# Merge a PR
|
|
7501
|
+
gh pr merge 123
|
|
7502
|
+
\`\`\`
|
|
7503
|
+
|
|
7504
|
+
### Issues
|
|
7505
|
+
|
|
7506
|
+
\`\`\`bash
|
|
7507
|
+
# Create an issue
|
|
7508
|
+
gh issue create --title "Title" --body "Description"
|
|
7509
|
+
|
|
7510
|
+
# View an issue
|
|
7511
|
+
gh issue view 123
|
|
7512
|
+
|
|
7513
|
+
# List issues
|
|
7514
|
+
gh issue list
|
|
7515
|
+
|
|
7516
|
+
# Close an issue
|
|
7517
|
+
gh issue close 123
|
|
7518
|
+
|
|
7519
|
+
# Add a comment
|
|
7520
|
+
gh issue comment 123 --body "Your comment"
|
|
7521
|
+
\`\`\`
|
|
7522
|
+
|
|
7523
|
+
### Repository Operations
|
|
7524
|
+
|
|
7525
|
+
\`\`\`bash
|
|
7526
|
+
# View repo info
|
|
7527
|
+
gh repo view
|
|
7528
|
+
|
|
7529
|
+
# Clone a repo
|
|
7530
|
+
gh repo clone owner/repo
|
|
7531
|
+
|
|
7532
|
+
# List releases
|
|
7533
|
+
gh release list
|
|
7534
|
+
\`\`\`
|
|
7535
|
+
|
|
7536
|
+
### GitHub Actions / Checks
|
|
7537
|
+
|
|
7538
|
+
\`\`\`bash
|
|
7539
|
+
# List workflow runs
|
|
7540
|
+
gh run list
|
|
7541
|
+
|
|
7542
|
+
# View a specific run
|
|
7543
|
+
gh run view RUN_ID
|
|
7544
|
+
|
|
7545
|
+
# Watch a run in progress
|
|
7546
|
+
gh run watch RUN_ID
|
|
7547
|
+
|
|
7548
|
+
# Re-run failed jobs
|
|
7549
|
+
gh run rerun RUN_ID --failed
|
|
7550
|
+
\`\`\`
|
|
7551
|
+
|
|
7552
|
+
### GitHub API (Advanced)
|
|
7553
|
+
|
|
7554
|
+
For operations not covered by \`gh\` subcommands, use the API directly:
|
|
7555
|
+
|
|
7556
|
+
\`\`\`bash
|
|
7557
|
+
# GET request
|
|
7558
|
+
gh api repos/owner/repo/pulls/123/comments
|
|
7559
|
+
|
|
7560
|
+
# POST request
|
|
7561
|
+
gh api repos/owner/repo/issues/123/comments -f body="Comment text"
|
|
7562
|
+
|
|
7563
|
+
# GraphQL query
|
|
7564
|
+
gh api graphql -f query='{ repository(owner: "owner", name: "repo") { issues(first: 10) { nodes { title number } } } }'
|
|
7565
|
+
\`\`\`
|
|
7566
|
+
|
|
7567
|
+
### Working with PR Reviews
|
|
7568
|
+
|
|
7569
|
+
\`\`\`bash
|
|
7570
|
+
# View PR comments
|
|
7571
|
+
gh api repos/owner/repo/pulls/123/comments
|
|
7572
|
+
|
|
7573
|
+
# View PR review comments
|
|
7574
|
+
gh api repos/owner/repo/pulls/123/reviews
|
|
7575
|
+
|
|
7576
|
+
# Submit a review
|
|
7577
|
+
gh pr review 123 --approve
|
|
7578
|
+
gh pr review 123 --request-changes --body "Changes needed"
|
|
7579
|
+
\`\`\`
|
|
7580
|
+
|
|
7581
|
+
## Image Uploads in PRs
|
|
7582
|
+
|
|
7583
|
+
GitHub does NOT have a public API for uploading images to PRs/issues. When you need to include images:
|
|
7584
|
+
- Do NOT use placeholder image URLs
|
|
7585
|
+
- Do NOT commit screenshots as files to the repository
|
|
7586
|
+
- Upload images to Imgur (or another external host) and use the returned URLs in your PR markdown
|
|
7587
|
+
- If you were triggered from Slack, also upload the images to the Slack thread so the user can see them directly
|
|
7588
|
+
`;
|
|
7589
|
+
var GITHUB_ABILITY = {
|
|
7590
|
+
label: "GitHub",
|
|
7591
|
+
description: "Pre-authenticated `gh` CLI for PRs, issues, releases, and GraphQL.",
|
|
7592
|
+
bullet: "- Interacting with GitHub (creating PRs, managing issues, using the API, etc.)",
|
|
7593
|
+
section: SECTION2,
|
|
7594
|
+
referenceFile: { name: "GITHUB.md", content: REFERENCE2 }
|
|
7595
|
+
};
|
|
7596
|
+
|
|
7597
|
+
// ../shared/src/default-skills/replicas-agent/abilities/google.ts
|
|
7598
|
+
var SECTION3 = `### Google Workspace (Docs, Sheets, Forms, Drive)
|
|
7599
|
+
Create and edit Google Docs, Sheets, and Forms via the Replicas gateway. Files are owned by Replicas \u2014 the integration cannot access pre-existing Google content created outside of it.
|
|
7600
|
+
|
|
7601
|
+
**Reference:** \`references/GOOGLE.md\`
|
|
7602
|
+
|
|
7603
|
+
Use this when:
|
|
7604
|
+
- You need to create or edit a Google Doc, Sheet, or Form
|
|
7605
|
+
- You need to share, rename, move, or delete a Replicas-created Google file
|
|
7606
|
+
- You need to read responses from a Replicas-created Google Form`;
|
|
7607
|
+
var REFERENCE3 = `# Google Workspace (Docs, Sheets, Forms, Drive)
|
|
7608
|
+
|
|
7609
|
+
This guide covers how to create and edit Google Docs, Sheets, and Forms \u2014 plus do basic Drive file operations \u2014 from inside a Replicas workspace, using the monolith as a gateway to Google's APIs.
|
|
7610
|
+
|
|
7611
|
+
## Prerequisites
|
|
7612
|
+
|
|
7613
|
+
The integration is configured at the org or user level by the Replicas admin. From inside a workspace you don't have a Google access token directly; instead you call the monolith's \`/v1/gdrive/*\` endpoints, authenticated with your workspace's engine secret. The monolith refreshes the org's (or user's) Google access token and proxies the call.
|
|
7614
|
+
|
|
7615
|
+
Quick check that the integration is connected:
|
|
7616
|
+
|
|
7617
|
+
\`\`\`bash
|
|
7618
|
+
curl -s -X GET "$MONOLITH_URL/v1/gdrive/credentials" \\
|
|
7619
|
+
-H "Authorization: Bearer $REPLICAS_ENGINE_SECRET" \\
|
|
7620
|
+
-H "X-Workspace-Id: $WORKSPACE_ID"
|
|
7621
|
+
\`\`\`
|
|
7622
|
+
|
|
7623
|
+
- If \`hasCredentials\` is \`true\`: you're good to go.
|
|
7624
|
+
- If \`hasCredentials\` is \`false\`: Google has not been connected for this org. Ask the user to go to **Settings \u2192 Integrations \u2192 Google** in the [Replicas dashboard](https://replicas.dev) and connect a Google account. Do not attempt Google operations until it's connected.
|
|
7625
|
+
|
|
7626
|
+
Standard auth headers used by every call below:
|
|
7627
|
+
|
|
7628
|
+
\`\`\`
|
|
7629
|
+
Authorization: Bearer $REPLICAS_ENGINE_SECRET
|
|
7630
|
+
X-Workspace-Id: $WORKSPACE_ID
|
|
7631
|
+
\`\`\`
|
|
7632
|
+
|
|
7633
|
+
For brevity the examples below use a shell variable:
|
|
7634
|
+
|
|
7635
|
+
\`\`\`bash
|
|
7636
|
+
GDRIVE_AUTH=(-H "Authorization: Bearer $REPLICAS_ENGINE_SECRET" -H "X-Workspace-Id: $WORKSPACE_ID")
|
|
7637
|
+
\`\`\`
|
|
7638
|
+
|
|
7639
|
+
## Important constraint: drive.file scope
|
|
7640
|
+
|
|
7641
|
+
The integration uses the **sensitive-tier \`drive.file\` scope**. That means Replicas can only read and edit Google files **it created itself**. It **cannot**:
|
|
7642
|
+
|
|
7643
|
+
- Read or edit a user's pre-existing Google Docs, Sheets, or Forms \u2014 even ones that were shared with the connected Google account.
|
|
7644
|
+
- List or search the user's broader Drive.
|
|
7645
|
+
- Touch any file that was not created via these gateway endpoints.
|
|
7646
|
+
|
|
7647
|
+
If the user asks you to edit an existing doc that Replicas didn't create, tell them this constraint and offer to create a new doc that mirrors what they want.
|
|
7648
|
+
|
|
7649
|
+
## Google Docs
|
|
7650
|
+
|
|
7651
|
+
### Create a new doc
|
|
7652
|
+
|
|
7653
|
+
\`\`\`bash
|
|
7654
|
+
curl -s -X POST "$MONOLITH_URL/v1/gdrive/docs" "\${GDRIVE_AUTH[@]}" \\
|
|
7655
|
+
-H "Content-Type: application/json" \\
|
|
7656
|
+
-d '{"title":"Meeting notes 2026-05-14"}'
|
|
7657
|
+
\`\`\`
|
|
7658
|
+
|
|
7659
|
+
Returns the full Doc object; grab \`.documentId\` for follow-up calls.
|
|
7660
|
+
|
|
7661
|
+
### Read a doc
|
|
7662
|
+
|
|
7663
|
+
\`\`\`bash
|
|
7664
|
+
curl -s "$MONOLITH_URL/v1/gdrive/docs/$DOC_ID" "\${GDRIVE_AUTH[@]}"
|
|
7665
|
+
\`\`\`
|
|
7666
|
+
|
|
7667
|
+
Returns the full document structure \u2014 \`body.content\` is an ordered list of structural elements (paragraphs, tables, etc.) with character indexes you can target for edits.
|
|
7668
|
+
|
|
7669
|
+
### Edit a doc (batchUpdate)
|
|
7670
|
+
|
|
7671
|
+
The Docs API edits use a list of [structural requests](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request). Insert text, then style it; or insert tables, images, page breaks, etc.
|
|
7672
|
+
|
|
7673
|
+
\`\`\`bash
|
|
7674
|
+
curl -s -X POST "$MONOLITH_URL/v1/gdrive/docs/$DOC_ID/batchUpdate" "\${GDRIVE_AUTH[@]}" \\
|
|
7675
|
+
-H "Content-Type: application/json" \\
|
|
7676
|
+
-d '{
|
|
7677
|
+
"requests": [
|
|
7678
|
+
{ "insertText": { "location": { "index": 1 }, "text": "Hello, world!\\n" } }
|
|
7679
|
+
]
|
|
7680
|
+
}'
|
|
7681
|
+
\`\`\`
|
|
7682
|
+
|
|
7683
|
+
Common request types:
|
|
7684
|
+
|
|
7685
|
+
- \`insertText\` \u2014 insert plain text at a given index
|
|
7686
|
+
- \`deleteContentRange\` \u2014 delete a range
|
|
7687
|
+
- \`replaceAllText\` \u2014 find-and-replace
|
|
7688
|
+
- \`updateTextStyle\` \u2014 bold/italic/colors/fonts/sizes for a range
|
|
7689
|
+
- \`updateParagraphStyle\` \u2014 headings (\`HEADING_1\`..\`HEADING_6\`), alignment, spacing
|
|
7690
|
+
- \`createParagraphBullets\` \u2014 turn paragraphs into bulleted/numbered lists
|
|
7691
|
+
- \`insertTable\` \u2014 insert a table
|
|
7692
|
+
- \`insertInlineImage\` \u2014 insert an image from a URL
|
|
7693
|
+
|
|
7694
|
+
Edits are verbose but powerful. Prefer batching many requests into a single \`batchUpdate\` call rather than making many round trips \u2014 it's faster and keeps the doc state consistent.
|
|
7695
|
+
|
|
7696
|
+
## Google Sheets
|
|
7697
|
+
|
|
7698
|
+
### Create a new spreadsheet
|
|
7699
|
+
|
|
7700
|
+
\`\`\`bash
|
|
7701
|
+
curl -s -X POST "$MONOLITH_URL/v1/gdrive/sheets" "\${GDRIVE_AUTH[@]}" \\
|
|
7702
|
+
-H "Content-Type: application/json" \\
|
|
7703
|
+
-d '{"title":"Q2 metrics"}'
|
|
7704
|
+
\`\`\`
|
|
7705
|
+
|
|
7706
|
+
Returns the full Spreadsheet object; grab \`.spreadsheetId\`.
|
|
7707
|
+
|
|
7708
|
+
### Read a range of cells
|
|
7709
|
+
|
|
7710
|
+
\`\`\`bash
|
|
7711
|
+
# Range is in A1 notation, e.g. "Sheet1!A1:C10"
|
|
7712
|
+
curl -s "$MONOLITH_URL/v1/gdrive/sheets/$SHEET_ID/values/$(printf %s 'Sheet1!A1:C10' | jq -sRr @uri)" \\
|
|
7713
|
+
"\${GDRIVE_AUTH[@]}"
|
|
7714
|
+
\`\`\`
|
|
7715
|
+
|
|
7716
|
+
### Write a range of cells
|
|
7717
|
+
|
|
7718
|
+
\`\`\`bash
|
|
7719
|
+
curl -s -X PUT \\
|
|
7720
|
+
"$MONOLITH_URL/v1/gdrive/sheets/$SHEET_ID/values/$(printf %s 'Sheet1!A1:B2' | jq -sRr @uri)?valueInputOption=USER_ENTERED" \\
|
|
7721
|
+
"\${GDRIVE_AUTH[@]}" \\
|
|
7722
|
+
-H "Content-Type: application/json" \\
|
|
7723
|
+
-d '{
|
|
7724
|
+
"range": "Sheet1!A1:B2",
|
|
7725
|
+
"majorDimension": "ROWS",
|
|
7726
|
+
"values": [
|
|
7727
|
+
["Name", "Revenue"],
|
|
7728
|
+
["Q1", "=SUM(B3:B100)"]
|
|
7729
|
+
]
|
|
7730
|
+
}'
|
|
7731
|
+
\`\`\`
|
|
7732
|
+
|
|
7733
|
+
\`valueInputOption=USER_ENTERED\` makes formulas evaluate as if a human typed them. Use \`RAW\` to write literal strings.
|
|
7734
|
+
|
|
7735
|
+
### Bulk operations (formatting, charts, new tabs, etc.)
|
|
7736
|
+
|
|
7737
|
+
\`\`\`bash
|
|
7738
|
+
curl -s -X POST "$MONOLITH_URL/v1/gdrive/sheets/$SHEET_ID/batchUpdate" "\${GDRIVE_AUTH[@]}" \\
|
|
7739
|
+
-H "Content-Type: application/json" \\
|
|
7740
|
+
-d '{ "requests": [ { "addSheet": { "properties": { "title": "Raw data" } } } ] }'
|
|
7741
|
+
\`\`\`
|
|
7742
|
+
|
|
7743
|
+
\`batchUpdate\` accepts an array of [Sheets API requests](https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request) \u2014 addSheet, updateSheetProperties, repeatCell, addChart, autoResizeDimensions, etc.
|
|
7744
|
+
|
|
7745
|
+
## Google Forms
|
|
7746
|
+
|
|
7747
|
+
### Create a new form
|
|
7748
|
+
|
|
7749
|
+
\`\`\`bash
|
|
7750
|
+
curl -s -X POST "$MONOLITH_URL/v1/gdrive/forms" "\${GDRIVE_AUTH[@]}" \\
|
|
7751
|
+
-H "Content-Type: application/json" \\
|
|
7752
|
+
-d '{"title":"Customer feedback"}'
|
|
7753
|
+
\`\`\`
|
|
7754
|
+
|
|
7755
|
+
Returns the form. Grab \`.formId\`.
|
|
7756
|
+
|
|
7757
|
+
### Add questions / edit form structure
|
|
7758
|
+
|
|
7759
|
+
The Forms API uses its own \`batchUpdate\`:
|
|
7760
|
+
|
|
7761
|
+
\`\`\`bash
|
|
7762
|
+
curl -s -X POST "$MONOLITH_URL/v1/gdrive/forms/$FORM_ID/batchUpdate" "\${GDRIVE_AUTH[@]}" \\
|
|
7763
|
+
-H "Content-Type: application/json" \\
|
|
7764
|
+
-d '{
|
|
7765
|
+
"requests": [
|
|
7766
|
+
{
|
|
7767
|
+
"createItem": {
|
|
7768
|
+
"item": {
|
|
7769
|
+
"title": "How likely are you to recommend us?",
|
|
7770
|
+
"questionItem": {
|
|
7771
|
+
"question": {
|
|
7772
|
+
"required": true,
|
|
7773
|
+
"scaleQuestion": { "low": 0, "high": 10, "lowLabel": "Not at all", "highLabel": "Very likely" }
|
|
7774
|
+
}
|
|
7775
|
+
}
|
|
7776
|
+
},
|
|
7777
|
+
"location": { "index": 0 }
|
|
7778
|
+
}
|
|
7779
|
+
}
|
|
7780
|
+
]
|
|
7781
|
+
}'
|
|
7782
|
+
\`\`\`
|
|
7783
|
+
|
|
7784
|
+
See the [Forms API Request reference](https://developers.google.com/workspace/forms/api/reference/rest/v1/forms/request) for all supported request types \u2014 text questions, multiple choice, checkboxes, scale, grid, date, time, file upload, section breaks, branching logic, quiz settings, etc.
|
|
7785
|
+
|
|
7786
|
+
### Read responses
|
|
7787
|
+
|
|
7788
|
+
\`\`\`bash
|
|
7789
|
+
curl -s "$MONOLITH_URL/v1/gdrive/forms/$FORM_ID/responses" "\${GDRIVE_AUTH[@]}"
|
|
7790
|
+
\`\`\`
|
|
7791
|
+
|
|
7792
|
+
Pagination: pass \`?pageToken=...&pageSize=...\` to walk through responses.
|
|
7793
|
+
|
|
7794
|
+
## Drive operations (only on Replicas-created files)
|
|
7795
|
+
|
|
7796
|
+
### Share a file with a person
|
|
7797
|
+
|
|
7798
|
+
\`\`\`bash
|
|
7799
|
+
curl -s -X POST "$MONOLITH_URL/v1/gdrive/files/$FILE_ID/permissions" "\${GDRIVE_AUTH[@]}" \\
|
|
7800
|
+
-H "Content-Type: application/json" \\
|
|
7801
|
+
-d '{
|
|
7802
|
+
"type": "user",
|
|
7803
|
+
"role": "writer",
|
|
7804
|
+
"emailAddress": "alice@example.com",
|
|
7805
|
+
"sendNotificationEmail": true
|
|
7806
|
+
}'
|
|
7807
|
+
\`\`\`
|
|
7808
|
+
|
|
7809
|
+
Roles: \`reader\`, \`commenter\`, \`writer\`. Types: \`user\`, \`group\`, \`domain\`, \`anyone\`.
|
|
7810
|
+
|
|
7811
|
+
### Make a file viewable by anyone with the link
|
|
7812
|
+
|
|
7813
|
+
\`\`\`bash
|
|
7814
|
+
curl -s -X POST "$MONOLITH_URL/v1/gdrive/files/$FILE_ID/permissions" "\${GDRIVE_AUTH[@]}" \\
|
|
7815
|
+
-H "Content-Type: application/json" \\
|
|
7816
|
+
-d '{ "type": "anyone", "role": "reader" }'
|
|
7817
|
+
\`\`\`
|
|
7818
|
+
|
|
7819
|
+
### List existing permissions
|
|
7820
|
+
|
|
7821
|
+
\`\`\`bash
|
|
7822
|
+
curl -s "$MONOLITH_URL/v1/gdrive/files/$FILE_ID/permissions" "\${GDRIVE_AUTH[@]}"
|
|
7823
|
+
\`\`\`
|
|
7824
|
+
|
|
7825
|
+
### Rename / move a file
|
|
7826
|
+
|
|
7827
|
+
\`\`\`bash
|
|
7828
|
+
curl -s -X PATCH "$MONOLITH_URL/v1/gdrive/files/$FILE_ID" "\${GDRIVE_AUTH[@]}" \\
|
|
7829
|
+
-H "Content-Type: application/json" \\
|
|
7830
|
+
-d '{"name":"Final report.docx"}'
|
|
7831
|
+
\`\`\`
|
|
7832
|
+
|
|
7833
|
+
To move into a folder, also pass \`addParents\` and \`removeParents\` as query parameters per [Drive API docs](https://developers.google.com/workspace/drive/api/reference/rest/v3/files/update).
|
|
7834
|
+
|
|
7835
|
+
### Get file metadata
|
|
7836
|
+
|
|
7837
|
+
\`\`\`bash
|
|
7838
|
+
curl -s "$MONOLITH_URL/v1/gdrive/files/$FILE_ID?fields=id,name,mimeType,webViewLink,parents,modifiedTime" \\
|
|
7839
|
+
"\${GDRIVE_AUTH[@]}"
|
|
7840
|
+
\`\`\`
|
|
7841
|
+
|
|
7842
|
+
\`webViewLink\` is the human-shareable URL that opens in Google Docs/Sheets/Forms.
|
|
7843
|
+
|
|
7844
|
+
### Delete a file
|
|
7845
|
+
|
|
7846
|
+
\`\`\`bash
|
|
7847
|
+
curl -s -X DELETE "$MONOLITH_URL/v1/gdrive/files/$FILE_ID" "\${GDRIVE_AUTH[@]}"
|
|
7848
|
+
\`\`\`
|
|
7849
|
+
|
|
7850
|
+
### List Replicas-created files
|
|
7851
|
+
|
|
7852
|
+
\`\`\`bash
|
|
7853
|
+
curl -s "$MONOLITH_URL/v1/gdrive/files?pageSize=50" "\${GDRIVE_AUTH[@]}"
|
|
7854
|
+
\`\`\`
|
|
7855
|
+
|
|
7856
|
+
Pass \`?q=...\` to filter using [Drive API search syntax](https://developers.google.com/workspace/drive/api/guides/search-files). Only files the app created or was granted access to will appear.
|
|
7857
|
+
|
|
7858
|
+
## Tips
|
|
7859
|
+
|
|
7860
|
+
- **Always return the \`webViewLink\`** to the user when you create or edit a file so they can open it. Get it from \`/v1/gdrive/files/$FILE_ID?fields=webViewLink\` or from \`documents.documentId\` \u2192 \`https://docs.google.com/document/d/$ID/edit\`.
|
|
7861
|
+
- **Batch your edits.** A single \`batchUpdate\` with 20 requests beats 20 round-trips.
|
|
7862
|
+
- **Watch error responses.** A 412 from the gateway means the org has no Google credentials connected \u2014 tell the user to connect Google in the dashboard. Other 4xx responses come straight from Google and usually explain the issue clearly.
|
|
7863
|
+
`;
|
|
7864
|
+
var GOOGLE_ABILITY = {
|
|
7865
|
+
label: "Google Workspace",
|
|
7866
|
+
description: "Create / edit Docs, Sheets, Forms, and Drive files via the Replicas gateway.",
|
|
7867
|
+
bullet: "- Interacting with Google Workspace (creating and editing Docs, Sheets, and Forms, sharing files, reading form responses, etc.)",
|
|
7868
|
+
section: SECTION3,
|
|
7869
|
+
referenceFile: { name: "GOOGLE.md", content: REFERENCE3 }
|
|
7870
|
+
};
|
|
7871
|
+
|
|
7872
|
+
// ../shared/src/default-skills/replicas-agent/abilities/linear.ts
|
|
7873
|
+
var SECTION4 = `### Linear
|
|
7874
|
+
Fetch issues, update state, add comments, and search via the Linear GraphQL API.
|
|
7875
|
+
|
|
7876
|
+
**Reference:** \`references/LINEAR.md\`
|
|
7877
|
+
|
|
7878
|
+
Use this when:
|
|
7879
|
+
- You encounter a Linear issue link and need to understand the task
|
|
7880
|
+
- You need to update an issue's state (e.g. mark as done)
|
|
7881
|
+
- You need to comment on or search for Linear issues`;
|
|
7882
|
+
var REFERENCE4 = `# Linear Integration
|
|
7883
|
+
|
|
7884
|
+
This guide covers how to interact with Linear from within your Replicas workspace.
|
|
7885
|
+
|
|
7886
|
+
## Prerequisites
|
|
7887
|
+
|
|
7888
|
+
Check if the \`LINEAR_ACCESS_TOKEN\` environment variable is set:
|
|
7889
|
+
|
|
7890
|
+
\`\`\`bash
|
|
7891
|
+
echo "\${LINEAR_ACCESS_TOKEN:+set}"
|
|
7892
|
+
\`\`\`
|
|
7893
|
+
|
|
7894
|
+
- If **set**: Your workspace has Linear access. You can use the Linear GraphQL API as described below.
|
|
7895
|
+
- If **not set**: Linear has not been configured for this workspace. The user needs to connect Linear in the [Replicas dashboard](https://replicas.dev) under their organization's integration settings. Let the user know and do not attempt Linear operations.
|
|
7896
|
+
|
|
7897
|
+
## Using the Linear API
|
|
7898
|
+
|
|
7899
|
+
Linear uses a GraphQL API at \`https://api.linear.app/graphql\`. All requests use the \`$LINEAR_ACCESS_TOKEN\` for authentication.
|
|
7900
|
+
|
|
7901
|
+
### Fetching an Issue
|
|
7902
|
+
|
|
7903
|
+
If you encounter a Linear issue link (e.g. \`https://linear.app/team/issue/ENG-123\`), the identifier is the last path segment (\`ENG-123\`).
|
|
7904
|
+
|
|
7905
|
+
\`\`\`bash
|
|
7906
|
+
curl -s -X POST https://api.linear.app/graphql \\
|
|
7907
|
+
-H "Authorization: Bearer $LINEAR_ACCESS_TOKEN" \\
|
|
7908
|
+
-H "Content-Type: application/json" \\
|
|
7909
|
+
-d '{
|
|
7910
|
+
"query": "query { issues(filter: { identifier: { eq: \\"ENG-123\\" } }) { nodes { id identifier title description state { name } assignee { name } parent { identifier title description } } } }"
|
|
7911
|
+
}'
|
|
7912
|
+
\`\`\`
|
|
7913
|
+
|
|
7914
|
+
### Updating Issue State
|
|
7915
|
+
|
|
7916
|
+
\`\`\`bash
|
|
7917
|
+
curl -s -X POST https://api.linear.app/graphql \\
|
|
7918
|
+
-H "Authorization: Bearer $LINEAR_ACCESS_TOKEN" \\
|
|
7919
|
+
-H "Content-Type: application/json" \\
|
|
7920
|
+
-d '{
|
|
7921
|
+
"query": "mutation { issueUpdate(id: \\"ISSUE_UUID\\", input: { stateId: \\"STATE_UUID\\" }) { success issue { identifier state { name } } } }"
|
|
7922
|
+
}'
|
|
7923
|
+
\`\`\`
|
|
7924
|
+
|
|
7925
|
+
To find available states, query: \`query { workflowStates { nodes { id name } } }\`
|
|
7926
|
+
|
|
7927
|
+
### Adding a Comment
|
|
7928
|
+
|
|
7929
|
+
\`\`\`bash
|
|
7930
|
+
curl -s -X POST https://api.linear.app/graphql \\
|
|
7931
|
+
-H "Authorization: Bearer $LINEAR_ACCESS_TOKEN" \\
|
|
7932
|
+
-H "Content-Type: application/json" \\
|
|
7933
|
+
-d '{
|
|
7934
|
+
"query": "mutation { commentCreate(input: { issueId: \\"ISSUE_UUID\\", body: \\"Your comment here\\" }) { success comment { id } } }"
|
|
7935
|
+
}'
|
|
7936
|
+
\`\`\`
|
|
7937
|
+
|
|
7938
|
+
### Searching Issues
|
|
7939
|
+
|
|
7940
|
+
\`\`\`bash
|
|
7941
|
+
curl -s -X POST https://api.linear.app/graphql \\
|
|
7942
|
+
-H "Authorization: Bearer $LINEAR_ACCESS_TOKEN" \\
|
|
7943
|
+
-H "Content-Type: application/json" \\
|
|
7944
|
+
-d '{
|
|
7945
|
+
"query": "query { issueSearch(query: \\"search terms\\", first: 10) { nodes { identifier title state { name } } } }"
|
|
7946
|
+
}'
|
|
7947
|
+
\`\`\`
|
|
7948
|
+
|
|
7949
|
+
### Other Operations
|
|
7950
|
+
|
|
7951
|
+
The Linear GraphQL API supports creating issues, managing projects, labels, cycles, and more. For the full schema and documentation, see: https://developers.linear.app/docs/graphql/working-with-the-graphql-api
|
|
7952
|
+
`;
|
|
7953
|
+
var LINEAR_ABILITY = {
|
|
7954
|
+
label: "Linear",
|
|
7955
|
+
description: "Fetch issues, post comments, update states via the Linear GraphQL API.",
|
|
7956
|
+
bullet: "- Interacting with Linear (fetching issues, updating state, commenting, etc.)",
|
|
7957
|
+
section: SECTION4,
|
|
7958
|
+
referenceFile: { name: "LINEAR.md", content: REFERENCE4 }
|
|
7959
|
+
};
|
|
7960
|
+
|
|
7961
|
+
// ../shared/src/default-skills/replicas-agent/abilities/media.ts
|
|
7962
|
+
var SECTION5 = `### Media
|
|
7963
|
+
Share screenshots, screen recordings, generated diagrams, and audio clips inline in the Replicas chat (and as references in external messages).
|
|
7964
|
+
|
|
7965
|
+
**Reference:** \`references/MEDIA.md\`
|
|
7966
|
+
|
|
7967
|
+
Use this when:
|
|
7968
|
+
- You produce a screenshot, recording, generated image, or audio clip the user should see
|
|
7969
|
+
- You record video output (browser automation, screen capture) \u2014 including the recommended aspect ratio and FPS
|
|
7970
|
+
- You need to embed media in a Slack/Linear/GitHub message AND keep a referenceable copy in the Replicas dashboard`;
|
|
7971
|
+
var REFERENCE5 = `# Media (Screenshots, Recordings, Audio)
|
|
7972
|
+
|
|
7973
|
+
This guide covers how to share screenshots, screen recordings, generated diagrams, and audio clips with the user inline in the Replicas chat.
|
|
7974
|
+
|
|
7975
|
+
## Prerequisites
|
|
7976
|
+
|
|
7977
|
+
The \`replicas\` CLI is pre-installed and authenticated in your workspace. No additional setup is needed.
|
|
7978
|
+
|
|
7979
|
+
## When to upload
|
|
7980
|
+
|
|
7981
|
+
Upload to Replicas in these cases \u2014 and **only** these cases:
|
|
7982
|
+
|
|
7983
|
+
1. **Media you produce.** Any screenshot, screen recording, generated diagram, or audio clip you create that the user might want to see. Upload before doing anything else with the file (analyzing, deleting, sending elsewhere). This applies even when you're also sending the file to Slack, Linear, GitHub, etc.
|
|
7984
|
+
2. **Files the user explicitly asks you to upload.** If the user sends or points at a file (image, video, audio) and asks you to upload it, run \`replicas media upload\`. Otherwise leave it alone \u2014 files in the workspace the user did not ask about should not be auto-uploaded as media.
|
|
7985
|
+
3. **Anything you plan to share externally (Slack, Linear, GitHub, etc.).** Upload to Replicas *in addition to* the platform's native upload. Never as a replacement.
|
|
7986
|
+
|
|
7987
|
+
If none of these apply, don't upload.
|
|
7988
|
+
|
|
7989
|
+
## Uploading
|
|
7990
|
+
|
|
7991
|
+
\`\`\`bash
|
|
7992
|
+
replicas media upload <path-to-file> [<path-to-file> ...]
|
|
7993
|
+
\`\`\`
|
|
7994
|
+
|
|
7995
|
+
Pass one or more file paths. Uploading several files in a single invocation is preferred over running the command repeatedly \u2014 it's faster and keeps the output grouped.
|
|
7996
|
+
|
|
7997
|
+
For each file, the CLI prints two lines:
|
|
7998
|
+
|
|
7999
|
+
1. \`\` \u2014 the chat embed (renders inline in Replicas chat only; see below).
|
|
8000
|
+
2. \`View in Replicas: <deep-link>\` \u2014 a per-file dashboard URL of the form \`https://tryreplicas.com/workspaces/<workspace-id>?mode=media&media=<media-id>\` that opens directly to that specific file.
|
|
8001
|
+
|
|
8002
|
+
Match each "View in Replicas" line to the embed line directly above it \u2014 that's the deep link for that file.
|
|
8003
|
+
|
|
8004
|
+
## How to use the output
|
|
8005
|
+
|
|
8006
|
+
### CRITICAL: the markdown embed URL is for Replicas chat only
|
|
8007
|
+
|
|
8008
|
+
The URL inside \`\` points at \`api.tryreplicas.com/v1/media/<id>\`. This is **not a public URL** \u2014 it requires the Replicas chat's authenticated session, which resolves it to a presigned download. Anywhere else (Slack, Linear, GitHub, a browser tab the user opens directly, a customer copy-pasting from chat), it returns \`{"error":"Missing authorization token"}\` and renders as a broken image.
|
|
8009
|
+
|
|
8010
|
+
**Never paste this URL outside your Replicas chat reply.** Not in Slack messages, not in Linear comments, not in PR descriptions or commit messages, not in external docs \u2014 nowhere a non-Replicas surface will render it.
|
|
8011
|
+
|
|
8012
|
+
### Always render dashboard URLs as \`[View in Replicas](<url>)\` hyperlinks
|
|
8013
|
+
|
|
8014
|
+
Whenever you share a workspace dashboard URL \u2014 in chat or anywhere else \u2014 format it as a markdown hyperlink labeled **View in Replicas**:
|
|
8015
|
+
|
|
8016
|
+
\`\`\`markdown
|
|
8017
|
+
[View in Replicas](https://tryreplicas.com/workspaces/<workspace-id>?mode=media&media=<media-id>)
|
|
8018
|
+
\`\`\`
|
|
8019
|
+
|
|
8020
|
+
Never paste the raw URL. Raw URLs look unpolished.
|
|
8021
|
+
|
|
8022
|
+
Two flavors of dashboard URL the CLI gives you:
|
|
8023
|
+
|
|
8024
|
+
- **Per-file deep link** (default \u2014 what \`replicas media upload\` prints): \`...?mode=media&media=<media-id>\` opens the dashboard scrolled to that specific file. Use this whenever you're linking to *one* file.
|
|
8025
|
+
- **Media tab link** (no \`media=\` param): \`...?mode=media\` opens the workspace's media tab listing all files. Use this only when you're pointing at the collection, not a specific file (rare \u2014 you almost always have a specific file in mind).
|
|
8026
|
+
|
|
8027
|
+
### In your Replicas chat reply
|
|
8028
|
+
|
|
8029
|
+
Include each markdown embed line **verbatim** where you want that file to render inline. The chat substitutes each one with an embedded image, video, or audio player. Multiple embeds can appear in a single reply.
|
|
8030
|
+
|
|
8031
|
+
After (or alongside) the embeds, include a \`[View in Replicas](<deep-link>)\` hyperlink for each file using the per-file URL the CLI printed for that file. This lets the user jump to the specific item in the media tab.
|
|
8032
|
+
|
|
8033
|
+
### On external platforms (Slack, Linear, GitHub, etc.)
|
|
8034
|
+
|
|
8035
|
+
Do **both** of these \u2014 neither alone is sufficient:
|
|
8036
|
+
|
|
8037
|
+
1. Upload the raw bytes via that platform's own upload API (Slack \`files.upload\`, Linear attachments, Imgur for GitHub PR/issue images, etc.) so the recipient actually sees the media.
|
|
8038
|
+
2. Include a \`[View in Replicas](<deep-link>)\` hyperlink \u2014 use the per-file deep link the CLI printed for that file (\`...?mode=media&media=<media-id>\`), so the recipient lands directly on that specific item.
|
|
8039
|
+
|
|
8040
|
+
Do **not** include the \`\` markdown embed in external messages. It will render as a broken image / 401 for the recipient.
|
|
8041
|
+
|
|
8042
|
+
## Recording defaults
|
|
8043
|
+
|
|
8044
|
+
When you record video (browser automation, screen capture, etc.):
|
|
8045
|
+
|
|
8046
|
+
- **Aspect ratio:** 16:9 (1920\xD71080 or 1280\xD7720)
|
|
8047
|
+
- **Frame rate:** 60 FPS or whatever the user specifies
|
|
8048
|
+
|
|
8049
|
+
Tools like Playwright default to a low frame rate that produces choppy playback \u2014 explicitly configure recording dimensions and FPS:
|
|
8050
|
+
|
|
8051
|
+
\`\`\`ts
|
|
8052
|
+
const context = await browser.newContext({
|
|
8053
|
+
recordVideo: { dir: './videos', size: { width: 1280, height: 720 } },
|
|
8054
|
+
});
|
|
8055
|
+
\`\`\`
|
|
8056
|
+
|
|
8057
|
+
For \`ffmpeg\` screen captures, pass \`-r 30\` (or \`-r 60\`) to set the frame rate.
|
|
8058
|
+
|
|
8059
|
+
## Supported formats
|
|
8060
|
+
|
|
8061
|
+
Auto-detected from the filename extension:
|
|
8062
|
+
|
|
8063
|
+
| Extension | Kind |
|
|
8064
|
+
|---|---|
|
|
8065
|
+
| \`png\`, \`jpg\`, \`jpeg\`, \`webp\` | image |
|
|
8066
|
+
| \`mp4\`, \`webm\` | video |
|
|
8067
|
+
| \`mp3\`, \`wav\` | audio |
|
|
8068
|
+
|
|
8069
|
+
For other extensions, pass \`--kind image|video|audio\` explicitly. The kind applies to every file in that invocation, so group files of the same kind together:
|
|
8070
|
+
|
|
8071
|
+
\`\`\`bash
|
|
8072
|
+
replicas media upload diagram.svg --kind image
|
|
8073
|
+
replicas media upload chart-a.svg chart-b.svg --kind image
|
|
8074
|
+
\`\`\`
|
|
8075
|
+
|
|
8076
|
+
## Options
|
|
8077
|
+
|
|
8078
|
+
- \`--kind <image|video|audio>\` \u2014 override auto-detection
|
|
8079
|
+
- \`--session-id <id>\` \u2014 associate the upload with a specific session
|
|
8080
|
+
`;
|
|
8081
|
+
var MEDIA_ABILITY = {
|
|
8082
|
+
label: "Media",
|
|
8083
|
+
description: "Share screenshots, recordings, generated images, and audio clips.",
|
|
8084
|
+
bullet: "- Sharing media (screenshots, screen recordings, generated diagrams, audio clips) \u2014 including in your Replicas chat reply and to external platforms",
|
|
8085
|
+
section: SECTION5,
|
|
8086
|
+
referenceFile: { name: "MEDIA.md", content: REFERENCE5 }
|
|
8087
|
+
};
|
|
8088
|
+
|
|
8089
|
+
// ../shared/src/default-skills/replicas-agent/abilities/previews.ts
|
|
8090
|
+
var SECTION6 = `### Previews
|
|
8091
|
+
Expose locally running services (web apps, APIs, databases) as public preview URLs so humans can interact with them directly.
|
|
8092
|
+
|
|
8093
|
+
**Reference:** \`references/PREVIEWS.md\`
|
|
8094
|
+
|
|
8095
|
+
Use this when:
|
|
8096
|
+
- You need to start a service that a human should view or interact with
|
|
8097
|
+
- The task involves UI work that benefits from human review
|
|
8098
|
+
- You are verifying frontend/backend integrations visually`;
|
|
8099
|
+
var REFERENCE6 = `# Preview URLs
|
|
8100
|
+
|
|
8101
|
+
When you run services on ports \u2014 such as a web app, API server, or database \u2014 humans may want to interact with them directly. You can expose your locally running services as public preview URLs.
|
|
8102
|
+
|
|
8103
|
+
## Running Services for Preview
|
|
8104
|
+
|
|
8105
|
+
Services must run as detached background processes so they survive after your command session ends. Do not leave them attached to a foreground terminal.
|
|
8106
|
+
|
|
8107
|
+
Some potential methods:
|
|
8108
|
+
\`\`\`bash
|
|
8109
|
+
# Start a detached service with logging
|
|
8110
|
+
setsid -f bash -lc 'cd /path/to/app && exec yarn dev >> /tmp/app.log 2>&1'
|
|
8111
|
+
|
|
8112
|
+
# For daemons like Docker
|
|
8113
|
+
nohup dockerd > /tmp/dockerd.log 2>&1 &
|
|
8114
|
+
\`\`\`
|
|
8115
|
+
|
|
8116
|
+
After starting a service:
|
|
8117
|
+
1. Verify the process is running: \`pgrep -af 'yarn dev'\`
|
|
8118
|
+
2. Check logs for readiness: \`tail -f /tmp/app.log\`
|
|
8119
|
+
3. Confirm it's actually serving: \`curl -s http://localhost:3000\` (or appropriate health check)
|
|
8120
|
+
4. Only create the preview after the service is healthy
|
|
8121
|
+
|
|
8122
|
+
If a prior detached process exists on the same port, stop it before restarting.
|
|
8123
|
+
|
|
8124
|
+
## Creating Previews
|
|
8125
|
+
|
|
8126
|
+
\`\`\`bash
|
|
8127
|
+
# Expose a local port as a public URL
|
|
8128
|
+
replicas preview create <port>
|
|
8129
|
+
|
|
8130
|
+
# Expose a port with authentication (requires Replicas login to access)
|
|
8131
|
+
replicas preview create <port> --authenticated
|
|
8132
|
+
|
|
8133
|
+
# List all active preview URLs
|
|
8134
|
+
replicas preview list
|
|
8135
|
+
\`\`\`
|
|
8136
|
+
|
|
8137
|
+
The \`create\` command prints the public URL. You can also read all active previews from \`~/.replicas/preview-ports.json\`.
|
|
8138
|
+
|
|
8139
|
+
## Authenticated vs Unauthenticated Previews
|
|
8140
|
+
|
|
8141
|
+
Previews can optionally require cookie-based authentication. When \`--authenticated\` is set, only users who are logged in to replicas.dev can access the preview.
|
|
8142
|
+
|
|
8143
|
+
**When to use \`--authenticated\`:**
|
|
8144
|
+
- Frontends / web apps that humans will view directly in their browser. Since the user is already logged in to replicas.dev, the auth cookie is automatically present and the preview works seamlessly.
|
|
8145
|
+
|
|
8146
|
+
**When NOT to use \`--authenticated\`:**
|
|
8147
|
+
- Backend APIs and other services that are called by frontend code. The frontend runs in the user's browser under a different origin, so it cannot forward the Replicas auth cookie to the backend. Making backends authenticated will cause cross-service requests to fail with 401 errors.
|
|
8148
|
+
|
|
8149
|
+
**Rule of thumb:** Make frontend previews authenticated, leave backend/API previews unauthenticated.
|
|
8150
|
+
|
|
8151
|
+
## Cross-Service References
|
|
8152
|
+
|
|
8153
|
+
When you expose multiple services that reference each other, you must update their configuration so they use preview URLs instead of \`localhost\`.
|
|
8154
|
+
|
|
8155
|
+
**Example:** You run a React frontend on port 3000 that makes API calls to a backend on port 8585.
|
|
8156
|
+
|
|
8157
|
+
1. Create previews for both:
|
|
8158
|
+
\`\`\`bash
|
|
8159
|
+
replicas preview create 8585
|
|
8160
|
+
# Output: https://8585-<hash>.replicas.dev
|
|
8161
|
+
replicas preview create 3000 --authenticated
|
|
8162
|
+
# Output: https://3000-<hash>.replicas.dev
|
|
8163
|
+
\`\`\`
|
|
8164
|
+
|
|
8165
|
+
2. Update the frontend's environment so its API base URL points to the backend's **preview URL**, not \`localhost:8585\`. For example, set \`REACT_APP_API_URL=https://8585-<hash>.replicas.dev\` or update the relevant config file.
|
|
8166
|
+
|
|
8167
|
+
**Why?** The frontend works on \`localhost\` for you because both services run on the same machine. But a human viewing the preview is on a different machine \u2014 requests to \`localhost:8585\` from their browser will fail. They need the public preview URL instead.
|
|
8168
|
+
|
|
8169
|
+
## When to Create Previews
|
|
8170
|
+
|
|
8171
|
+
- After starting any service that a human should be able to view or interact with
|
|
8172
|
+
- When verifying frontend/backend integrations visually
|
|
8173
|
+
- When the task involves UI work that benefits from human review
|
|
8174
|
+
|
|
8175
|
+
It is your responsibility to make previews work for outsiders as well as they work for you on localhost. If at any time you need to see the public URLs that have been created, read \`~/.replicas/preview-ports.json\`.
|
|
8176
|
+
`;
|
|
8177
|
+
var PREVIEWS_ABILITY = {
|
|
8178
|
+
label: "Previews",
|
|
8179
|
+
description: "Expose locally running services on public preview URLs for humans.",
|
|
8180
|
+
bullet: "- Creating preview URLs for locally running services",
|
|
8181
|
+
section: SECTION6,
|
|
8182
|
+
referenceFile: { name: "PREVIEWS.md", content: REFERENCE6 }
|
|
8183
|
+
};
|
|
8184
|
+
|
|
8185
|
+
// ../shared/src/default-skills/replicas-agent/abilities/replicas.ts
|
|
8186
|
+
var SECTION7 = `### Replicas (in-workspace CLI)
|
|
8187
|
+
Take action *with* Replicas itself \u2014 manage automations, environments (variables, files), repos, and \`replicas.json\` config \u2014 using the pre-installed, pre-authenticated \`replicas\` CLI.
|
|
8188
|
+
|
|
8189
|
+
**Reference:** \`references/REPLICAS.md\`
|
|
8190
|
+
|
|
8191
|
+
Use this when:
|
|
8192
|
+
- The user asks you to create, edit, run, or delete an automation
|
|
8193
|
+
- The user asks you to manage environments, environment variables, or environment files
|
|
8194
|
+
- The user asks "what envs / repos / automations do I have?"
|
|
8195
|
+
- The user asks you to scaffold a \`replicas.json\` / \`replicas.yaml\` in a repo`;
|
|
8196
|
+
var REFERENCE7 = `# Replicas (in-workspace CLI)
|
|
8197
|
+
|
|
8198
|
+
This guide covers how to take action *with* Replicas itself from inside a Replicas workspace \u2014 managing automations, environments (and their variables/files), repos, previews, and the user's \`replicas.json\` config \u2014 using the pre-installed \`replicas\` CLI.
|
|
8199
|
+
|
|
8200
|
+
When the user asks _about_ Replicas (concepts, pricing, how a feature works), check https://docs.replicas.dev first. When the user asks you to _do_ something in their Replicas org, this is the file to use.
|
|
8201
|
+
|
|
8202
|
+
## Prerequisites
|
|
8203
|
+
|
|
8204
|
+
The CLI is pre-installed in every workspace and pre-authenticated using the workspace's engine secret. You do **not** need to log in or set an API key. Verify:
|
|
8205
|
+
|
|
8206
|
+
\`\`\`bash
|
|
8207
|
+
replicas whoami
|
|
8208
|
+
\`\`\`
|
|
8209
|
+
|
|
8210
|
+
Expected output (in agent mode):
|
|
8211
|
+
|
|
8212
|
+
\`\`\`
|
|
8213
|
+
Workspace identity:
|
|
8214
|
+
Workspace ID: <uuid>
|
|
8215
|
+
Organization ID: <uuid>
|
|
8216
|
+
\`\`\`
|
|
8217
|
+
|
|
8218
|
+
If you get "Not logged in", the workspace is misconfigured \u2014 surface this to the user instead of trying to work around it.
|
|
8219
|
+
|
|
8220
|
+
In agent mode the CLI hides commands that don't make sense for in-workspace agents (\`login\`, \`logout\`, \`codex-auth\`, \`claude-auth\`, \`org switch\`, \`config\`, \`interact\`, \`code\`, replica/workspace top-level CRUD). What you have is:
|
|
8221
|
+
|
|
8222
|
+
| Command | What it does |
|
|
8223
|
+
| --- | --- |
|
|
8224
|
+
| \`replicas whoami\` | Print the workspace + org identity |
|
|
8225
|
+
| \`replicas init\` | Create a \`replicas.json\` / \`replicas.yaml\` in the current directory |
|
|
8226
|
+
| \`replicas connect <name>\` | SSH into another workspace (requires user creds \u2014 usually only useful when scripting locally) |
|
|
8227
|
+
| \`replicas repos\` | List repos connected to the org |
|
|
8228
|
+
| \`replicas environment ...\` | Manage environments, env vars, env files |
|
|
8229
|
+
| \`replicas automation ...\` | Manage automations (cron + GitHub event triggers) |
|
|
8230
|
+
| \`replicas preview ...\` | Register / list preview URLs (covered in \`PREVIEWS.md\`) |
|
|
8231
|
+
| \`replicas media ...\` | Upload screenshots, videos, audio (covered in \`MEDIA.md\`) |
|
|
8232
|
+
|
|
8233
|
+
\`replicas <command> --help\` is always the source of truth for flags.
|
|
8234
|
+
|
|
8235
|
+
## Picking the right command for the user's request
|
|
8236
|
+
|
|
8237
|
+
| User says... | Run |
|
|
8238
|
+
| --- | --- |
|
|
8239
|
+
| "What environments do I have?" | \`replicas environment list\` |
|
|
8240
|
+
| "Add API key X to my staging env" | \`replicas environment vars set <env> <KEY> <VALUE>\` |
|
|
8241
|
+
| "Make me a \`.env\` file in the workspace with these vars" | \`replicas environment files set <env> .env --content "..."\` |
|
|
8242
|
+
| "Create a new env for my \`acme/web\` repo" | \`replicas environment create <name> -r acme/web\` |
|
|
8243
|
+
| "What automations do I have?" | \`replicas automation list\` |
|
|
8244
|
+
| "Run my nightly automation now" | \`replicas automation run <id>\` |
|
|
8245
|
+
| "Make an automation that runs every weekday at 9am" | \`replicas automation create\` (interactive) or \`--trigger-cron "0 9 * * 1-5"\` |
|
|
8246
|
+
| "Make an automation that runs when a PR opens on \`acme/web\`" | \`replicas automation create ... --trigger-github pull_request.opened --trigger-github-repos acme/web\` |
|
|
8247
|
+
| "What repos are connected?" | \`replicas repos\` |
|
|
8248
|
+
| "Set up a \`replicas.json\` in this repo" | \`replicas init\` (\`-y\` for YAML) |
|
|
8249
|
+
|
|
8250
|
+
## Environments
|
|
8251
|
+
|
|
8252
|
+
Environments are the org-scoped *primitives* workspaces are built from. Each environment can bind to one repository (or repository set), carry environment variables, project files, enabled skills, and MCP servers. The \`Global\` environment is special \u2014 its vars/files/skills/MCPs apply to *every* workspace in the org, but it has no repo binding and can't back a workspace on its own.
|
|
8253
|
+
|
|
8254
|
+
### List / get / create / edit / delete
|
|
8255
|
+
|
|
8256
|
+
\`\`\`bash
|
|
8257
|
+
replicas environment list
|
|
8258
|
+
replicas environment get <id-or-name> # use "global" for the Global env
|
|
8259
|
+
replicas environment create [name] \\
|
|
8260
|
+
--description "..." \\
|
|
8261
|
+
--repository <repo-name-or-id> \\
|
|
8262
|
+
--system-prompt "..."
|
|
8263
|
+
replicas environment edit <id-or-name> \\
|
|
8264
|
+
--name "..." --description "..." \\
|
|
8265
|
+
--repository <repo-name-or-id> # pass empty string to unbind
|
|
8266
|
+
replicas environment delete <id-or-name> [--force]
|
|
8267
|
+
\`\`\`
|
|
8268
|
+
|
|
8269
|
+
Notes:
|
|
8270
|
+
- Environments resolve by **name or UUID**. \`global\` is an alias for the org's Global env.
|
|
8271
|
+
- Non-global envs need a repo (or repo set) to back a workspace. If you \`create\` without \`--repository\`, the CLI prompts; in non-interactive contexts pass \`-r\`.
|
|
8272
|
+
- \`edit\` on the Global env is rejected by the API \u2014 manage its contents through the \`vars\` / \`files\` subcommands instead.
|
|
8273
|
+
|
|
8274
|
+
### Environment variables
|
|
8275
|
+
|
|
8276
|
+
\`\`\`bash
|
|
8277
|
+
replicas environment vars list <env>
|
|
8278
|
+
replicas environment vars set <env> <KEY> <VALUE> # upsert (create or update)
|
|
8279
|
+
replicas environment vars delete <env> <KEY|VARIABLE_ID> [--force]
|
|
8280
|
+
\`\`\`
|
|
8281
|
+
|
|
8282
|
+
\`vars set\` is upsert: if a variable with that key already exists, it's updated; otherwise created. The CLI accepts either the variable's \`key\` or its UUID for \`delete\`.
|
|
8283
|
+
|
|
8284
|
+
These variables are injected into every workspace built from this environment as actual \`env\` vars \u2014 perfect for API keys, feature flags, etc. Anything you want available to the agent's tools (Claude, codex, your code, etc.) goes here.
|
|
8285
|
+
|
|
8286
|
+
### Environment files
|
|
8287
|
+
|
|
8288
|
+
Files materialize on the workspace filesystem when a workspace starts, at the destination path you specify. Use this for things like \`.env\` files at the repo root, dotfiles in \`~\`, prompt files for agents, etc.
|
|
8289
|
+
|
|
8290
|
+
\`\`\`bash
|
|
8291
|
+
replicas environment files list <env>
|
|
8292
|
+
replicas environment files set <env> <destination-path> --content "..." # inline
|
|
8293
|
+
replicas environment files set <env> <destination-path> --file <local-path> # from local file
|
|
8294
|
+
replicas environment files set <env> <destination-path> --file <local-path> --name "Friendly name"
|
|
8295
|
+
replicas environment files delete <env> <destination-path|FILE_ID> [--force]
|
|
8296
|
+
\`\`\`
|
|
8297
|
+
|
|
8298
|
+
Constraints:
|
|
8299
|
+
- Each file is capped at 64KB.
|
|
8300
|
+
- \`set\` is upsert (matched by destination path).
|
|
8301
|
+
- The display \`--name\` defaults to the basename of the destination path; override only if it would be unclear in the dashboard list.
|
|
8302
|
+
|
|
8303
|
+
## Automations
|
|
8304
|
+
|
|
8305
|
+
Automations are saved prompts with one or more triggers (cron schedules and/or GitHub events). When fired, they create a workspace using the configured environment and run the prompt with the user's coding agent.
|
|
8306
|
+
|
|
8307
|
+
### List / get / run / delete
|
|
8308
|
+
|
|
8309
|
+
\`\`\`bash
|
|
8310
|
+
replicas automation list
|
|
8311
|
+
replicas automation get <id>
|
|
8312
|
+
replicas automation run <id> # cron-triggered automations only
|
|
8313
|
+
replicas automation delete <id> [--force]
|
|
8314
|
+
\`\`\`
|
|
8315
|
+
|
|
8316
|
+
### Create
|
|
8317
|
+
|
|
8318
|
+
Either fully flag-driven or fully interactive \u2014 the CLI prompts for anything you don't pass.
|
|
8319
|
+
|
|
8320
|
+
\`\`\`bash
|
|
8321
|
+
# Cron trigger
|
|
8322
|
+
replicas automation create "Nightly typecheck" \\
|
|
8323
|
+
--prompt "Run \\\`bun typecheck\\\` and report any new errors" \\
|
|
8324
|
+
--environment <env-name-or-id> \\
|
|
8325
|
+
--trigger-cron "0 4 * * *" \\
|
|
8326
|
+
--trigger-cron-timezone "America/New_York"
|
|
8327
|
+
|
|
8328
|
+
# GitHub trigger (filter to specific repos)
|
|
8329
|
+
replicas automation create "Review my PRs" \\
|
|
8330
|
+
--prompt "Leave a code review on this PR" \\
|
|
8331
|
+
--environment <env-name-or-id> \\
|
|
8332
|
+
--trigger-github pull_request.opened \\
|
|
8333
|
+
--trigger-github-repos acme/web,acme/api
|
|
8334
|
+
|
|
8335
|
+
# Disable on creation
|
|
8336
|
+
replicas automation create ... --disabled
|
|
8337
|
+
|
|
8338
|
+
# Workspace lifecycle
|
|
8339
|
+
replicas automation create ... --lifecycle delete_when_done
|
|
8340
|
+
replicas automation create ... --lifecycle delete_after_inactivity --auto-stop-minutes 30
|
|
8341
|
+
\`\`\`
|
|
8342
|
+
|
|
8343
|
+
When the user says "make me an automation that...", default to **picking the environment for them by listing the available envs** and asking only when the user hasn't already pinned one. Same for repos in GitHub triggers. Don't pepper the user with questions you can answer by reading the existing config.
|
|
8344
|
+
|
|
8345
|
+
### Edit
|
|
8346
|
+
|
|
8347
|
+
\`\`\`bash
|
|
8348
|
+
replicas automation edit <id> \\
|
|
8349
|
+
--name "..." \\
|
|
8350
|
+
--prompt "..." \\
|
|
8351
|
+
--enabled true|false \\
|
|
8352
|
+
--environment <env-name-or-id> \\
|
|
8353
|
+
--trigger-cron "0 4 * * *" # replaces existing triggers
|
|
8354
|
+
\`\`\`
|
|
8355
|
+
|
|
8356
|
+
\`replicas automation edit <id>\` with no flags drops into interactive mode.
|
|
8357
|
+
|
|
8358
|
+
## Repositories
|
|
8359
|
+
|
|
8360
|
+
Read-only listing of repos connected to the org. Use when the user asks "what repos can I use?", or to validate a \`--repository\` value before passing it to \`environment create\` / \`automation create\`:
|
|
8361
|
+
|
|
8362
|
+
\`\`\`bash
|
|
8363
|
+
replicas repos
|
|
8364
|
+
\`\`\`
|
|
8365
|
+
|
|
8366
|
+
Repos are connected via the GitHub integration in the dashboard \u2014 not from the CLI. If the user wants a repo connected, point them at the dashboard rather than trying to do it yourself.
|
|
8367
|
+
|
|
8368
|
+
## \`replicas.json\` / \`replicas.yaml\`
|
|
8369
|
+
|
|
8370
|
+
\`replicas init\` creates a starter config in the current directory. \`-y\` writes YAML, \`-f\` overwrites an existing file. This file controls per-repo workspace setup (warm hooks, start hooks, organization scoping for GitHub triggers). When the user asks to "set up Replicas in this repo", run \`replicas init\` and then edit the generated file based on what they need.
|
|
8371
|
+
|
|
8372
|
+
## When NOT to use the CLI
|
|
8373
|
+
|
|
8374
|
+
- **Don't use the CLI to reach into other tools' state** (Linear, Slack, GitHub) \u2014 those have dedicated skill references in this directory.
|
|
8375
|
+
- **Don't try to install Replicas, log in, or switch orgs** \u2014 those flows are user-facing and aren't available in agent mode anyway.
|
|
8376
|
+
- **Don't create workspaces** from inside an existing workspace just to run a command. You're already in one.
|
|
8377
|
+
|
|
8378
|
+
## Common errors
|
|
8379
|
+
|
|
8380
|
+
- \`Missing Replicas-Org-Id header\` \u2192 the workspace is hitting an older monolith that doesn't yet recognize agent auth on this endpoint. Surface this to the user; don't try to work around it by faking headers.
|
|
8381
|
+
- \`Workspace not found\` \u2192 the workspace was deleted while you were running. Stop and tell the user.
|
|
8382
|
+
- \`An environment with this name already exists\` \u2192 use \`environment edit\` instead, or pick a different name.
|
|
8383
|
+
- \`Cannot delete the global environment\` \u2192 there is exactly one Global env per org and it's permanent. Manage its *contents* (\`vars\`, \`files\`) instead.
|
|
8384
|
+
`;
|
|
8385
|
+
var REPLICAS_ABILITY = {
|
|
8386
|
+
label: "Replicas",
|
|
8387
|
+
description: "Teach the agent about Replicas itself \u2014 automations, environments, the in-workspace CLI.",
|
|
8388
|
+
// No bullet — help_instructions covers the `replicas` CLI surface in detail.
|
|
8389
|
+
bullet: "",
|
|
8390
|
+
section: SECTION7,
|
|
8391
|
+
referenceFile: { name: "REPLICAS.md", content: REFERENCE7 },
|
|
8392
|
+
locked: true
|
|
8393
|
+
};
|
|
8394
|
+
|
|
8395
|
+
// ../shared/src/default-skills/replicas-agent/abilities/slack.ts
|
|
8396
|
+
var SECTION8 = `### Slack
|
|
8397
|
+
Send messages, read threads, search conversations, and upload files via the Slack Web API.
|
|
8398
|
+
|
|
8399
|
+
**Reference:** \`references/SLACK.md\`
|
|
8400
|
+
|
|
8401
|
+
Use this when:
|
|
8402
|
+
- You need to send a message to a Slack channel or thread
|
|
8403
|
+
- You need to read or fetch a Slack conversation
|
|
8404
|
+
- You encounter a Slack message link and need to retrieve its content
|
|
8405
|
+
- The task asks you to notify, update, or communicate via Slack`;
|
|
8406
|
+
var REFERENCE8 = `# Slack Integration
|
|
8407
|
+
|
|
8408
|
+
This guide covers how to interact with Slack from within your Replicas workspace.
|
|
8409
|
+
|
|
8410
|
+
## Prerequisites
|
|
8411
|
+
|
|
8412
|
+
Check if the \`SLACK_BOT_TOKEN\` environment variable is set:
|
|
8413
|
+
|
|
8414
|
+
\`\`\`bash
|
|
8415
|
+
echo "\${SLACK_BOT_TOKEN:+set}"
|
|
8416
|
+
\`\`\`
|
|
8417
|
+
|
|
8418
|
+
- If **set**: Your workspace has Slack access. You can use the Slack Web API as described below.
|
|
8419
|
+
- If **not set**: Slack has not been configured for this workspace. The user needs to connect Slack in the [Replicas dashboard](https://replicas.dev) under their organization's integration settings. Let the user know and do not attempt Slack operations.
|
|
8420
|
+
|
|
8421
|
+
## Using the Slack API
|
|
8422
|
+
|
|
8423
|
+
All requests use the \`$SLACK_BOT_TOKEN\` for authentication via the Slack Web API.
|
|
8424
|
+
|
|
8425
|
+
### Fetching a Thread from a Slack Link
|
|
8426
|
+
|
|
8427
|
+
If you encounter a Slack message link (e.g. \`https://team.slack.com/archives/C0123ABC/p1234567890123456\`), extract the channel ID and thread timestamp:
|
|
8428
|
+
|
|
8429
|
+
- **Channel ID**: The segment after \`/archives/\` (e.g. \`C0123ABC\`)
|
|
8430
|
+
- **Thread TS**: The \`p\` value with a dot inserted before the last 6 digits (e.g. \`p1234567890123456\` -> \`1234567890.123456\`)
|
|
8431
|
+
|
|
8432
|
+
\`\`\`bash
|
|
8433
|
+
curl -s "https://slack.com/api/conversations.replies?channel=CHANNEL_ID&ts=THREAD_TS" \\
|
|
8434
|
+
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
|
|
8435
|
+
\`\`\`
|
|
8436
|
+
|
|
8437
|
+
### Sending a Message
|
|
8438
|
+
|
|
8439
|
+
\`\`\`bash
|
|
8440
|
+
curl -s -X POST "https://slack.com/api/chat.postMessage" \\
|
|
8441
|
+
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \\
|
|
8442
|
+
-H "Content-Type: application/json" \\
|
|
8443
|
+
-d '{
|
|
8444
|
+
"channel": "CHANNEL_ID",
|
|
8445
|
+
"text": "Your message here",
|
|
8446
|
+
"thread_ts": "OPTIONAL_THREAD_TS"
|
|
8447
|
+
}'
|
|
8448
|
+
\`\`\`
|
|
8449
|
+
|
|
8450
|
+
Omit \`thread_ts\` to post a new message to the channel. Include it to reply in a thread.
|
|
8451
|
+
|
|
8452
|
+
### Searching Messages
|
|
8453
|
+
|
|
8454
|
+
\`\`\`bash
|
|
8455
|
+
curl -s "https://slack.com/api/search.messages?query=YOUR_SEARCH_QUERY" \\
|
|
8456
|
+
-H "Authorization: Bearer $SLACK_BOT_TOKEN"
|
|
8457
|
+
\`\`\`
|
|
8458
|
+
|
|
8459
|
+
### Uploading Files
|
|
8460
|
+
|
|
8461
|
+
\`\`\`bash
|
|
8462
|
+
curl -s -X POST "https://slack.com/api/files.uploadV2" \\
|
|
8463
|
+
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \\
|
|
8464
|
+
-F "channel_id=CHANNEL_ID" \\
|
|
8465
|
+
-F "file=@/path/to/file" \\
|
|
8466
|
+
-F "title=File title"
|
|
8467
|
+
\`\`\`
|
|
8468
|
+
|
|
8469
|
+
### Other Operations
|
|
8470
|
+
|
|
8471
|
+
You can list channels, read channel history, add reactions, and perform any other operation supported by the Slack Web API using the same authentication pattern.
|
|
8472
|
+
|
|
8473
|
+
For full API documentation, see: https://docs.slack.dev/apis/web-api/
|
|
8474
|
+
`;
|
|
8475
|
+
var SLACK_ABILITY = {
|
|
8476
|
+
label: "Slack",
|
|
8477
|
+
description: "Send messages, read threads, search conversations, upload files.",
|
|
8478
|
+
bullet: "- Interacting with Slack (sending messages, reading threads, etc.)",
|
|
8479
|
+
section: SECTION8,
|
|
8480
|
+
referenceFile: { name: "SLACK.md", content: REFERENCE8 }
|
|
8481
|
+
};
|
|
8482
|
+
|
|
8483
|
+
// ../shared/src/default-skills/replicas-agent/registry.ts
|
|
8484
|
+
var REPLICAS_AGENT_ABILITY_REGISTRY = {
|
|
8485
|
+
replicas: REPLICAS_ABILITY,
|
|
8486
|
+
docker: DOCKER_ABILITY,
|
|
8487
|
+
github: GITHUB_ABILITY,
|
|
8488
|
+
google: GOOGLE_ABILITY,
|
|
8489
|
+
linear: LINEAR_ABILITY,
|
|
8490
|
+
media: MEDIA_ABILITY,
|
|
8491
|
+
previews: PREVIEWS_ABILITY,
|
|
8492
|
+
slack: SLACK_ABILITY
|
|
8493
|
+
};
|
|
8494
|
+
var REPLICAS_AGENT_ABILITIES = Object.keys(
|
|
8495
|
+
REPLICAS_AGENT_ABILITY_REGISTRY
|
|
8496
|
+
);
|
|
8497
|
+
|
|
8498
|
+
// ../shared/src/routes/preferences.ts
|
|
8499
|
+
var DEFAULT_REPLICAS_AGENT_ABILITIES = Object.fromEntries(
|
|
8500
|
+
REPLICAS_AGENT_ABILITIES.map((key) => [key, true])
|
|
8501
|
+
);
|
|
8502
|
+
var DEFAULT_DEFAULT_SKILLS = {
|
|
8503
|
+
replicas_agent: {
|
|
8504
|
+
enabled: true,
|
|
8505
|
+
abilities: { ...DEFAULT_REPLICAS_AGENT_ABILITIES }
|
|
8506
|
+
}
|
|
8507
|
+
};
|
|
7402
8508
|
|
|
7403
8509
|
// ../shared/src/replicas-config.ts
|
|
7404
8510
|
var import_yaml = __toESM(require_dist());
|
|
@@ -7406,11 +8512,45 @@ var import_yaml = __toESM(require_dist());
|
|
|
7406
8512
|
// ../shared/src/warm-hooks.ts
|
|
7407
8513
|
var DEFAULT_WARM_HOOK_TIMEOUT_MS = 5 * 60 * 1e3;
|
|
7408
8514
|
var MAX_WARM_HOOK_TIMEOUT_MS = 15 * 60 * 1e3;
|
|
8515
|
+
var HOOK_EXEC_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
|
|
8516
|
+
|
|
8517
|
+
// ../shared/src/engine/types.ts
|
|
8518
|
+
var CLAUDE_OPUS_1M_MODEL = "opus[1m]";
|
|
8519
|
+
var LEGACY_CLAUDE_OPUS_1M_MODEL = "opus-1m";
|
|
8520
|
+
var MODEL_LABELS = {
|
|
8521
|
+
sonnet: "Sonnet 4.5",
|
|
8522
|
+
opus: "Opus 4.7",
|
|
8523
|
+
[CLAUDE_OPUS_1M_MODEL]: "Opus 4.7 (1M)",
|
|
8524
|
+
[LEGACY_CLAUDE_OPUS_1M_MODEL]: "Opus 4.7 (1M)",
|
|
8525
|
+
haiku: "Haiku 4.5",
|
|
8526
|
+
"gpt-5.5": "GPT-5.5",
|
|
8527
|
+
"gpt-5.4": "GPT-5.4",
|
|
8528
|
+
"gpt-5.4-mini": "GPT-5.4 Mini",
|
|
8529
|
+
"gpt-5.3-codex": "GPT-5.3 Codex",
|
|
8530
|
+
"gpt-5.3-codex-spark": "GPT-5.3 Codex Spark",
|
|
8531
|
+
"gpt-5.2-codex": "GPT-5.2 Codex",
|
|
8532
|
+
"gpt-5.2": "GPT-5.2",
|
|
8533
|
+
"gpt-5.1-codex-max": "GPT-5.1 Codex Max",
|
|
8534
|
+
"gpt-5.1-codex": "GPT-5.1 Codex",
|
|
8535
|
+
"gpt-5.1": "GPT-5.1",
|
|
8536
|
+
"gpt-5-codex": "GPT-5 Codex",
|
|
8537
|
+
"gpt-5": "GPT-5"
|
|
8538
|
+
};
|
|
7409
8539
|
|
|
7410
8540
|
// ../shared/src/routes/workspaces.ts
|
|
7411
8541
|
var WORKSPACE_FILE_UPLOAD_MAX_SIZE_BYTES = 20 * 1024 * 1024;
|
|
7412
8542
|
var WORKSPACE_FILE_CONTENT_MAX_SIZE_BYTES = 1 * 1024 * 1024;
|
|
7413
8543
|
|
|
8544
|
+
// ../shared/src/audit-log.ts
|
|
8545
|
+
var AUDIT_LOG_ACTION = {
|
|
8546
|
+
CREATE: "create",
|
|
8547
|
+
UPDATE: "update",
|
|
8548
|
+
DELETE: "delete",
|
|
8549
|
+
CONNECT: "connect",
|
|
8550
|
+
DISCONNECT: "disconnect"
|
|
8551
|
+
};
|
|
8552
|
+
var AUDIT_LOG_ACTIONS = Object.values(AUDIT_LOG_ACTION);
|
|
8553
|
+
|
|
7414
8554
|
// ../shared/src/display-message/parsers/codex-parser.ts
|
|
7415
8555
|
function safeJsonParse(str, fallback) {
|
|
7416
8556
|
try {
|
|
@@ -7487,6 +8627,22 @@ function parseCodexEvents(events) {
|
|
|
7487
8627
|
const pendingCommands = /* @__PURE__ */ new Map();
|
|
7488
8628
|
const pendingPatches = /* @__PURE__ */ new Map();
|
|
7489
8629
|
events.forEach((event, eventIndex) => {
|
|
8630
|
+
if (event.type === CODEX_QUOTA_STATUS_EVENT_TYPE) {
|
|
8631
|
+
const state = event.payload?.state;
|
|
8632
|
+
if (state) {
|
|
8633
|
+
messages.push({
|
|
8634
|
+
id: `codex-quota-${event.timestamp}-${eventIndex}`,
|
|
8635
|
+
type: "quota_status",
|
|
8636
|
+
provider: "codex",
|
|
8637
|
+
state,
|
|
8638
|
+
balance: event.payload?.balance ?? null,
|
|
8639
|
+
rateLimitResetType: event.payload?.rateLimitResetType ?? null,
|
|
8640
|
+
planType: event.payload?.planType ?? null,
|
|
8641
|
+
timestamp: event.timestamp
|
|
8642
|
+
});
|
|
8643
|
+
}
|
|
8644
|
+
return;
|
|
8645
|
+
}
|
|
7490
8646
|
if (event.type === "event_msg" && event.payload?.type === "user_message") {
|
|
7491
8647
|
messages.push({
|
|
7492
8648
|
id: `user-${event.timestamp}-${eventIndex}`,
|
|
@@ -7678,11 +8834,11 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
7678
8834
|
timestamp: event.timestamp
|
|
7679
8835
|
});
|
|
7680
8836
|
}
|
|
7681
|
-
if (block.type === "thinking" && block.
|
|
8837
|
+
if (block.type === "thinking" && block.thinking) {
|
|
7682
8838
|
messages.push({
|
|
7683
8839
|
id: `reasoning-${event.timestamp}-${messages.length}`,
|
|
7684
8840
|
type: "reasoning",
|
|
7685
|
-
content: block.
|
|
8841
|
+
content: block.thinking,
|
|
7686
8842
|
status: "completed",
|
|
7687
8843
|
timestamp: event.timestamp
|
|
7688
8844
|
});
|
|
@@ -7799,6 +8955,32 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
7799
8955
|
status: "in_progress",
|
|
7800
8956
|
timestamp: event.timestamp
|
|
7801
8957
|
});
|
|
8958
|
+
} else if (toolName === "mcp__relay-subagent-tools__spawn_agent") {
|
|
8959
|
+
const inputObj = typeof toolInput === "string" ? safeJsonParse2(toolInput, {}) : toolInput;
|
|
8960
|
+
messages.push({
|
|
8961
|
+
id: `subagent-${event.timestamp}-${messages.length}`,
|
|
8962
|
+
type: "subagent",
|
|
8963
|
+
toolUseId,
|
|
8964
|
+
description: inputObj.title || `Relay subagent (${inputObj.provider || "unknown"})`,
|
|
8965
|
+
prompt: inputObj.prompt || "",
|
|
8966
|
+
subagentType: inputObj.provider || "unknown",
|
|
8967
|
+
model: inputObj.model,
|
|
8968
|
+
status: "in_progress",
|
|
8969
|
+
nestedEvents: [],
|
|
8970
|
+
isChatBased: true,
|
|
8971
|
+
timestamp: event.timestamp
|
|
8972
|
+
});
|
|
8973
|
+
} else if (toolName === "mcp__relay-subagent-tools__delete_agent") {
|
|
8974
|
+
const inputObj = typeof toolInput === "string" ? safeJsonParse2(toolInput, {}) : toolInput;
|
|
8975
|
+
messages.push({
|
|
8976
|
+
id: `toolcall-${event.timestamp}-${messages.length}`,
|
|
8977
|
+
type: "tool_call",
|
|
8978
|
+
server: "relay-subagent-tools",
|
|
8979
|
+
tool: "delete_agent",
|
|
8980
|
+
input: inputObj,
|
|
8981
|
+
status: "in_progress",
|
|
8982
|
+
timestamp: event.timestamp
|
|
8983
|
+
});
|
|
7802
8984
|
} else {
|
|
7803
8985
|
messages.push({
|
|
7804
8986
|
id: `toolcall-${event.timestamp}-${messages.length}`,
|
|
@@ -7827,6 +9009,37 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
7827
9009
|
}
|
|
7828
9010
|
}
|
|
7829
9011
|
});
|
|
9012
|
+
filteredEvents.forEach((event) => {
|
|
9013
|
+
if (event.type === "replicas-tool-input-request") {
|
|
9014
|
+
const payload = event.payload;
|
|
9015
|
+
if (!payload.toolUseId || !payload.requestId) return;
|
|
9016
|
+
if (!Array.isArray(payload.options) && !Array.isArray(payload.questions)) return;
|
|
9017
|
+
const toolInfo = toolCallMap.get(payload.toolUseId);
|
|
9018
|
+
if (!toolInfo) return;
|
|
9019
|
+
const message = messages[toolInfo.messageIndex];
|
|
9020
|
+
if (!message || message.type !== "tool_call") return;
|
|
9021
|
+
message.inputRequest = {
|
|
9022
|
+
requestId: payload.requestId,
|
|
9023
|
+
status: "pending",
|
|
9024
|
+
options: payload.options,
|
|
9025
|
+
questions: payload.questions
|
|
9026
|
+
};
|
|
9027
|
+
}
|
|
9028
|
+
if (event.type === "replicas-tool-input-resolved") {
|
|
9029
|
+
const payload = event.payload;
|
|
9030
|
+
if (!payload.toolUseId || !payload.selectionId) return;
|
|
9031
|
+
const toolInfo = toolCallMap.get(payload.toolUseId);
|
|
9032
|
+
if (!toolInfo) return;
|
|
9033
|
+
const message = messages[toolInfo.messageIndex];
|
|
9034
|
+
if (!message || message.type !== "tool_call" || !message.inputRequest) return;
|
|
9035
|
+
message.inputRequest = {
|
|
9036
|
+
...message.inputRequest,
|
|
9037
|
+
status: payload.selectionId === "aborted" ? "aborted" : "resolved",
|
|
9038
|
+
selectionId: payload.selectionId,
|
|
9039
|
+
selectionSummary: payload.selectionSummary
|
|
9040
|
+
};
|
|
9041
|
+
}
|
|
9042
|
+
});
|
|
7830
9043
|
filteredEvents.forEach((event) => {
|
|
7831
9044
|
if (event.type === "claude-user") {
|
|
7832
9045
|
const content = event.payload.message?.content || [];
|
|
@@ -7860,6 +9073,12 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
7860
9073
|
} else if (message.type === "subagent") {
|
|
7861
9074
|
message.output = resultContent;
|
|
7862
9075
|
message.status = status;
|
|
9076
|
+
if (!message.chatId && resultContent) {
|
|
9077
|
+
const parsed = safeJsonParse2(resultContent, {});
|
|
9078
|
+
if (parsed.chatId) {
|
|
9079
|
+
message.chatId = parsed.chatId;
|
|
9080
|
+
}
|
|
9081
|
+
}
|
|
7863
9082
|
}
|
|
7864
9083
|
}
|
|
7865
9084
|
}
|
|
@@ -7871,14 +9090,20 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
7871
9090
|
function parseAgentEvents(events, agentType) {
|
|
7872
9091
|
if (agentType === "codex") {
|
|
7873
9092
|
return parseCodexEvents(events);
|
|
7874
|
-
} else if (agentType === "claude") {
|
|
7875
|
-
return parseClaudeEvents(events);
|
|
7876
9093
|
}
|
|
7877
|
-
return
|
|
9094
|
+
return parseClaudeEvents(events);
|
|
7878
9095
|
}
|
|
7879
9096
|
|
|
9097
|
+
// ../shared/src/object-store/types.ts
|
|
9098
|
+
var MEDIA_KIND = {
|
|
9099
|
+
IMAGE: "image",
|
|
9100
|
+
VIDEO: "video",
|
|
9101
|
+
AUDIO: "audio"
|
|
9102
|
+
};
|
|
9103
|
+
var MEDIA_KINDS = [MEDIA_KIND.IMAGE, MEDIA_KIND.VIDEO, MEDIA_KIND.AUDIO];
|
|
9104
|
+
|
|
7880
9105
|
// src/index.ts
|
|
7881
|
-
var API_URL = process.env.REPLICAS_API_URL || "https://api.
|
|
9106
|
+
var API_URL = process.env.REPLICAS_API_URL || "https://api.tryreplicas.com";
|
|
7882
9107
|
var API_KEY = process.env.REPLICAS_API_KEY;
|
|
7883
9108
|
if (!API_KEY) {
|
|
7884
9109
|
console.error("REPLICAS_API_KEY environment variable required");
|
|
@@ -7910,7 +9135,7 @@ function result(data, isError = false) {
|
|
|
7910
9135
|
}
|
|
7911
9136
|
var server = new McpServer({
|
|
7912
9137
|
name: "replicas-mcp",
|
|
7913
|
-
version: "0.2.
|
|
9138
|
+
version: "0.2.2"
|
|
7914
9139
|
});
|
|
7915
9140
|
var registerTool = server.registerTool.bind(server);
|
|
7916
9141
|
registerTool(
|