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.
- package/overlay/overlay.json +118 -0
- package/package.json +14 -6
- package/pstack/skills/architect/SKILL.md +1 -1
- package/pstack/skills/arena/SKILL.md +1 -1
- package/pstack/skills/how/SKILL.md +1 -1
- package/pstack/skills/interrogate/SKILL.md +1 -1
- package/pstack/skills/poteto-help/SKILL.md +1 -1
- package/pstack/skills/poteto-mode/SKILL.md +4 -4
- package/pstack/skills/poteto-mode/brief.md +4 -4
- package/pstack/skills/poteto-mode/playbooks/autopilot-full.md +1 -1
- package/pstack/skills/poteto-mode/playbooks/orchestrate.md +1 -1
- package/pstack/skills/poteto-mode/scripts/node_modules/commander/LICENSE +22 -0
- package/pstack/skills/poteto-mode/scripts/node_modules/commander/Readme.md +1172 -0
- package/pstack/skills/poteto-mode/scripts/node_modules/commander/index.js +21 -0
- package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/argument.js +147 -0
- package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/command.js +2790 -0
- package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/error.js +36 -0
- package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/help.js +731 -0
- package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/option.js +377 -0
- package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/suggestSimilar.js +99 -0
- package/pstack/skills/poteto-mode/scripts/node_modules/commander/package-support.json +19 -0
- package/pstack/skills/poteto-mode/scripts/node_modules/commander/package.json +64 -0
- package/pstack/skills/poteto-mode/scripts/node_modules/commander/typings/index.d.ts +1113 -0
- package/pstack/skills/reflect/SKILL.md +1 -1
- package/pstack/skills/setup-pstack/SKILL.md +3 -3
- package/pstack/skills/statechart/scripts/node_modules/.package-lock.json +46 -0
- package/pstack/skills/statechart/scripts/node_modules/fast-check/LICENSE +21 -0
- package/pstack/skills/statechart/scripts/node_modules/fast-check/README.md +263 -0
- package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/cjs/fast-check.d.ts +5165 -0
- package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/cjs/fast-check.js +12147 -0
- package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/cjs/package.json +3 -0
- package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/cjs/types57/fast-check.d.ts +5165 -0
- package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/fast-check.d.ts +5165 -0
- package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/fast-check.js +12011 -0
- package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/rolldown-runtime-D7D4PA-g.js +13 -0
- package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/types57/fast-check.d.ts +5165 -0
- package/pstack/skills/statechart/scripts/node_modules/fast-check/package.json +94 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/LICENSE +21 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/README.md +168 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/RandomGenerator-DcXj09Ch.d.ts +14 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformBigInt.d.ts +15 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformBigInt.js +38 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformFloat32.d.ts +15 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformFloat32.js +18 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformFloat64.d.ts +15 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformFloat64.js +22 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformInt.d.ts +15 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformInt.js +134 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/RandomGenerator-DcXj09Ch.d.ts +14 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformBigInt.d.ts +15 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformBigInt.js +37 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformFloat32.d.ts +15 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformFloat32.js +17 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformFloat64.d.ts +15 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformFloat64.js +21 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformInt.d.ts +15 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformInt.js +133 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/congruential32.d.ts +7 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/congruential32.js +44 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/mersenne.d.ts +7 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/mersenne.js +90 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/xoroshiro128plus.d.ts +7 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/xoroshiro128plus.js +80 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/xorshift128plus.d.ts +7 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/xorshift128plus.js +78 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/package.json +3 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/types/JumpableRandomGenerator.d.ts +16 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/types/JumpableRandomGenerator.js +0 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/types/RandomGenerator.d.ts +2 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/types/RandomGenerator.js +0 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/generateN.d.ts +6 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/generateN.js +8 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/purify.d.ts +12 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/purify.js +9 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/skipN.d.ts +6 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/skipN.js +6 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/congruential32.d.ts +7 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/congruential32.js +46 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/mersenne.d.ts +7 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/mersenne.js +92 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/xoroshiro128plus.d.ts +7 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/xoroshiro128plus.js +82 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/xorshift128plus.d.ts +7 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/xorshift128plus.js +80 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/types/JumpableRandomGenerator.d.ts +16 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/types/JumpableRandomGenerator.js +0 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/types/RandomGenerator.d.ts +2 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/types/RandomGenerator.js +0 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/generateN.d.ts +6 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/generateN.js +9 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/purify.d.ts +12 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/purify.js +10 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/skipN.d.ts +6 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/skipN.js +7 -0
- package/pstack/skills/statechart/scripts/node_modules/pure-rand/package.json +133 -0
- package/pstack/skills/statechart/scripts/run.ts +1 -1
- package/pstack/skills/swarm/SKILL.md +1 -1
- package/pstack/skills/why/SKILL.md +1 -1
- package/src/bridge/accounts.ts +2 -2
- package/src/bridge/ask.ts +2 -2
- package/src/bridge/bash-timeout.ts +1 -1
- package/src/bridge/bridge-trim.ts +16 -21
- package/src/bridge/config.ts +2 -2
- package/src/bridge/plan.ts +1 -1
- package/src/bridge/resume.ts +2 -2
- package/src/bridge/state.ts +2 -2
- package/src/bridge/steer-judge.ts +2 -2
- package/src/bridge/steer-transcript.ts +1 -1
- package/src/bridge/steer.ts +1 -1
- package/src/bridge/t3-json.ts +2 -2
- package/src/bridge/tasks.ts +2 -2
- package/src/bridge/thread.ts +1 -1
- package/src/bridge/transcript.ts +2 -2
- package/src/pstack/brief.ts +1 -1
- package/src/pstack/child.ts +1 -1
- package/src/pstack/models.ts +2 -2
- package/src/pstack/overlay.ts +251 -0
- package/src/pstack/resources.ts +16 -2
- package/src/pstack/results.ts +1 -1
- package/src/pstack/sandbox.ts +1 -1
- package/src/pstack/session.ts +4 -24
- package/tstack/LICENSE +21 -0
- package/tstack/README.md +53 -0
- package/tstack/skills/babysit-pr/SKILL.md +117 -0
- package/tstack/skills/babysit-pr/scripts/pr-wait +556 -0
- package/tstack/skills/council/SKILL.md +56 -0
- package/tstack/skills/file-pr/SKILL.md +50 -0
- package/tstack/skills/full-send/SKILL.md +123 -0
- package/tstack/skills/full-send/agents/openai.yaml +4 -0
- package/tstack/skills/full-stop/SKILL.md +47 -0
- package/tstack/skills/full-stop/agents/openai.yaml +4 -0
- package/tstack/skills/leaving-pr-comments/SKILL.md +44 -0
- package/tstack/skills/leaving-pr-comments/agents/openai.yaml +4 -0
- package/tstack/skills/modernize/SKILL.md +102 -0
- package/tstack/skills/modernize/agents/openai.yaml +4 -0
- package/tstack/skills/sol-loop/SKILL.md +119 -0
- package/tstack/skills/takeover/SKILL.md +42 -0
- 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
|
+
}
|