@selesai/code 0.3.4 → 0.3.7
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/dist/extensions/package.json +0 -1
- package/dist/extensions/pi-subagents/agents/builder.md +1 -1
- package/dist/extensions/pi-subagents/agents/researcher.md +2 -0
- package/dist/extensions/tokenin-onboarding.ts +12 -0
- package/dist/extensions/workflow/state-machine.ts +3 -1
- package/package.json +1 -1
|
@@ -439,6 +439,18 @@ export default function tokenInOnboardingExtension(pi: ExtensionAPI): void {
|
|
|
439
439
|
|
|
440
440
|
pi.registerCommand("tokenin", {
|
|
441
441
|
description: "Manage TokenIN accounts: /tokenin add|switch|remove",
|
|
442
|
+
getArgumentCompletions: (prefix: string) => {
|
|
443
|
+
const subcommands = [
|
|
444
|
+
{ name: "add", description: "Add a TokenIN account" },
|
|
445
|
+
{ name: "switch", description: "Switch active account" },
|
|
446
|
+
{ name: "remove", description: "Remove a saved account" },
|
|
447
|
+
];
|
|
448
|
+
const lowerPrefix = prefix.toLowerCase();
|
|
449
|
+
const items = subcommands.filter((s) => s.name.toLowerCase().startsWith(lowerPrefix));
|
|
450
|
+
return items.length > 0
|
|
451
|
+
? items.map((s) => ({ value: s.name, label: s.name, description: s.description }))
|
|
452
|
+
: null;
|
|
453
|
+
},
|
|
442
454
|
handler: async (args: string, ctx: ExtensionCommandContext) => {
|
|
443
455
|
await ctx.waitForIdle();
|
|
444
456
|
const sub = args.trim().split(/\s+/)[0];
|
|
@@ -441,7 +441,9 @@ export class WorkflowStateMachine {
|
|
|
441
441
|
const sat = await this.artifactSatisfiedFor(this.phase, deps);
|
|
442
442
|
if (!sat.exists) return { kind: "noOp" };
|
|
443
443
|
if (sat.reason) {
|
|
444
|
-
|
|
444
|
+
// Keep armed: the artifact exists but failed the semantic gate. The
|
|
445
|
+
// next corrected write/subagent result must be able to advance this
|
|
446
|
+
// same phase; disarming here leaves the workflow stuck forever.
|
|
445
447
|
const missing = this.config.phaseArtifacts[this.phase]!;
|
|
446
448
|
return { kind: "blocked", phase: this.phase, missing, reason: sat.reason };
|
|
447
449
|
}
|