pi-t3-bridge 0.3.0 → 0.4.1

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.
Files changed (138) hide show
  1. package/overlay/overlay.json +118 -0
  2. package/package.json +14 -6
  3. package/pstack/skills/architect/SKILL.md +1 -1
  4. package/pstack/skills/arena/SKILL.md +1 -1
  5. package/pstack/skills/how/SKILL.md +1 -1
  6. package/pstack/skills/interrogate/SKILL.md +1 -1
  7. package/pstack/skills/poteto-help/SKILL.md +1 -1
  8. package/pstack/skills/poteto-mode/SKILL.md +4 -4
  9. package/pstack/skills/poteto-mode/brief.md +4 -4
  10. package/pstack/skills/poteto-mode/playbooks/autopilot-full.md +1 -1
  11. package/pstack/skills/poteto-mode/playbooks/orchestrate.md +1 -1
  12. package/pstack/skills/poteto-mode/scripts/node_modules/commander/LICENSE +22 -0
  13. package/pstack/skills/poteto-mode/scripts/node_modules/commander/Readme.md +1172 -0
  14. package/pstack/skills/poteto-mode/scripts/node_modules/commander/index.js +21 -0
  15. package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/argument.js +147 -0
  16. package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/command.js +2790 -0
  17. package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/error.js +36 -0
  18. package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/help.js +731 -0
  19. package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/option.js +377 -0
  20. package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/suggestSimilar.js +99 -0
  21. package/pstack/skills/poteto-mode/scripts/node_modules/commander/package-support.json +19 -0
  22. package/pstack/skills/poteto-mode/scripts/node_modules/commander/package.json +64 -0
  23. package/pstack/skills/poteto-mode/scripts/node_modules/commander/typings/index.d.ts +1113 -0
  24. package/pstack/skills/reflect/SKILL.md +1 -1
  25. package/pstack/skills/setup-pstack/SKILL.md +3 -3
  26. package/pstack/skills/statechart/scripts/node_modules/.package-lock.json +46 -0
  27. package/pstack/skills/statechart/scripts/node_modules/fast-check/LICENSE +21 -0
  28. package/pstack/skills/statechart/scripts/node_modules/fast-check/README.md +263 -0
  29. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/cjs/fast-check.d.ts +5165 -0
  30. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/cjs/fast-check.js +12147 -0
  31. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/cjs/package.json +3 -0
  32. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/cjs/types57/fast-check.d.ts +5165 -0
  33. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/fast-check.d.ts +5165 -0
  34. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/fast-check.js +12011 -0
  35. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/rolldown-runtime-D7D4PA-g.js +13 -0
  36. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/types57/fast-check.d.ts +5165 -0
  37. package/pstack/skills/statechart/scripts/node_modules/fast-check/package.json +94 -0
  38. package/pstack/skills/statechart/scripts/node_modules/pure-rand/LICENSE +21 -0
  39. package/pstack/skills/statechart/scripts/node_modules/pure-rand/README.md +168 -0
  40. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/RandomGenerator-DcXj09Ch.d.ts +14 -0
  41. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformBigInt.d.ts +15 -0
  42. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformBigInt.js +38 -0
  43. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformFloat32.d.ts +15 -0
  44. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformFloat32.js +18 -0
  45. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformFloat64.d.ts +15 -0
  46. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformFloat64.js +22 -0
  47. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformInt.d.ts +15 -0
  48. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformInt.js +134 -0
  49. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/RandomGenerator-DcXj09Ch.d.ts +14 -0
  50. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformBigInt.d.ts +15 -0
  51. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformBigInt.js +37 -0
  52. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformFloat32.d.ts +15 -0
  53. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformFloat32.js +17 -0
  54. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformFloat64.d.ts +15 -0
  55. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformFloat64.js +21 -0
  56. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformInt.d.ts +15 -0
  57. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformInt.js +133 -0
  58. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/congruential32.d.ts +7 -0
  59. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/congruential32.js +44 -0
  60. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/mersenne.d.ts +7 -0
  61. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/mersenne.js +90 -0
  62. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/xoroshiro128plus.d.ts +7 -0
  63. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/xoroshiro128plus.js +80 -0
  64. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/xorshift128plus.d.ts +7 -0
  65. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/xorshift128plus.js +78 -0
  66. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/package.json +3 -0
  67. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/types/JumpableRandomGenerator.d.ts +16 -0
  68. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/types/JumpableRandomGenerator.js +0 -0
  69. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/types/RandomGenerator.d.ts +2 -0
  70. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/types/RandomGenerator.js +0 -0
  71. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/generateN.d.ts +6 -0
  72. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/generateN.js +8 -0
  73. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/purify.d.ts +12 -0
  74. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/purify.js +9 -0
  75. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/skipN.d.ts +6 -0
  76. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/skipN.js +6 -0
  77. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/congruential32.d.ts +7 -0
  78. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/congruential32.js +46 -0
  79. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/mersenne.d.ts +7 -0
  80. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/mersenne.js +92 -0
  81. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/xoroshiro128plus.d.ts +7 -0
  82. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/xoroshiro128plus.js +82 -0
  83. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/xorshift128plus.d.ts +7 -0
  84. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/xorshift128plus.js +80 -0
  85. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/types/JumpableRandomGenerator.d.ts +16 -0
  86. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/types/JumpableRandomGenerator.js +0 -0
  87. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/types/RandomGenerator.d.ts +2 -0
  88. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/types/RandomGenerator.js +0 -0
  89. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/generateN.d.ts +6 -0
  90. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/generateN.js +9 -0
  91. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/purify.d.ts +12 -0
  92. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/purify.js +10 -0
  93. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/skipN.d.ts +6 -0
  94. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/skipN.js +7 -0
  95. package/pstack/skills/statechart/scripts/node_modules/pure-rand/package.json +133 -0
  96. package/pstack/skills/statechart/scripts/run.ts +1 -1
  97. package/pstack/skills/swarm/SKILL.md +1 -1
  98. package/pstack/skills/why/SKILL.md +1 -1
  99. package/src/bridge/accounts.ts +2 -2
  100. package/src/bridge/ask.ts +2 -2
  101. package/src/bridge/bash-timeout.ts +1 -1
  102. package/src/bridge/bridge-trim.ts +16 -21
  103. package/src/bridge/config.ts +2 -2
  104. package/src/bridge/plan.ts +1 -1
  105. package/src/bridge/resume.ts +2 -2
  106. package/src/bridge/state.ts +2 -2
  107. package/src/bridge/steer-judge.ts +2 -2
  108. package/src/bridge/steer-transcript.ts +1 -1
  109. package/src/bridge/steer.ts +1 -1
  110. package/src/bridge/t3-json.ts +2 -2
  111. package/src/bridge/tasks.ts +2 -2
  112. package/src/bridge/thread.ts +1 -1
  113. package/src/bridge/transcript.ts +2 -2
  114. package/src/pstack/brief.ts +1 -1
  115. package/src/pstack/child.ts +1 -1
  116. package/src/pstack/models.ts +2 -2
  117. package/src/pstack/overlay.ts +251 -0
  118. package/src/pstack/resources.ts +16 -2
  119. package/src/pstack/results.ts +1 -1
  120. package/src/pstack/sandbox.ts +1 -1
  121. package/src/pstack/session.ts +4 -24
  122. package/tstack/LICENSE +21 -0
  123. package/tstack/README.md +53 -0
  124. package/tstack/skills/babysit-pr/SKILL.md +117 -0
  125. package/tstack/skills/babysit-pr/scripts/pr-wait +556 -0
  126. package/tstack/skills/council/SKILL.md +56 -0
  127. package/tstack/skills/file-pr/SKILL.md +50 -0
  128. package/tstack/skills/full-send/SKILL.md +123 -0
  129. package/tstack/skills/full-send/agents/openai.yaml +4 -0
  130. package/tstack/skills/full-stop/SKILL.md +47 -0
  131. package/tstack/skills/full-stop/agents/openai.yaml +4 -0
  132. package/tstack/skills/leaving-pr-comments/SKILL.md +44 -0
  133. package/tstack/skills/leaving-pr-comments/agents/openai.yaml +4 -0
  134. package/tstack/skills/modernize/SKILL.md +102 -0
  135. package/tstack/skills/modernize/agents/openai.yaml +4 -0
  136. package/tstack/skills/sol-loop/SKILL.md +119 -0
  137. package/tstack/skills/takeover/SKILL.md +42 -0
  138. package/tstack.ts +21 -0
