@frenchtoastman/oh-my-groundcontrol 0.0.15 → 0.0.16

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/cli/index.js CHANGED
@@ -13769,6 +13769,9 @@ var SessionExportConfigSchema = exports_external.object({
13769
13769
  var HashlineEditConfigSchema = exports_external.object({
13770
13770
  enabled: exports_external.boolean().default(true)
13771
13771
  });
13772
+ var DoubleConfirmationConfigSchema = exports_external.object({
13773
+ enabled: exports_external.boolean().default(false)
13774
+ });
13772
13775
  var PluginConfigSchema = exports_external.object({
13773
13776
  preset: exports_external.string().optional(),
13774
13777
  scoringEngineVersion: exports_external.enum(["v1", "v2-shadow", "v2"]).optional(),
@@ -13782,7 +13785,8 @@ var PluginConfigSchema = exports_external.object({
13782
13785
  fallback: FailoverConfigSchema.optional(),
13783
13786
  allowedProviders: exports_external.array(exports_external.string()).optional(),
13784
13787
  sessionExport: SessionExportConfigSchema.optional(),
13785
- hashline_edit: HashlineEditConfigSchema.optional()
13788
+ hashline_edit: HashlineEditConfigSchema.optional(),
13789
+ double_confirmation: DoubleConfirmationConfigSchema.optional()
13786
13790
  });
13787
13791
  // src/config/agent-mcps.ts
13788
13792
  var DEFAULT_AGENT_MCPS = {
@@ -161,6 +161,10 @@ export declare const HashlineEditConfigSchema: z.ZodObject<{
161
161
  enabled: z.ZodDefault<z.ZodBoolean>;
162
162
  }, z.core.$strip>;
163
163
  export type HashlineEditConfig = z.infer<typeof HashlineEditConfigSchema>;
164
+ export declare const DoubleConfirmationConfigSchema: z.ZodObject<{
165
+ enabled: z.ZodDefault<z.ZodBoolean>;
166
+ }, z.core.$strip>;
167
+ export type DoubleConfirmationConfig = z.infer<typeof DoubleConfirmationConfigSchema>;
164
168
  export declare const PluginConfigSchema: z.ZodObject<{
165
169
  preset: z.ZodOptional<z.ZodString>;
166
170
  scoringEngineVersion: z.ZodOptional<z.ZodEnum<{
@@ -291,6 +295,9 @@ export declare const PluginConfigSchema: z.ZodObject<{
291
295
  hashline_edit: z.ZodOptional<z.ZodObject<{
292
296
  enabled: z.ZodDefault<z.ZodBoolean>;
293
297
  }, z.core.$strip>>;
298
+ double_confirmation: z.ZodOptional<z.ZodObject<{
299
+ enabled: z.ZodDefault<z.ZodBoolean>;
300
+ }, z.core.$strip>>;
294
301
  }, z.core.$strip>;
295
302
  export type PluginConfig = z.infer<typeof PluginConfigSchema>;
296
303
  export type { AgentName } from './constants';
@@ -0,0 +1,24 @@
1
+ import type { DoubleConfirmationConfig } from '../../config/schema';
2
+ interface ToolExecuteAfterInput {
3
+ tool: string;
4
+ sessionID?: string;
5
+ callID?: string;
6
+ }
7
+ interface ToolExecuteAfterOutput {
8
+ title: string;
9
+ output: unknown;
10
+ metadata: unknown;
11
+ }
12
+ /**
13
+ * Creates the double-confirmation hook.
14
+ *
15
+ * Meta-Harness principle: prevent premature task completion by
16
+ * appending a verification nudge when background/delegated tasks
17
+ * return results. Only fires once per unique call (tracked by callID).
18
+ *
19
+ * Ships disabled by default — enable via config.double_confirmation.enabled.
20
+ */
21
+ export declare function createDoubleConfirmationHook(config?: DoubleConfirmationConfig): {
22
+ 'tool.execute.after': (input: ToolExecuteAfterInput, output: ToolExecuteAfterOutput) => Promise<void>;
23
+ };
24
+ export {};
@@ -1,6 +1,7 @@
1
1
  export type { AutoUpdateCheckerOptions } from './auto-update-checker';
2
2
  export { createAutoUpdateCheckerHook } from './auto-update-checker';
3
3
  export { createDelegateTaskRetryHook } from './delegate-task-retry';
4
+ export { createDoubleConfirmationHook } from './double-confirmation';
4
5
  export { createEditErrorRecoveryHook } from './edit-error-recovery';
5
6
  export { createHashlineReadEnhancerHook } from './hashline-read-enhancer';
6
7
  export { createJsonErrorRecoveryHook } from './json-error-recovery';
package/dist/index.js CHANGED
@@ -17101,6 +17101,9 @@ var SessionExportConfigSchema = exports_external.object({
17101
17101
  var HashlineEditConfigSchema = exports_external.object({
17102
17102
  enabled: exports_external.boolean().default(true)
17103
17103
  });
17104
+ var DoubleConfirmationConfigSchema = exports_external.object({
17105
+ enabled: exports_external.boolean().default(false)
17106
+ });
17104
17107
  var PluginConfigSchema = exports_external.object({
17105
17108
  preset: exports_external.string().optional(),
17106
17109
  scoringEngineVersion: exports_external.enum(["v1", "v2-shadow", "v2"]).optional(),
@@ -17114,7 +17117,8 @@ var PluginConfigSchema = exports_external.object({
17114
17117
  fallback: FailoverConfigSchema.optional(),
17115
17118
  allowedProviders: exports_external.array(exports_external.string()).optional(),
17116
17119
  sessionExport: SessionExportConfigSchema.optional(),
17117
- hashline_edit: HashlineEditConfigSchema.optional()
17120
+ hashline_edit: HashlineEditConfigSchema.optional(),
17121
+ double_confirmation: DoubleConfirmationConfigSchema.optional()
17118
17122
  });
17119
17123
 
17120
17124
  // src/config/loader.ts
@@ -22745,6 +22749,34 @@ ${buildRetryGuidance(detected)}`;
22745
22749
  }
22746
22750
  };
22747
22751
  }
22752
+ // src/hooks/double-confirmation/index.ts
22753
+ var CONFIRMATION_TOOLS = new Set(["background_task", "task"]);
22754
+ var CONFIRMATION_NUDGE = `
22755
+
22756
+ ---
22757
+ [Verification Required] Before accepting this result, confirm:
22758
+ - Does the result fully address the original request?
22759
+ - Are there any loose ends or incomplete aspects?
22760
+ - Would you request any changes if reviewing this?
22761
+ If satisfied, proceed. If not, re-examine the result.`;
22762
+ function createDoubleConfirmationHook(config2) {
22763
+ const enabled = config2?.enabled ?? false;
22764
+ const confirmedCalls = new Set;
22765
+ return {
22766
+ "tool.execute.after": async (input, output) => {
22767
+ if (!enabled)
22768
+ return;
22769
+ if (!CONFIRMATION_TOOLS.has(input.tool))
22770
+ return;
22771
+ const callKey = input.callID ?? input.sessionID ?? "";
22772
+ if (!callKey || confirmedCalls.has(callKey))
22773
+ return;
22774
+ confirmedCalls.add(callKey);
22775
+ const outputStr = String(output.output ?? "");
22776
+ output.output = outputStr + CONFIRMATION_NUDGE;
22777
+ }
22778
+ };
22779
+ }
22748
22780
  // src/hooks/edit-error-recovery/index.ts
22749
22781
  var EDIT_ERROR_PATTERNS = [
22750
22782
  "oldString and newString must be different",
@@ -22950,7 +22982,9 @@ ${JSON_ERROR_REMINDER}`;
22950
22982
  }
22951
22983
  // src/hooks/phase-reminder/index.ts
22952
22984
  var PHASE_REMINDER = `<reminder>Recall Workflow Rules:
22953
- Understand \u2192 find the best path (delegate based on rules and parallelize independent work) \u2192 execute \u2192 verify.
22985
+ Before acting: <think> \u2014 analyze what you see, what's been accomplished, what still needs to be done.
22986
+ Before executing: <plan> \u2014 describe your next steps and what you expect each to accomplish.
22987
+ Then: execute your plan, verify results, delegate based on rules, parallelize independent work.
22954
22988
  If delegating, launch the specialist in the same turn you mention it.</reminder>`;
22955
22989
  function createPhaseReminderHook() {
22956
22990
  return {
@@ -39159,6 +39193,7 @@ var OhMyOpenCodeLite = async (ctx) => {
39159
39193
  const jsonErrorRecoveryHook = createJsonErrorRecoveryHook(ctx);
39160
39194
  const hashlineReadEnhancerHook = createHashlineReadEnhancerHook(config3.hashline_edit);
39161
39195
  const editErrorRecoveryHook = createEditErrorRecoveryHook();
39196
+ const doubleConfirmationHook = createDoubleConfirmationHook(config3.double_confirmation);
39162
39197
  const hashlineEditEnabled = config3.hashline_edit?.enabled !== false;
39163
39198
  const hashlineEditTool = hashlineEditEnabled ? createHashlineEditTool() : undefined;
39164
39199
  return {
@@ -39268,6 +39303,7 @@ var OhMyOpenCodeLite = async (ctx) => {
39268
39303
  await editErrorRecoveryHook["tool.execute.after"](input, output);
39269
39304
  await hashlineReadEnhancerHook["tool.execute.after"](input, output);
39270
39305
  await postReadNudgeHook["tool.execute.after"](input, output);
39306
+ await doubleConfirmationHook["tool.execute.after"](input, output);
39271
39307
  }
39272
39308
  };
39273
39309
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frenchtoastman/oh-my-groundcontrol",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "An OpenCode plugin for multi-agent orchestration for structured planning with NASA-style guardrails.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",