opencode-writer-swarm 1.2.0 → 1.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.
@@ -35,6 +35,7 @@ export type GuardrailsConfig = z.infer<typeof GuardrailsConfigSchema>;
35
35
  export declare const HooksConfigSchema: z.ZodObject<{
36
36
  pre_agent: z.ZodOptional<z.ZodString>;
37
37
  post_agent: z.ZodOptional<z.ZodString>;
38
+ compaction: z.ZodDefault<z.ZodBoolean>;
38
39
  }, z.core.$strip>;
39
40
  export type HooksConfig = z.infer<typeof HooksConfigSchema>;
40
41
  export declare const PluginConfigSchema: z.ZodObject<{
@@ -70,6 +71,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
70
71
  hooks: z.ZodOptional<z.ZodObject<{
71
72
  pre_agent: z.ZodOptional<z.ZodString>;
72
73
  post_agent: z.ZodOptional<z.ZodString>;
74
+ compaction: z.ZodDefault<z.ZodBoolean>;
73
75
  }, z.core.$strip>>;
74
76
  qa_retry_limit: z.ZodDefault<z.ZodNumber>;
75
77
  file_retry_enabled: z.ZodDefault<z.ZodBoolean>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Compaction Customizer Hook
3
+ *
4
+ * Enhances session compaction by injecting swarm context from plan.md and context.md.
5
+ * Adds current phase information and key decisions to the compaction context.
6
+ */
7
+ import type { PluginConfig } from '../config';
8
+ /**
9
+ * Creates the experimental.session.compacting hook for compaction customization.
10
+ */
11
+ export declare function createCompactionCustomizerHook(config: PluginConfig, directory: string): Record<string, unknown>;
@@ -18,6 +18,10 @@ export declare function extractCurrentPhase(planContent: string): string | null;
18
18
  * Extracts incomplete tasks (phases) from plan content.
19
19
  */
20
20
  export declare function extractIncompleteTasks(planContent: string, maxChars?: number): string | null;
21
+ /**
22
+ * Extracts patterns section from context content.
23
+ */
24
+ export declare function extractPatterns(contextContent: string, maxChars?: number): string | null;
21
25
  /**
22
26
  * Extracts decisions section from context content.
23
27
  */
@@ -2,4 +2,5 @@ import { safeHook, composeHandlers } from './utils';
2
2
  import { createSystemEnhancerHook } from './system-enhancer';
3
3
  import { createDelegationTrackerHook } from './delegation-tracker';
4
4
  import { createContextBudgetHook } from './context-budget';
5
- export { safeHook, composeHandlers, createSystemEnhancerHook, createDelegationTrackerHook, createContextBudgetHook, };
5
+ import { createCompactionCustomizerHook } from './compaction-customizer';
6
+ export { safeHook, composeHandlers, createSystemEnhancerHook, createDelegationTrackerHook, createContextBudgetHook, createCompactionCustomizerHook, };