@dsh-enhanced/assistant-automations 0.1.7 → 0.1.14

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.
Files changed (55) hide show
  1. package/README.md +37 -7
  2. package/lib/coordinator.d.ts +45 -5
  3. package/lib/coordinator.d.ts.map +1 -1
  4. package/lib/coordinator.js +418 -86
  5. package/lib/coordinator.js.map +1 -1
  6. package/lib/growth.d.ts +120 -0
  7. package/lib/growth.d.ts.map +1 -0
  8. package/lib/growth.js +383 -0
  9. package/lib/growth.js.map +1 -0
  10. package/lib/host-executors.d.ts +25 -0
  11. package/lib/host-executors.d.ts.map +1 -0
  12. package/lib/host-executors.js +181 -0
  13. package/lib/host-executors.js.map +1 -0
  14. package/lib/index.d.ts +1 -1
  15. package/lib/index.d.ts.map +1 -1
  16. package/lib/index.js +1 -1
  17. package/lib/index.js.map +1 -1
  18. package/lib/operator.d.ts +2 -0
  19. package/lib/operator.d.ts.map +1 -1
  20. package/lib/operator.js +6 -2
  21. package/lib/operator.js.map +1 -1
  22. package/lib/proposals.d.ts +2 -2
  23. package/lib/proposals.d.ts.map +1 -1
  24. package/lib/proposals.js +34 -22
  25. package/lib/proposals.js.map +1 -1
  26. package/lib/runner.d.ts +28 -2
  27. package/lib/runner.d.ts.map +1 -1
  28. package/lib/runner.js +524 -73
  29. package/lib/runner.js.map +1 -1
  30. package/lib/schedule.d.ts.map +1 -1
  31. package/lib/schedule.js +37 -9
  32. package/lib/schedule.js.map +1 -1
  33. package/lib/service.d.ts +109 -4
  34. package/lib/service.d.ts.map +1 -1
  35. package/lib/service.js +987 -16
  36. package/lib/service.js.map +1 -1
  37. package/lib/sqlite.d.ts +1 -1
  38. package/lib/sqlite.d.ts.map +1 -1
  39. package/lib/sqlite.js +369 -41
  40. package/lib/sqlite.js.map +1 -1
  41. package/lib/store.d.ts +175 -1
  42. package/lib/store.d.ts.map +1 -1
  43. package/lib/store.js +1889 -71
  44. package/lib/store.js.map +1 -1
  45. package/lib/tools.js +1 -1
  46. package/lib/tools.js.map +1 -1
  47. package/lib/types.d.ts +354 -11
  48. package/lib/types.d.ts.map +1 -1
  49. package/lib/types.js +13 -1
  50. package/lib/types.js.map +1 -1
  51. package/lib/version.d.ts +1 -1
  52. package/lib/version.d.ts.map +1 -1
  53. package/lib/version.js +1 -1
  54. package/lib/version.js.map +1 -1
  55. package/package.json +10 -8
package/lib/runner.d.ts CHANGED
@@ -1,7 +1,14 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import type { AssistantPolicyService, PolicyBudgetConfig } from '@dsh-enhanced/assistant-policy';
3
- import { type AutomationRunner, type AutomationRunnerInput, type AutomationRunnerResult } from './coordinator.js';
4
- export declare class AutomationBudgetReplayError extends Error {
3
+ import { HostAutomationExecutorRegistry } from './host-executors.js';
4
+ import { AutomationRunnerFailureError, type AutomationRunner, type AutomationRunnerInput, type AutomationRunnerResult } from './coordinator.js';
5
+ import type { AutomationExecutionContext } from './types.js';
6
+ declare module '@deepseek-ai/cordis' {
7
+ interface Context {
8
+ assistantAutomationExecution: AutomationExecutionContext;
9
+ }
10
+ }
11
+ export declare class AutomationBudgetReplayError extends AutomationRunnerFailureError {
5
12
  readonly reservationStatus: 'finalized' | 'released' | 'reserved';
6
13
  readonly code: "automation-budget-reservation-replayed";
7
14
  constructor(reservationStatus: 'finalized' | 'released' | 'reserved');
@@ -20,4 +27,23 @@ export declare class DshAutomationRunner implements AutomationRunner {
20
27
  constructor(ctx: Context, policy: AssistantPolicyService, options?: DshAutomationRunnerOptions);
21
28
  run(input: AutomationRunnerInput): Promise<AutomationRunnerResult>;
22
29
  }
30
+ export interface HostAutomationRunnerOptions {
31
+ readonly allowUnbudgetedExecution?: boolean;
32
+ }
33
+ /** Executes immutable Host contracts without creating an Agent or model turn. */
34
+ export declare class HostAutomationRunner implements AutomationRunner {
35
+ private readonly registry;
36
+ private readonly policy;
37
+ private readonly allowUnbudgetedExecution;
38
+ constructor(registry: HostAutomationExecutorRegistry, policy: AssistantPolicyService, options?: HostAutomationRunnerOptions);
39
+ run(input: AutomationRunnerInput): Promise<AutomationRunnerResult>;
40
+ private hostDiagnostic;
41
+ }
42
+ /** Preserves the legacy Agent runner while routing Host definitions explicitly. */
43
+ export declare class RoutedAutomationRunner implements AutomationRunner {
44
+ private readonly agent;
45
+ private readonly host;
46
+ constructor(agent: AutomationRunner, host: AutomationRunner);
47
+ run(input: AutomationRunnerInput): Promise<AutomationRunnerResult>;
48
+ }
23
49
  //# sourceMappingURL=runner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AASlD,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAEhG,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC5B,MAAM,kBAAkB,CAAA;AA2CzB,qBAAa,2BAA4B,SAAQ,KAAK;IAGxC,QAAQ,CAAC,iBAAiB,EAAE,WAAW,GAAG,UAAU,GAAG,UAAU;IAF7E,QAAQ,CAAC,IAAI,EAAG,wCAAwC,CAAS;gBAE5C,iBAAiB,EAAE,WAAW,GAAG,UAAU,GAAG,UAAU;CAI9E;AAED,eAAO,MAAM,4BAA4B,oBAAoB,CAAA;AAE7D,yFAAyF;AACzF,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,IAAI,CAAC,sBAAsB,EAAE,iBAAiB,CAAC,EACvD,QAAQ,EAAE,MAAM,GACf,QAAQ,CAAC,kBAAkB,CAAC,CAW9B;AAED,MAAM,WAAW,0BAA0B;IACzC,sGAAsG;IACtG,QAAQ,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAA;CAC5C;AAiBD,qBAAa,mBAAoB,YAAW,gBAAgB;IAIxD,OAAO,CAAC,QAAQ,CAAC,G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