orizu 0.5.52 → 0.5.53

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 (65) hide show
  1. package/dist/auth-commands.js +2 -2
  2. package/dist/cli-console-output.d.ts +7 -1
  3. package/dist/cli-console-output.d.ts.map +1 -1
  4. package/dist/cli-console-output.js +16 -3
  5. package/dist/cli-stops.d.ts +14 -0
  6. package/dist/cli-stops.d.ts.map +1 -0
  7. package/dist/cli-stops.js +22 -0
  8. package/dist/egress-allowlist-cli.d.ts +29 -2
  9. package/dist/egress-allowlist-cli.d.ts.map +1 -1
  10. package/dist/egress-allowlist-cli.js +16 -89
  11. package/dist/egress-allowlist-workflow.d.ts +17 -0
  12. package/dist/egress-allowlist-workflow.d.ts.map +1 -0
  13. package/dist/egress-allowlist-workflow.js +183 -0
  14. package/dist/instruction-delivery.d.ts +4 -4
  15. package/dist/instruction-delivery.d.ts.map +1 -1
  16. package/dist/instruction-delivery.js +32 -46
  17. package/dist/instruction-prune.d.ts +24 -0
  18. package/dist/instruction-prune.d.ts.map +1 -0
  19. package/dist/instruction-prune.js +33 -0
  20. package/dist/instruction-set-sync/index.d.ts +0 -2
  21. package/dist/instruction-set-sync/index.d.ts.map +1 -1
  22. package/dist/instruction-set-sync/index.js +3 -36
  23. package/dist/instruction-set-update/index.d.ts +41 -3
  24. package/dist/instruction-set-update/index.d.ts.map +1 -1
  25. package/dist/instruction-set-update/index.js +156 -132
  26. package/dist/instruction-sets-cli.d.ts.map +1 -1
  27. package/dist/instruction-sets-cli.js +21 -2
  28. package/dist/instruction-sync-lock.d.ts +9 -0
  29. package/dist/instruction-sync-lock.d.ts.map +1 -0
  30. package/dist/instruction-sync-lock.js +24 -0
  31. package/dist/json-output-scrub.d.ts +3 -0
  32. package/dist/json-output-scrub.d.ts.map +1 -0
  33. package/dist/json-output-scrub.js +70 -0
  34. package/dist/one-request-write.d.ts.map +1 -1
  35. package/dist/one-request-write.js +2 -9
  36. package/dist/workbench-cli.d.ts +2 -1
  37. package/dist/workbench-cli.d.ts.map +1 -1
  38. package/dist/workbench-cli.js +79 -593
  39. package/dist/workbench-workflows.d.ts +56 -0
  40. package/dist/workbench-workflows.d.ts.map +1 -0
  41. package/dist/workbench-workflows.js +665 -0
  42. package/dist/workspace-sync-workflow.d.ts +115 -0
  43. package/dist/workspace-sync-workflow.d.ts.map +1 -0
  44. package/dist/workspace-sync-workflow.js +642 -0
  45. package/dist/workspace-sync.d.ts +45 -97
  46. package/dist/workspace-sync.d.ts.map +1 -1
  47. package/dist/workspace-sync.js +53 -494
  48. package/package.json +1 -1
  49. package/src/auth-commands.ts +2 -2
  50. package/src/cli-console-output.ts +16 -2
  51. package/src/cli-stops.ts +27 -0
  52. package/src/egress-allowlist-cli.ts +18 -90
  53. package/src/egress-allowlist-workflow.ts +198 -0
  54. package/src/instruction-delivery.ts +31 -47
  55. package/src/instruction-prune.ts +59 -0
  56. package/src/instruction-set-sync/index.ts +3 -43
  57. package/src/instruction-set-update/index.ts +173 -122
  58. package/src/instruction-sets-cli.ts +23 -2
  59. package/src/instruction-sync-lock.ts +27 -0
  60. package/src/json-output-scrub.ts +73 -0
  61. package/src/one-request-write.ts +2 -10
  62. package/src/workbench-cli.ts +83 -684
  63. package/src/workbench-workflows.ts +815 -0
  64. package/src/workspace-sync-workflow.ts +838 -0
  65. package/src/workspace-sync.ts +63 -630