@@ -0,0 +1,21 @@
1
+ import { Argument } from './lib/argument.js';
2
+ import { Command } from './lib/command.js';
3
+ import { CommanderError, InvalidArgumentError } from './lib/error.js';
4
+ import { Help } from './lib/help.js';
5
+ import { Option } from './lib/option.js';
6
+
7
+ export const program = new Command();
8
+
9
+ export const createCommand = (name) => new Command(name);
10
+ export const createOption = (flags, description) =>
11
+ new Option(flags, description);
12
+ export const createArgument = (name, description) =>
13
+ new Argument(name, description);
14
+
15
+ /**
16
+ * Expose classes
17
+ */
18
+
19
+ export { Command, Option, Argument, Help };
20
+ export { CommanderError, InvalidArgumentError };
21
+ export { InvalidArgumentError as InvalidOptionArgumentError }; // Deprecated
@@ -0,0 +1,147 @@
1
+ import { InvalidArgumentError } from './error.js';
2
+
3
+ export class Argument {
4
+ /**
5
+ * Initialize a new command argument with the given name and description.
6
+ * The default is that the argument is required, and you can explicitly
7
+ * indicate this with <> around the name. Put [] around the name for an optional argument.
8
+ *
9
+ * @param {string} name
10
+ * @param {string} [description]
11
+ */
12
+
13
+ constructor(name, description) {
14
+ this.description = description || '';
15
+ this.variadic = false;
16
+ this.parseArg = undefined;
17
+ this.defaultValue = undefined;
18
+ this.defaultValueDescription = undefined;
19
+ this.argChoices = undefined;
20
+
21
+ switch (name[0]) {
22
+ case '<': // e.g. <required>
23
+ this.required = true;
24
+ this._name = name.slice(1, -1);
25
+ break;
26
+ case '[': // e.g. [optional]
27
+ this.required = false;
28
+ this._name = name.slice(1, -1);
29
+ break;
30
+ default:
31
+ this.required = true;
32
+ this._name = name;
33
+ break;
34
+ }
35
+
36
+ if (this._name.endsWith('...')) {
37
+ this.variadic = true;
38
+ this._name = this._name.slice(0, -3);
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Return argument name.
44
+ *
45
+ * @return {string}
46
+ */
47
+
48
+ name() {
49
+ return this._name;
50
+ }
51
+
52
+ /**
53
+ * @package
54
+ */
55
+
56
+ _collectValue(value, previous) {
57
+ if (previous === this.defaultValue || !Array.isArray(previous)) {
58
+ return [value];
59
+ }
60
+
61
+ previous.push(value);
62
+ return previous;
63
+ }
64
+
65
+ /**
66
+ * Set the default value, and optionally supply the description to be displayed in the help.
67
+ *
68
+ * @param {*} value
69
+ * @param {string} [description]
70
+ * @return {Argument}
71
+ */
72
+
73
+ default(value, description) {
74
+ this.defaultValue = value;
75
+ this.defaultValueDescription = description;
76
+ return this;
77
+ }
78
+
79
+ /**
80
+ * Set the custom handler for processing CLI command arguments into argument values.
81
+ *
82
+ * @param {Function} [fn]
83
+ * @return {Argument}
84
+ */
85
+
86
+ argParser(fn) {
87
+ this.parseArg = fn;
88
+ return this;
89
+ }
90
+
91
+ /**
92
+ * Only allow argument value to be one of choices.
93
+ *
94
+ * @param {string[]} values
95
+ * @return {Argument}
96
+ */
97
+
98
+ choices(values) {
99
+ this.argChoices = values.slice();
100
+ this.parseArg = (arg, previous) => {
101
+ if (!this.argChoices.includes(arg)) {
102
+ throw new InvalidArgumentError(
103
+ `Allowed choices are ${this.argChoices.join(', ')}.`,
104
+ );
105
+ }
106
+ if (this.variadic) {
107
+ return this._collectValue(arg, previous);
108
+ }
109
+ return arg;
110
+ };
111
+ return this;
112
+ }
113
+
114
+ /**
115
+ * Make argument required.
116
+ *
117
+ * @returns {Argument}
118
+ */
119
+ argRequired() {
120
+ this.required = true;
121
+ return this;
122
+ }
123
+
124
+ /**
125
+ * Make argument optional.
126
+ *
127
+ * @returns {Argument}
128
+ */
129
+ argOptional() {
130
+ this.required = false;
131
+ return this;
132
+ }
133
+ }
134
+
135
+ /**
136
+ * Takes an argument and returns its human readable equivalent for help usage.
137
+ *
138
+ * @param {Argument} arg
139
+ * @return {string}
140
+ * @private
141
+ */
142
+
143
+ export function humanReadableArgName(arg) {
144
+ const nameOutput = arg.name() + (arg.variadic === true ? '...' : '');
145
+
146
+ return arg.required ? '<' + nameOutput + '>' : '[' + nameOutput + ']';
147
+ }