opencode-windows-scheduler 1.4.0 → 1.5.0
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/CHANGELOG.md +24 -0
- package/README.md +2 -2
- package/ROADMAP-STRATEGY.md +43 -24
- package/ROADMAP.md +280 -31
- package/dist/core/dry-run.d.ts +31 -0
- package/dist/core/dry-run.d.ts.map +1 -1
- package/dist/core/dry-run.js +129 -1
- package/dist/core/file-watcher.d.ts.map +1 -1
- package/dist/core/file-watcher.js +53 -10
- package/dist/core/git-trigger.d.ts +80 -0
- package/dist/core/git-trigger.d.ts.map +1 -0
- package/dist/core/git-trigger.js +288 -0
- package/dist/core/glob.d.ts +38 -0
- package/dist/core/glob.d.ts.map +1 -0
- package/dist/core/glob.js +233 -0
- package/dist/core/ps-wrapper.d.ts.map +1 -1
- package/dist/core/ps-wrapper.js +7 -0
- package/dist/core/schedule-gate.js +55 -30
- package/dist/core/schedule-v2.d.ts +29 -1
- package/dist/core/schedule-v2.d.ts.map +1 -1
- package/dist/core/schedule-v2.js +81 -3
- package/dist/core/scheduler/types.d.ts +1 -1
- package/dist/core/scheduler/types.d.ts.map +1 -1
- package/dist/core/wrappers/bash.d.ts.map +1 -1
- package/dist/core/wrappers/bash.js +4 -0
- package/dist/db/git-state-repo.d.ts +16 -0
- package/dist/db/git-state-repo.d.ts.map +1 -0
- package/dist/db/git-state-repo.js +38 -0
- package/dist/db/schema.d.ts +1 -1
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/db/schema.js +8 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +247 -26
- package/dist/rpc.d.ts +223 -0
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +73 -0
- package/dist/task-transfer.d.ts +30 -3
- package/dist/task-transfer.d.ts.map +1 -1
- package/dist/task-transfer.js +83 -6
- package/dist/templates.d.ts +1 -1
- package/dist/templates.d.ts.map +1 -1
- package/docs/ARCHITECTURE.md +1 -0
- package/docs/FEATURES.md +51 -0
- package/docs/README.ru.md +2 -2
- package/gui-experimental.cjs +9 -4
- package/package.json +6 -3
- package/src/core/dry-run.ts +188 -1
- package/src/core/file-watcher.ts +65 -10
- package/src/core/git-trigger.ts +367 -0
- package/src/core/glob.ts +226 -0
- package/src/core/ps-wrapper.ts +7 -0
- package/src/core/schedule-gate.ts +67 -33
- package/src/core/schedule-v2.ts +108 -3
- package/src/core/scheduler/types.ts +1 -1
- package/src/core/wrappers/bash.ts +4 -0
- package/src/db/git-state-repo.ts +62 -0
- package/src/db/schema.ts +8 -0
- package/src/gui.tsx +225 -4
- package/src/index.ts +338 -28
- package/src/rpc.ts +73 -0
- package/src/task-transfer.ts +124 -5
- package/src/templates.ts +1 -1
package/dist/rpc.d.ts
CHANGED
|
@@ -126,6 +126,53 @@ export declare const SchedulerRpc: {
|
|
|
126
126
|
readonly notAfter: {
|
|
127
127
|
readonly type: readonly ["string", "null"];
|
|
128
128
|
};
|
|
129
|
+
/** Спринт 27: разрешённые дни недели 0=Вс..6=Сб (null — все дни). */
|
|
130
|
+
readonly activeDays: {
|
|
131
|
+
readonly type: readonly ["array", "null"];
|
|
132
|
+
readonly items: {
|
|
133
|
+
readonly type: "number";
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
/** Поведение вне окна: skip, postpone или run (null — postpone). */
|
|
137
|
+
readonly windowPolicy: {
|
|
138
|
+
readonly type: readonly ["string", "null"];
|
|
139
|
+
};
|
|
140
|
+
/** Glob-маски файлового триггера (null — без ограничения). */
|
|
141
|
+
readonly watchGlobs: {
|
|
142
|
+
readonly type: readonly ["array", "null"];
|
|
143
|
+
readonly items: {
|
|
144
|
+
readonly type: "string";
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
/** Glob-маски исключений файлового триггера. */
|
|
148
|
+
readonly watchIgnore: {
|
|
149
|
+
readonly type: readonly ["array", "null"];
|
|
150
|
+
readonly items: {
|
|
151
|
+
readonly type: "string";
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
/** Git-триггер: фильтр ветки (glob, через запятую). */
|
|
155
|
+
readonly gitBranch: {
|
|
156
|
+
readonly type: readonly ["string", "null"];
|
|
157
|
+
};
|
|
158
|
+
/** Git-триггер: маски путей, изменения в которых запускают задачу. */
|
|
159
|
+
readonly gitPaths: {
|
|
160
|
+
readonly type: readonly ["array", "null"];
|
|
161
|
+
readonly items: {
|
|
162
|
+
readonly type: "string";
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
/** Git-триггер: маски игнорируемых путей. */
|
|
166
|
+
readonly gitIgnore: {
|
|
167
|
+
readonly type: readonly ["array", "null"];
|
|
168
|
+
readonly items: {
|
|
169
|
+
readonly type: "string";
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
/** Git-триггер: период опроса в секундах (null — 60). */
|
|
173
|
+
readonly gitPollSeconds: {
|
|
174
|
+
readonly type: readonly ["number", "null"];
|
|
175
|
+
};
|
|
129
176
|
/** Пауза до даты в ISO (null — автопродолжение не запланировано). */
|
|
130
177
|
readonly pausedUntil: {
|
|
131
178
|
readonly type: readonly ["string", "null"];
|
|
@@ -460,6 +507,53 @@ export declare const SchedulerRpc: {
|
|
|
460
507
|
readonly notAfter: {
|
|
461
508
|
readonly type: "string";
|
|
462
509
|
};
|
|
510
|
+
/** Спринт 27: разрешённые дни недели 0=Вс..6=Сб. Пусто — все дни. */
|
|
511
|
+
readonly activeDays: {
|
|
512
|
+
readonly type: "array";
|
|
513
|
+
readonly items: {
|
|
514
|
+
readonly type: "number";
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
/** Поведение вне окна/дня: postpone (по умолчанию), skip или run. */
|
|
518
|
+
readonly windowPolicy: {
|
|
519
|
+
readonly type: "string";
|
|
520
|
+
};
|
|
521
|
+
/** Glob-маски файлового триггера (например, src/** и *.md). */
|
|
522
|
+
readonly watchGlobs: {
|
|
523
|
+
readonly type: "array";
|
|
524
|
+
readonly items: {
|
|
525
|
+
readonly type: "string";
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
/** Glob-маски исключений файлового триггера. */
|
|
529
|
+
readonly watchIgnore: {
|
|
530
|
+
readonly type: "array";
|
|
531
|
+
readonly items: {
|
|
532
|
+
readonly type: "string";
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
/** Git-триггер: ветка или glob (main, release/*), через запятую. */
|
|
536
|
+
readonly gitBranch: {
|
|
537
|
+
readonly type: "string";
|
|
538
|
+
};
|
|
539
|
+
/** Git-триггер: маски изменённых файлов, при которых задача запускается. */
|
|
540
|
+
readonly gitPaths: {
|
|
541
|
+
readonly type: "array";
|
|
542
|
+
readonly items: {
|
|
543
|
+
readonly type: "string";
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
/** Git-триггер: маски изменённых файлов, которые игнорируются. */
|
|
547
|
+
readonly gitIgnore: {
|
|
548
|
+
readonly type: "array";
|
|
549
|
+
readonly items: {
|
|
550
|
+
readonly type: "string";
|
|
551
|
+
};
|
|
552
|
+
};
|
|
553
|
+
/** Git-триггер: период опроса в секундах (минимум 5, по умолчанию 60). */
|
|
554
|
+
readonly gitPollSeconds: {
|
|
555
|
+
readonly type: "number";
|
|
556
|
+
};
|
|
463
557
|
};
|
|
464
558
|
readonly required: readonly ["name", "prompt"];
|
|
465
559
|
};
|
|
@@ -760,6 +854,53 @@ export declare const SchedulerRpc: {
|
|
|
760
854
|
readonly notAfter: {
|
|
761
855
|
readonly type: "string";
|
|
762
856
|
};
|
|
857
|
+
/** Спринт 27: дни недели 0=Вс..6=Сб. Пустой массив — снять ограничение. */
|
|
858
|
+
readonly activeDays: {
|
|
859
|
+
readonly type: "array";
|
|
860
|
+
readonly items: {
|
|
861
|
+
readonly type: "number";
|
|
862
|
+
};
|
|
863
|
+
};
|
|
864
|
+
/** Поведение вне окна: postpone (по умолчанию), skip или run. */
|
|
865
|
+
readonly windowPolicy: {
|
|
866
|
+
readonly type: "string";
|
|
867
|
+
};
|
|
868
|
+
/** Glob-маски файлового триггера. Пустой массив — снять ограничение. */
|
|
869
|
+
readonly watchGlobs: {
|
|
870
|
+
readonly type: "array";
|
|
871
|
+
readonly items: {
|
|
872
|
+
readonly type: "string";
|
|
873
|
+
};
|
|
874
|
+
};
|
|
875
|
+
/** Glob-маски исключений файлового триггера. Пустой массив — очистить. */
|
|
876
|
+
readonly watchIgnore: {
|
|
877
|
+
readonly type: "array";
|
|
878
|
+
readonly items: {
|
|
879
|
+
readonly type: "string";
|
|
880
|
+
};
|
|
881
|
+
};
|
|
882
|
+
/** Git-триггер: фильтр ветки (glob, через запятую). Пустая строка — сбросить. */
|
|
883
|
+
readonly gitBranch: {
|
|
884
|
+
readonly type: "string";
|
|
885
|
+
};
|
|
886
|
+
/** Git-триггер: маски путей. Пустой массив — сбросить. */
|
|
887
|
+
readonly gitPaths: {
|
|
888
|
+
readonly type: "array";
|
|
889
|
+
readonly items: {
|
|
890
|
+
readonly type: "string";
|
|
891
|
+
};
|
|
892
|
+
};
|
|
893
|
+
/** Git-триггер: маски игнорируемых путей. Пустой массив — очистить. */
|
|
894
|
+
readonly gitIgnore: {
|
|
895
|
+
readonly type: "array";
|
|
896
|
+
readonly items: {
|
|
897
|
+
readonly type: "string";
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
/** Git-триггер: период опроса в секундах (минимум 5). */
|
|
901
|
+
readonly gitPollSeconds: {
|
|
902
|
+
readonly type: "number";
|
|
903
|
+
};
|
|
763
904
|
};
|
|
764
905
|
readonly required: readonly ["name"];
|
|
765
906
|
};
|
|
@@ -2660,6 +2801,47 @@ export declare const SchedulerRpc: {
|
|
|
2660
2801
|
readonly watchPath: {
|
|
2661
2802
|
readonly type: "string";
|
|
2662
2803
|
};
|
|
2804
|
+
/** Спринт 27: glob-маски и исключения файлового триггера. */
|
|
2805
|
+
readonly watchGlobs: {
|
|
2806
|
+
readonly type: "array";
|
|
2807
|
+
readonly items: {
|
|
2808
|
+
readonly type: "string";
|
|
2809
|
+
};
|
|
2810
|
+
};
|
|
2811
|
+
readonly watchIgnore: {
|
|
2812
|
+
readonly type: "array";
|
|
2813
|
+
readonly items: {
|
|
2814
|
+
readonly type: "string";
|
|
2815
|
+
};
|
|
2816
|
+
};
|
|
2817
|
+
/** Спринт 27: git-триггер и дни/политика окна. */
|
|
2818
|
+
readonly gitBranch: {
|
|
2819
|
+
readonly type: "string";
|
|
2820
|
+
};
|
|
2821
|
+
readonly gitPaths: {
|
|
2822
|
+
readonly type: "array";
|
|
2823
|
+
readonly items: {
|
|
2824
|
+
readonly type: "string";
|
|
2825
|
+
};
|
|
2826
|
+
};
|
|
2827
|
+
readonly gitIgnore: {
|
|
2828
|
+
readonly type: "array";
|
|
2829
|
+
readonly items: {
|
|
2830
|
+
readonly type: "string";
|
|
2831
|
+
};
|
|
2832
|
+
};
|
|
2833
|
+
readonly gitPollSeconds: {
|
|
2834
|
+
readonly type: "number";
|
|
2835
|
+
};
|
|
2836
|
+
readonly activeDays: {
|
|
2837
|
+
readonly type: "array";
|
|
2838
|
+
readonly items: {
|
|
2839
|
+
readonly type: "number";
|
|
2840
|
+
};
|
|
2841
|
+
};
|
|
2842
|
+
readonly windowPolicy: {
|
|
2843
|
+
readonly type: "string";
|
|
2844
|
+
};
|
|
2663
2845
|
readonly workspaceId: {
|
|
2664
2846
|
readonly type: "string";
|
|
2665
2847
|
};
|
|
@@ -2869,6 +3051,47 @@ export declare const SchedulerRpc: {
|
|
|
2869
3051
|
readonly watchPath: {
|
|
2870
3052
|
readonly type: "string";
|
|
2871
3053
|
};
|
|
3054
|
+
/** Спринт 27: glob-маски и исключения файлового триггера. */
|
|
3055
|
+
readonly watchGlobs: {
|
|
3056
|
+
readonly type: "array";
|
|
3057
|
+
readonly items: {
|
|
3058
|
+
readonly type: "string";
|
|
3059
|
+
};
|
|
3060
|
+
};
|
|
3061
|
+
readonly watchIgnore: {
|
|
3062
|
+
readonly type: "array";
|
|
3063
|
+
readonly items: {
|
|
3064
|
+
readonly type: "string";
|
|
3065
|
+
};
|
|
3066
|
+
};
|
|
3067
|
+
/** Спринт 27: git-триггер и дни/политика окна. */
|
|
3068
|
+
readonly gitBranch: {
|
|
3069
|
+
readonly type: "string";
|
|
3070
|
+
};
|
|
3071
|
+
readonly gitPaths: {
|
|
3072
|
+
readonly type: "array";
|
|
3073
|
+
readonly items: {
|
|
3074
|
+
readonly type: "string";
|
|
3075
|
+
};
|
|
3076
|
+
};
|
|
3077
|
+
readonly gitIgnore: {
|
|
3078
|
+
readonly type: "array";
|
|
3079
|
+
readonly items: {
|
|
3080
|
+
readonly type: "string";
|
|
3081
|
+
};
|
|
3082
|
+
};
|
|
3083
|
+
readonly gitPollSeconds: {
|
|
3084
|
+
readonly type: "number";
|
|
3085
|
+
};
|
|
3086
|
+
readonly activeDays: {
|
|
3087
|
+
readonly type: "array";
|
|
3088
|
+
readonly items: {
|
|
3089
|
+
readonly type: "number";
|
|
3090
|
+
};
|
|
3091
|
+
};
|
|
3092
|
+
readonly windowPolicy: {
|
|
3093
|
+
readonly type: "string";
|
|
3094
|
+
};
|
|
2872
3095
|
readonly workspaceId: {
|
|
2873
3096
|
readonly type: "string";
|
|
2874
3097
|
};
|
package/dist/rpc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AA03CA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA7zCrB,+DAA+D;;;;gCAE/D,+CAA+C;;;;gCAE/C,oDAAoD;;;;gCAEpD,wDAAwD;;;;gCAExD,qDAAqD;;;;gCAErD,sCAAsC;;;;gCAEtC,qDAAqD;;;;gCAErD,+EAA+E;;;;;;;gCAE/E,2DAA2D;;;;gCAE3D,6CAA6C;;;;gCAE7C,8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;;;;;;;;;oBAO9B,+EAA+E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAS/E,uDAAuD;;;;;;;oBAEvD,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAjF1C,0BAA0B;;;;4BAE1B,8BAA8B;;;;;;;;;;;;;;;;;;;4BAO9B,+EAA+E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAO/E,6DAA6D;;;;;;;;;;;;;4BAG7D,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BASlD,qEAAqE;;;;;;;4BAErE,sEAAsE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAwQtE,8CAA8C;;;;oBAE9C,mEAAmE;;;;;;;;;;;;;;;;oBAWnE,4DAA4D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoW9D,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC"}
|
package/dist/rpc.js
CHANGED
|
@@ -97,6 +97,37 @@ const TaskItem = {
|
|
|
97
97
|
notBefore: { type: ["string", "null"] },
|
|
98
98
|
/** Конец окна запуска "HH:MM" (null — без окна). */
|
|
99
99
|
notAfter: { type: ["string", "null"] },
|
|
100
|
+
/** Спринт 27: разрешённые дни недели 0=Вс..6=Сб (null — все дни). */
|
|
101
|
+
activeDays: {
|
|
102
|
+
type: ["array", "null"],
|
|
103
|
+
items: { type: "number" },
|
|
104
|
+
},
|
|
105
|
+
/** Поведение вне окна: skip, postpone или run (null — postpone). */
|
|
106
|
+
windowPolicy: { type: ["string", "null"] },
|
|
107
|
+
/** Glob-маски файлового триггера (null — без ограничения). */
|
|
108
|
+
watchGlobs: {
|
|
109
|
+
type: ["array", "null"],
|
|
110
|
+
items: { type: "string" },
|
|
111
|
+
},
|
|
112
|
+
/** Glob-маски исключений файлового триггера. */
|
|
113
|
+
watchIgnore: {
|
|
114
|
+
type: ["array", "null"],
|
|
115
|
+
items: { type: "string" },
|
|
116
|
+
},
|
|
117
|
+
/** Git-триггер: фильтр ветки (glob, через запятую). */
|
|
118
|
+
gitBranch: { type: ["string", "null"] },
|
|
119
|
+
/** Git-триггер: маски путей, изменения в которых запускают задачу. */
|
|
120
|
+
gitPaths: {
|
|
121
|
+
type: ["array", "null"],
|
|
122
|
+
items: { type: "string" },
|
|
123
|
+
},
|
|
124
|
+
/** Git-триггер: маски игнорируемых путей. */
|
|
125
|
+
gitIgnore: {
|
|
126
|
+
type: ["array", "null"],
|
|
127
|
+
items: { type: "string" },
|
|
128
|
+
},
|
|
129
|
+
/** Git-триггер: период опроса в секундах (null — 60). */
|
|
130
|
+
gitPollSeconds: { type: ["number", "null"] },
|
|
100
131
|
/** Пауза до даты в ISO (null — автопродолжение не запланировано). */
|
|
101
132
|
pausedUntil: { type: ["string", "null"] },
|
|
102
133
|
/** Рабочая директория задачи (null — папка проекта по умолчанию). */
|
|
@@ -215,6 +246,22 @@ const CreateTaskInput = {
|
|
|
215
246
|
notBefore: { type: "string" },
|
|
216
247
|
/** Конец окна запуска "HH:MM"; может быть меньше notBefore (через полночь). */
|
|
217
248
|
notAfter: { type: "string" },
|
|
249
|
+
/** Спринт 27: разрешённые дни недели 0=Вс..6=Сб. Пусто — все дни. */
|
|
250
|
+
activeDays: { type: "array", items: { type: "number" } },
|
|
251
|
+
/** Поведение вне окна/дня: postpone (по умолчанию), skip или run. */
|
|
252
|
+
windowPolicy: { type: "string" },
|
|
253
|
+
/** Glob-маски файлового триггера (например, src/** и *.md). */
|
|
254
|
+
watchGlobs: { type: "array", items: { type: "string" } },
|
|
255
|
+
/** Glob-маски исключений файлового триггера. */
|
|
256
|
+
watchIgnore: { type: "array", items: { type: "string" } },
|
|
257
|
+
/** Git-триггер: ветка или glob (main, release/*), через запятую. */
|
|
258
|
+
gitBranch: { type: "string" },
|
|
259
|
+
/** Git-триггер: маски изменённых файлов, при которых задача запускается. */
|
|
260
|
+
gitPaths: { type: "array", items: { type: "string" } },
|
|
261
|
+
/** Git-триггер: маски изменённых файлов, которые игнорируются. */
|
|
262
|
+
gitIgnore: { type: "array", items: { type: "string" } },
|
|
263
|
+
/** Git-триггер: период опроса в секундах (минимум 5, по умолчанию 60). */
|
|
264
|
+
gitPollSeconds: { type: "number" },
|
|
218
265
|
},
|
|
219
266
|
required: ["name", "prompt"],
|
|
220
267
|
};
|
|
@@ -714,6 +761,16 @@ const TemplateItem = {
|
|
|
714
761
|
triggerType: { type: "string" },
|
|
715
762
|
mcpEvent: McpEventSchema,
|
|
716
763
|
watchPath: { type: "string" },
|
|
764
|
+
/** Спринт 27: glob-маски и исключения файлового триггера. */
|
|
765
|
+
watchGlobs: { type: "array", items: { type: "string" } },
|
|
766
|
+
watchIgnore: { type: "array", items: { type: "string" } },
|
|
767
|
+
/** Спринт 27: git-триггер и дни/политика окна. */
|
|
768
|
+
gitBranch: { type: "string" },
|
|
769
|
+
gitPaths: { type: "array", items: { type: "string" } },
|
|
770
|
+
gitIgnore: { type: "array", items: { type: "string" } },
|
|
771
|
+
gitPollSeconds: { type: "number" },
|
|
772
|
+
activeDays: { type: "array", items: { type: "number" } },
|
|
773
|
+
windowPolicy: { type: "string" },
|
|
717
774
|
workspaceId: { type: "string" },
|
|
718
775
|
workingDirectory: { type: "string" },
|
|
719
776
|
/** Белый список инструментов задачи (role-scoped, metadata-only). */
|
|
@@ -859,6 +916,22 @@ const UpdateTaskInput = {
|
|
|
859
916
|
notBefore: { type: "string" },
|
|
860
917
|
/** Конец окна запуска "HH:MM". Пустая строка — сбросить окно. */
|
|
861
918
|
notAfter: { type: "string" },
|
|
919
|
+
/** Спринт 27: дни недели 0=Вс..6=Сб. Пустой массив — снять ограничение. */
|
|
920
|
+
activeDays: { type: "array", items: { type: "number" } },
|
|
921
|
+
/** Поведение вне окна: postpone (по умолчанию), skip или run. */
|
|
922
|
+
windowPolicy: { type: "string" },
|
|
923
|
+
/** Glob-маски файлового триггера. Пустой массив — снять ограничение. */
|
|
924
|
+
watchGlobs: { type: "array", items: { type: "string" } },
|
|
925
|
+
/** Glob-маски исключений файлового триггера. Пустой массив — очистить. */
|
|
926
|
+
watchIgnore: { type: "array", items: { type: "string" } },
|
|
927
|
+
/** Git-триггер: фильтр ветки (glob, через запятую). Пустая строка — сбросить. */
|
|
928
|
+
gitBranch: { type: "string" },
|
|
929
|
+
/** Git-триггер: маски путей. Пустой массив — сбросить. */
|
|
930
|
+
gitPaths: { type: "array", items: { type: "string" } },
|
|
931
|
+
/** Git-триггер: маски игнорируемых путей. Пустой массив — очистить. */
|
|
932
|
+
gitIgnore: { type: "array", items: { type: "string" } },
|
|
933
|
+
/** Git-триггер: период опроса в секундах (минимум 5). */
|
|
934
|
+
gitPollSeconds: { type: "number" },
|
|
862
935
|
},
|
|
863
936
|
required: ["name"],
|
|
864
937
|
};
|
package/dist/task-transfer.d.ts
CHANGED
|
@@ -100,10 +100,11 @@ export interface TaskDefinition {
|
|
|
100
100
|
dependsOn?: string[];
|
|
101
101
|
/**
|
|
102
102
|
* Чем запускается задача: по расписанию ("cron", по умолчанию),
|
|
103
|
-
* при изменении файла ("file"), по
|
|
104
|
-
* однократно в runAt ("once").
|
|
103
|
+
* при изменении файла ("file"), по новому коммиту в git ("git"),
|
|
104
|
+
* по MCP-событию ("mcp-event") или однократно в runAt ("once").
|
|
105
|
+
* Для file/git/mcp-event/once расписание не нужно.
|
|
105
106
|
*/
|
|
106
|
-
triggerType?: "cron" | "file" | "mcp-event" | "once";
|
|
107
|
+
triggerType?: "cron" | "file" | "git" | "mcp-event" | "once";
|
|
107
108
|
/** Абсолютное время однократного запуска (ISO-8601, triggerType "once"). */
|
|
108
109
|
runAt?: string;
|
|
109
110
|
/**
|
|
@@ -155,6 +156,32 @@ export interface TaskDefinition {
|
|
|
155
156
|
notBefore?: string;
|
|
156
157
|
/** Конец окна запуска "HH:MM"; может быть меньше notBefore (через полночь). */
|
|
157
158
|
notAfter?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Разрешённые дни недели для окна и cron (Спринт 27): 0 = воскресенье … 6 = суббота.
|
|
161
|
+
* Пусто — все дни.
|
|
162
|
+
*/
|
|
163
|
+
activeDays?: number[];
|
|
164
|
+
/**
|
|
165
|
+
* Поведение вне окна запуска или в неразрешённый день (Спринт 27):
|
|
166
|
+
* "postpone" (по умолчанию) — ждать открытия окна, "skip" — пропустить,
|
|
167
|
+
* "run" — выполнить всё равно.
|
|
168
|
+
*/
|
|
169
|
+
windowPolicy?: "skip" | "postpone" | "run";
|
|
170
|
+
/**
|
|
171
|
+
* Git-триггер (Спринт 27): запускать при новых коммитах в рабочем каталоге.
|
|
172
|
+
* До первого запуска плагин запоминает текущий HEAD без запуска задачи.
|
|
173
|
+
*/
|
|
174
|
+
gitBranch?: string;
|
|
175
|
+
/** Glob-маски путей через запятую: запускать только при изменениях в них. */
|
|
176
|
+
gitPaths?: string[];
|
|
177
|
+
/** Glob-маски путей, изменения в которых не считаются триггером. */
|
|
178
|
+
gitIgnore?: string[];
|
|
179
|
+
/** Период опроса git, секунды (минимум 5, по умолчанию 60). */
|
|
180
|
+
gitPollSeconds?: number;
|
|
181
|
+
/** Glob-маски файлов для triggerType "file" (Спринт 27). */
|
|
182
|
+
watchGlobs?: string[];
|
|
183
|
+
/** Glob-маски игнорируемых файлов для triggerType "file". */
|
|
184
|
+
watchIgnore?: string[];
|
|
158
185
|
/** Пауза до даты (ISO, Спринт 19): плагин включит задачу автоматически. */
|
|
159
186
|
pausedUntil?: string;
|
|
160
187
|
/** Когда задача была создана — защита от ложного catch-up сразу после создания. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-transfer.d.ts","sourceRoot":"","sources":["../src/task-transfer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"task-transfer.d.ts","sourceRoot":"","sources":["../src/task-transfer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAcpD,6CAA6C;AAC7C,MAAM,WAAW,eAAe;IAC9B,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,uEAAuE;IACvE,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACrC,0DAA0D;IAC1D,WAAW,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAClC,yDAAyD;IACzD,WAAW,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IACrC,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;CACrD;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ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AAG,MAAM,GAAG,SAAS,CAGpE;AAED,4DAA4D;AAC5D,wBAAgB,aAAa,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC,CAErE;AAED,0FAA0F;AAC1F,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAElF;AAED,+CAA+C;AAC/C,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEtE;AAED,6DAA6D;AAC7D,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,iBAAiB,EAAE,GACzB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAgJ1C;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CA2ezD"}
|
package/dist/task-transfer.js
CHANGED
|
@@ -3,7 +3,7 @@ import path from "node:path";
|
|
|
3
3
|
import { PLUGIN_DIR, sanitizeName } from "./types.js";
|
|
4
4
|
import { listTasks, saveTask, deleteTask, } from "./db/tasks-repo.js";
|
|
5
5
|
import { normalizeOneShotRunAt } from "./core/one-shot.js";
|
|
6
|
-
import { isValidIanaTimeZone, validateLaunchWindow } from "./core/schedule-v2.js";
|
|
6
|
+
import { isValidIanaTimeZone, normalizeActiveDays, validateLaunchWindow, } from "./core/schedule-v2.js";
|
|
7
7
|
import { isValidSessionId } from "./core/session.js";
|
|
8
8
|
const PREFIX = "\\OpenCode\\windows-scheduler\\";
|
|
9
9
|
/** Приоритет по умолчанию — «Обычный». */
|
|
@@ -108,6 +108,7 @@ export async function buildExportJson(tasks) {
|
|
|
108
108
|
? { dependsOn: definition.dependsOn }
|
|
109
109
|
: {}),
|
|
110
110
|
...(definition?.triggerType === "file" ? { triggerType: "file" } : {}),
|
|
111
|
+
...(definition?.triggerType === "git" ? { triggerType: "git" } : {}),
|
|
111
112
|
...(definition?.triggerType === "mcp-event"
|
|
112
113
|
? { triggerType: "mcp-event" }
|
|
113
114
|
: {}),
|
|
@@ -131,6 +132,27 @@ export async function buildExportJson(tasks) {
|
|
|
131
132
|
...(definition?.timezone ? { timezone: definition.timezone } : {}),
|
|
132
133
|
...(definition?.notBefore ? { notBefore: definition.notBefore } : {}),
|
|
133
134
|
...(definition?.notAfter ? { notAfter: definition.notAfter } : {}),
|
|
135
|
+
// Спринт 27: дни недели, политика окна и git/glob-триггеры.
|
|
136
|
+
...(Array.isArray(definition?.activeDays) && definition.activeDays.length > 0
|
|
137
|
+
? { activeDays: definition.activeDays }
|
|
138
|
+
: {}),
|
|
139
|
+
...(definition?.windowPolicy ? { windowPolicy: definition.windowPolicy } : {}),
|
|
140
|
+
...(definition?.gitBranch ? { gitBranch: definition.gitBranch } : {}),
|
|
141
|
+
...(Array.isArray(definition?.gitPaths) && definition.gitPaths.length > 0
|
|
142
|
+
? { gitPaths: definition.gitPaths }
|
|
143
|
+
: {}),
|
|
144
|
+
...(Array.isArray(definition?.gitIgnore) && definition.gitIgnore.length > 0
|
|
145
|
+
? { gitIgnore: definition.gitIgnore }
|
|
146
|
+
: {}),
|
|
147
|
+
...(definition?.gitPollSeconds !== undefined
|
|
148
|
+
? { gitPollSeconds: definition.gitPollSeconds }
|
|
149
|
+
: {}),
|
|
150
|
+
...(Array.isArray(definition?.watchGlobs) && definition.watchGlobs.length > 0
|
|
151
|
+
? { watchGlobs: definition.watchGlobs }
|
|
152
|
+
: {}),
|
|
153
|
+
...(Array.isArray(definition?.watchIgnore) && definition.watchIgnore.length > 0
|
|
154
|
+
? { watchIgnore: definition.watchIgnore }
|
|
155
|
+
: {}),
|
|
134
156
|
...(definition?.pausedUntil ? { pausedUntil: definition.pausedUntil } : {}),
|
|
135
157
|
...(Array.isArray(definition?.allowedTools) && definition.allowedTools.length > 0
|
|
136
158
|
? { allowedTools: definition.allowedTools }
|
|
@@ -203,11 +225,13 @@ export function parseImportJson(raw) {
|
|
|
203
225
|
const prompt = typeof source.prompt === "string" ? source.prompt.trim() : "";
|
|
204
226
|
const triggerType = source.triggerType === "file"
|
|
205
227
|
? "file"
|
|
206
|
-
: source.triggerType === "
|
|
207
|
-
? "
|
|
208
|
-
: source.triggerType === "
|
|
209
|
-
? "
|
|
210
|
-
: "
|
|
228
|
+
: source.triggerType === "git"
|
|
229
|
+
? "git"
|
|
230
|
+
: source.triggerType === "mcp-event"
|
|
231
|
+
? "mcp-event"
|
|
232
|
+
: source.triggerType === "once"
|
|
233
|
+
? "once"
|
|
234
|
+
: "cron";
|
|
211
235
|
const watchPath = typeof source.watchPath === "string" ? source.watchPath.trim() : "";
|
|
212
236
|
const rawRunAt = typeof source.runAt === "string" ? source.runAt.trim() : "";
|
|
213
237
|
const rawDelaySeconds = typeof source.delaySeconds === "number" ? source.delaySeconds : undefined;
|
|
@@ -319,6 +343,51 @@ export function parseImportJson(raw) {
|
|
|
319
343
|
const model = readOptionalString(source.model);
|
|
320
344
|
const priority = normalizePriority(source.priority);
|
|
321
345
|
const workspaceId = readOptionalString(source.workspaceId);
|
|
346
|
+
// Спринт 27: git-триггер, glob-маски и временные окна.
|
|
347
|
+
if (triggerType === "git" && !workspaceId && !workingDirectory) {
|
|
348
|
+
errors.push(`Запись ${position}${name ? ` (${name})` : ""}: для git-триггера нужна рабочая директория (workingDirectory или workspaceId).`);
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
const readStringList = (value) => {
|
|
352
|
+
if (!Array.isArray(value))
|
|
353
|
+
return undefined;
|
|
354
|
+
const items = value
|
|
355
|
+
.filter((entry) => typeof entry === "string" && Boolean(entry.trim()))
|
|
356
|
+
.map((entry) => entry.trim());
|
|
357
|
+
return items.length > 0 ? items : undefined;
|
|
358
|
+
};
|
|
359
|
+
const gitBranch = readOptionalString(source.gitBranch);
|
|
360
|
+
const gitPaths = readStringList(source.gitPaths);
|
|
361
|
+
const gitIgnore = readStringList(source.gitIgnore);
|
|
362
|
+
const watchGlobs = readStringList(source.watchGlobs);
|
|
363
|
+
const watchIgnore = readStringList(source.watchIgnore);
|
|
364
|
+
const gitPollSeconds = typeof source.gitPollSeconds === "number" &&
|
|
365
|
+
Number.isFinite(source.gitPollSeconds) &&
|
|
366
|
+
source.gitPollSeconds > 0
|
|
367
|
+
? Math.floor(source.gitPollSeconds)
|
|
368
|
+
: undefined;
|
|
369
|
+
const rawDays = Array.isArray(source.activeDays) ? source.activeDays : undefined;
|
|
370
|
+
let activeDays;
|
|
371
|
+
if (rawDays) {
|
|
372
|
+
const days = rawDays.filter((value) => typeof value === "number" && Number.isInteger(value) && value >= 0 && value <= 6);
|
|
373
|
+
if (days.length !== rawDays.length) {
|
|
374
|
+
errors.push(`Запись ${position}${name ? ` (${name})` : ""}: activeDays должен содержать числа 0..6 (0 = воскресенье).`);
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
activeDays = normalizeActiveDays(days);
|
|
378
|
+
}
|
|
379
|
+
let windowPolicy;
|
|
380
|
+
if (source.windowPolicy !== undefined) {
|
|
381
|
+
if (source.windowPolicy === "skip" ||
|
|
382
|
+
source.windowPolicy === "postpone" ||
|
|
383
|
+
source.windowPolicy === "run") {
|
|
384
|
+
windowPolicy = source.windowPolicy;
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
errors.push(`Запись ${position}${name ? ` (${name})` : ""}: неизвестный windowPolicy «${String(source.windowPolicy)}» (ожидается skip, postpone или run).`);
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
322
391
|
// Планирование 2.0 (Спринт 19): IANA-зона, окно запуска, пауза до даты.
|
|
323
392
|
const timezone = readOptionalString(source.timezone);
|
|
324
393
|
if (timezone && !isValidIanaTimeZone(timezone)) {
|
|
@@ -528,6 +597,14 @@ export function parseImportJson(raw) {
|
|
|
528
597
|
...(timezone !== undefined ? { timezone } : {}),
|
|
529
598
|
...(notBefore !== undefined ? { notBefore } : {}),
|
|
530
599
|
...(notAfter !== undefined ? { notAfter } : {}),
|
|
600
|
+
...(activeDays !== undefined ? { activeDays } : {}),
|
|
601
|
+
...(windowPolicy !== undefined ? { windowPolicy } : {}),
|
|
602
|
+
...(gitBranch !== undefined ? { gitBranch } : {}),
|
|
603
|
+
...(gitPaths !== undefined ? { gitPaths } : {}),
|
|
604
|
+
...(gitIgnore !== undefined ? { gitIgnore } : {}),
|
|
605
|
+
...(gitPollSeconds !== undefined ? { gitPollSeconds } : {}),
|
|
606
|
+
...(watchGlobs !== undefined ? { watchGlobs } : {}),
|
|
607
|
+
...(watchIgnore !== undefined ? { watchIgnore } : {}),
|
|
531
608
|
...(pausedUntil !== undefined ? { pausedUntil } : {}),
|
|
532
609
|
...(mcpEvent ? { mcpEvent } : {}),
|
|
533
610
|
...(allowedTools !== undefined ? { allowedTools } : {}),
|
package/dist/templates.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export interface TaskTemplate {
|
|
|
28
28
|
nextTaskOnError?: string;
|
|
29
29
|
/** DAG-зависимости: задачи, которые должны успешно завершиться раньше этой. */
|
|
30
30
|
dependsOn?: string[];
|
|
31
|
-
triggerType?: "cron" | "file" | "mcp-event";
|
|
31
|
+
triggerType?: "cron" | "file" | "git" | "mcp-event";
|
|
32
32
|
/** Параметры MCP-события (для triggerType === "mcp-event"). */
|
|
33
33
|
mcpEvent?: {
|
|
34
34
|
server: string;
|
package/dist/templates.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAMA;;;;;;GAM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M,CAAC;IACrB,2CAA2C;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,WAAW,CAAC;IACpD,+DAA+D;IAC/D,QAAQ,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,sDAAsD;AACtD,wBAAsB,aAAa,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAE7D;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAChC,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GACnD,OAAO,CAAC,YAAY,CAAC,CAEvB;AAED,4BAA4B;AAC5B,wBAAsB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9D"}
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -267,6 +267,7 @@ existing directory. Env keys must match `^[A-Za-z_][A-Za-z0-9_]*$`; max 100 pair
|
|
|
267
267
|
| --- | --- |
|
|
268
268
|
| `cron` | OS scheduler on the translated schedule |
|
|
269
269
|
| `file` | chokidar watches `watchPath`; debounced change starts the task |
|
|
270
|
+
| `git` | Polls `HEAD` in the task working directory; runs when new commits match branch/path/ignore filters |
|
|
270
271
|
| `mcp-event` | `emit_event` RPC/tool matches server + event and starts subscribers |
|
|
271
272
|
|
|
272
273
|
Cron expressions are standard 5-field. The Windows backend supports the subset that
|