@@ -0,0 +1,56 @@
1
+ import { Effect } from 'effect';
2
+ import { type Interrupted } from './cli-stops.js';
3
+ import type { SessionEndOptions, SessionEndResult, SessionFinishOptions, SessionFinishResult, SessionStartOptions, SessionStartResult, SessionStatusOptions, SessionStatusResult, TailOnceResult, TailWorkbenchRunOptions, WorkbenchFetcher, WorkbenchRunResult, WorkbenchRunStartOptions, WorkbenchRunStatusOptions, WorkbenchRunTerminalOptions } from './workbench-cli.js';
4
+ /** Where a write's result lands, inside the step a stop cannot end. */
5
+ export interface Settled<A> {
6
+ value?: A;
7
+ }
8
+ /** A session start stopped while its repository was still provisioning. */
9
+ export interface PendingStart {
10
+ sessionId: string;
11
+ startIntentId: string;
12
+ projectSlug: string | null;
13
+ workspaceDirectory: string | null;
14
+ }
15
+ /** How a command run with stops ended: its result (maybe with a stop that
16
+ * arrived during a write), or a stop, with the pending start it ended, if any. */
17
+ export type StoppableOutcome<A> = {
18
+ value: A;
19
+ interrupted?: Interrupted['interrupted'];
20
+ } | {
21
+ interrupted: Interrupted['interrupted'];
22
+ pending: PendingStart | null;
23
+ };
24
+ /** Runs one command for a library caller: no stop handlers, same errors. */
25
+ export declare function runPlain<A>(program: Effect.Effect<A, unknown>): Promise<A>;
26
+ /** Runs one local CLI command with Ctrl-C and SIGTERM handled. */
27
+ export declare function runStoppable<A>(build: (settled: Settled<A>, stop: {
28
+ pending: PendingStart | null;
29
+ }) => Effect.Effect<A, unknown>): Promise<StoppableOutcome<A>>;
30
+ /**
31
+ * POSTs the start intent, retrying a lost reply or a 500/502/503/504 with the
32
+ * same intent, and polls a pending repository. Only the pending wait can be
33
+ * stopped; `stop.pending` then holds what a resume needs.
34
+ */
35
+ export declare function sessionStart(opts?: SessionStartOptions, settled?: Settled<SessionStartResult>, stop?: {
36
+ pending: PendingStart | null;
37
+ }): Effect.Effect<SessionStartResult, unknown>;
38
+ export declare function sessionStatus(opts?: SessionStatusOptions, abortable?: boolean): Effect.Effect<SessionStatusResult, unknown>;
39
+ export declare function sessionEnd(opts: SessionEndOptions, settled?: Settled<SessionEndResult>): Effect.Effect<SessionEndResult, unknown>;
40
+ /**
41
+ * Reads the session (a stop can end this), then runs the local git steps and
42
+ * the finish request to the end: once `--push` has changed anything, the
43
+ * finish request always follows.
44
+ */
45
+ export declare function sessionFinish(opts: SessionFinishOptions, settled?: Settled<SessionFinishResult>, abortable?: boolean): Effect.Effect<SessionFinishResult, unknown>;
46
+ export declare function runStart(opts: WorkbenchRunStartOptions, settled?: Settled<WorkbenchRunResult>): Effect.Effect<WorkbenchRunResult, unknown>;
47
+ export declare function runStatus(opts: WorkbenchRunStatusOptions, abortable?: boolean): Effect.Effect<WorkbenchRunResult, unknown>;
48
+ export declare function runTerminal(opts: WorkbenchRunTerminalOptions, settled?: Settled<WorkbenchRunResult>): Effect.Effect<WorkbenchRunResult, unknown>;
49
+ export declare function tailOnce(fetcher: WorkbenchFetcher, runId: string, cursor: number, limit?: number, abortable?: boolean): Effect.Effect<TailOnceResult, unknown>;
50
+ /**
51
+ * Follows a run's events. A stop ends it between pages or during a wait;
52
+ * a page's events are always handed over whole. The hosted session CLI runs
53
+ * this through `tailWorkbenchRun` with no stop handlers.
54
+ */
55
+ export declare function tail(opts: TailWorkbenchRunOptions, abortable?: boolean): Effect.Effect<TailOnceResult, unknown>;
56
+ //# sourceMappingURL=workbench-workflows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workbench-workflows.d.ts","sourceRoot":"","sources":["../src/workbench-workflows.ts"],"names":[],"mappings":"AAEA,OAAO,EAAS,MAAM,EAAQ,MAAM,QAAQ,CAAA;AAE5C,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAgB/D,OAAO,KAAK,EAGV,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EAGnB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,uBAAuB,EACvB,gBAAgB,EAGhB,kBAAkB,EAClB,wBAAwB,EACxB,yBAAyB,EACzB,2BAA2B,EAG5B,MAAM,oBAAoB,CAAA;AAkB3B,uEAAuE;AACvE,MAAM,WAAW,OAAO,CAAC,CAAC;IAAI,KAAK,CAAC,EAAE,CAAC,CAAA;CAAE;AAEzC,2EAA2E;AAC3E,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAA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