@stitchmux/client 0.0.0-stage → 0.96.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.
Files changed (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -2
  3. package/dist/chunk-szdg2ww3.js +714 -0
  4. package/dist/index.js +4070 -0
  5. package/dist/monitoring.js +279 -0
  6. package/native-stream.json +8 -0
  7. package/package.json +36 -4
  8. package/types/src/agent/claude/native/commandSchema.d.ts +14 -0
  9. package/types/src/agent/custom/config.d.ts +159 -0
  10. package/types/src/agent/custom/endpoint.d.ts +26 -0
  11. package/types/src/agent/transcript/messageSchema.d.ts +153 -0
  12. package/types/src/attachments/reference.d.ts +56 -0
  13. package/types/src/attachments/schema.d.ts +512 -0
  14. package/types/src/chat/communicationAuthorizationSchema.d.ts +77 -0
  15. package/types/src/chat/communicationReceiptSchema.d.ts +82 -0
  16. package/types/src/chat/feedSchema.d.ts +641 -0
  17. package/types/src/chat/holdKind.d.ts +26 -0
  18. package/types/src/chat/identity.d.ts +55 -0
  19. package/types/src/chat/identitySchema.d.ts +121 -0
  20. package/types/src/chat/letterRequestSchema.d.ts +35 -0
  21. package/types/src/chat/messageOperationSchema.d.ts +277 -0
  22. package/types/src/chat/messageSchema.d.ts +284 -0
  23. package/types/src/chat/originSchema.d.ts +67 -0
  24. package/types/src/chat/sentLetterSchema.d.ts +79 -0
  25. package/types/src/client.d.ts +16 -0
  26. package/types/src/config/claudeProfileSchema.d.ts +22 -0
  27. package/types/src/config/launchSchema.d.ts +136 -0
  28. package/types/src/config/location.d.ts +6 -0
  29. package/types/src/config/machineSchema.d.ts +320 -0
  30. package/types/src/config/modelSelectionFlags.d.ts +4 -0
  31. package/types/src/config/paths.d.ts +87 -0
  32. package/types/src/config/remoteTransport.d.ts +12 -0
  33. package/types/src/content/schema.d.ts +312 -0
  34. package/types/src/content/toolSchema.d.ts +36 -0
  35. package/types/src/context/corpusSearchSchema.d.ts +578 -0
  36. package/types/src/context/exactMessageSchema.d.ts +54 -0
  37. package/types/src/context/messageSenderSchema.d.ts +14 -0
  38. package/types/src/context/schema.d.ts +176 -0
  39. package/types/src/context/searchFrames.d.ts +225 -0
  40. package/types/src/context/searchRequestSchema.d.ts +47 -0
  41. package/types/src/context/transcriptJsonSchema.d.ts +210 -0
  42. package/types/src/control/schema/context.d.ts +188 -0
  43. package/types/src/control/schema/contract.d.ts +7142 -0
  44. package/types/src/control/schema/core.d.ts +722 -0
  45. package/types/src/control/schema/directory.d.ts +34 -0
  46. package/types/src/control/schema/eventsContract.d.ts +1423 -0
  47. package/types/src/control/schema/externalList.d.ts +96 -0
  48. package/types/src/control/schema/message.d.ts +280 -0
  49. package/types/src/control/schema/model.d.ts +128 -0
  50. package/types/src/control/schema/native.d.ts +664 -0
  51. package/types/src/control/schema/nativeStreamContract.d.ts +155 -0
  52. package/types/src/control/schema/performance.d.ts +85 -0
  53. package/types/src/control/schema/public.d.ts +48 -0
  54. package/types/src/control/schema/reading.d.ts +24 -0
  55. package/types/src/control/schema/refusals.d.ts +433 -0
  56. package/types/src/control/schema/runtimeOps.d.ts +724 -0
  57. package/types/src/control/schema/searchContract.d.ts +258 -0
  58. package/types/src/control/schema/selection.d.ts +124 -0
  59. package/types/src/control/schema/session.d.ts +272 -0
  60. package/types/src/control/schema/terminalPrompt.d.ts +102 -0
  61. package/types/src/control/transport/boundary.d.ts +7137 -0
  62. package/types/src/control/transport/client.d.ts +10838 -0
  63. package/types/src/control/transport/connection.d.ts +13 -0
  64. package/types/src/control/transport/socketPath.d.ts +3 -0
  65. package/types/src/control-client.d.ts +9 -0
  66. package/types/src/delegation/applicationSchema.d.ts +132 -0
  67. package/types/src/delegation/schema.d.ts +267 -0
  68. package/types/src/events/schema.d.ts +155 -0
  69. package/types/src/external/contentSchema.d.ts +145 -0
  70. package/types/src/external/messageSchema.d.ts +131 -0
  71. package/types/src/external/residentFrames.d.ts +130 -0
  72. package/types/src/external/residentSchema.d.ts +144 -0
  73. package/types/src/external/sessionSchema.d.ts +427 -0
  74. package/types/src/external/turnSchema.d.ts +55 -0
  75. package/types/src/fleet/fleetSchema.d.ts +937 -0
  76. package/types/src/inventory/listSchema.d.ts +442 -0
  77. package/types/src/monitoring/nativeFile.d.ts +7 -0
  78. package/types/src/monitoring/nativeRead.d.ts +14 -0
  79. package/types/src/monitoring/performanceSchema.d.ts +28 -0
  80. package/types/src/monitoring/schema.d.ts +410 -0
  81. package/types/src/monitoring/validate.d.ts +5 -0
  82. package/types/src/monitoring-reader.d.ts +4 -0
  83. package/types/src/policy/reference.d.ts +93 -0
  84. package/types/src/policy/runtimeProfile.d.ts +24 -0
  85. package/types/src/policy/schema.d.ts +177 -0
  86. package/types/src/runtime/capabilities.d.ts +124 -0
  87. package/types/src/runtime/modes.d.ts +47 -0
  88. package/types/src/runtime/permissionScope.d.ts +22 -0
  89. package/types/src/runtime/planLimitsSchema.d.ts +55 -0
  90. package/types/src/runtime/projectionSchema.d.ts +539 -0
  91. package/types/src/runtime/rewindSchema.d.ts +16 -0
  92. package/types/src/runtime/selectionSchema.d.ts +158 -0
  93. package/types/src/runtime/workloadContract.d.ts +55 -0
  94. package/types/src/session/boundary.d.ts +43 -0
  95. package/types/src/session/identitySchema.d.ts +353 -0
  96. package/types/src/session/schema.d.ts +341 -0
  97. package/types/src/session/sleep/schema.d.ts +283 -0
  98. package/types/src/steering/schema.d.ts +197 -0
  99. package/types/src/types.d.ts +48 -0
  100. package/types/src/usage/schema.d.ts +978 -0
  101. package/types/src/util/home.d.ts +9 -0
  102. package/types/src/util/preview.d.ts +13 -0
  103. package/types/src/util/version.d.ts +3 -0
@@ -0,0 +1,177 @@
1
+ import { z } from 'zod';
2
+ export type { ApplicationPolicyEvidence, ApplicationPolicyMetadata, ApplicationPolicyReference, } from "./reference.js";
3
+ export { ApplicationPolicyEvidenceSchema, ApplicationPolicyMetadataSchema, ApplicationPolicyReferenceSchema, } from "./reference.js";
4
+ /** Host configuration only. Public requests carry a reference, never these paths or source text. */
5
+ export declare const PolicySourceSchema: z.ZodObject<{
6
+ id: z.ZodString;
7
+ path: z.ZodString;
8
+ sha256: z.ZodString;
9
+ }, z.core.$strict>;
10
+ export declare const CodexAgentPolicySchema: z.ZodObject<{
11
+ revision: z.ZodString;
12
+ trustedRoots: z.ZodArray<z.ZodString>;
13
+ runtime: z.ZodLiteral<"codex">;
14
+ instructionSources: z.ZodDefault<z.ZodArray<z.ZodObject<{
15
+ id: z.ZodString;
16
+ path: z.ZodString;
17
+ sha256: z.ZodString;
18
+ }, z.core.$strict>>>;
19
+ skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
20
+ id: z.ZodString;
21
+ path: z.ZodString;
22
+ sha256: z.ZodString;
23
+ name: z.ZodString;
24
+ }, z.core.$strict>>>;
25
+ }, z.core.$strict>;
26
+ export declare const OpenCodeAgentPolicySchema: z.ZodObject<{
27
+ revision: z.ZodString;
28
+ trustedRoots: z.ZodArray<z.ZodString>;
29
+ runtime: z.ZodLiteral<"opencode">;
30
+ agent: z.ZodObject<{
31
+ name: z.ZodString;
32
+ source: z.ZodObject<{
33
+ id: z.ZodString;
34
+ path: z.ZodString;
35
+ sha256: z.ZodString;
36
+ }, z.core.$strict>;
37
+ }, z.core.$strict>;
38
+ denyTools: z.ZodDefault<z.ZodArray<z.ZodString>>;
39
+ }, z.core.$strict>;
40
+ export declare const HostAgentPolicySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
41
+ revision: z.ZodString;
42
+ trustedRoots: z.ZodArray<z.ZodString>;
43
+ runtime: z.ZodLiteral<"codex">;
44
+ instructionSources: z.ZodDefault<z.ZodArray<z.ZodObject<{
45
+ id: z.ZodString;
46
+ path: z.ZodString;
47
+ sha256: z.ZodString;
48
+ }, z.core.$strict>>>;
49
+ skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
50
+ id: z.ZodString;
51
+ path: z.ZodString;
52
+ sha256: z.ZodString;
53
+ name: z.ZodString;
54
+ }, z.core.$strict>>>;
55
+ }, z.core.$strict>, z.ZodObject<{
56
+ revision: z.ZodString;
57
+ trustedRoots: z.ZodArray<z.ZodString>;
58
+ runtime: z.ZodLiteral<"opencode">;
59
+ agent: z.ZodObject<{
60
+ name: z.ZodString;
61
+ source: z.ZodObject<{
62
+ id: z.ZodString;
63
+ path: z.ZodString;
64
+ sha256: z.ZodString;
65
+ }, z.core.$strict>;
66
+ }, z.core.$strict>;
67
+ denyTools: z.ZodDefault<z.ZodArray<z.ZodString>>;
68
+ }, z.core.$strict>], "runtime">;
69
+ export declare const AgentPoliciesSchema: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
70
+ revision: z.ZodString;
71
+ trustedRoots: z.ZodArray<z.ZodString>;
72
+ runtime: z.ZodLiteral<"codex">;
73
+ instructionSources: z.ZodDefault<z.ZodArray<z.ZodObject<{
74
+ id: z.ZodString;
75
+ path: z.ZodString;
76
+ sha256: z.ZodString;
77
+ }, z.core.$strict>>>;
78
+ skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
79
+ id: z.ZodString;
80
+ path: z.ZodString;
81
+ sha256: z.ZodString;
82
+ name: z.ZodString;
83
+ }, z.core.$strict>>>;
84
+ }, z.core.$strict>, z.ZodObject<{
85
+ revision: z.ZodString;
86
+ trustedRoots: z.ZodArray<z.ZodString>;
87
+ runtime: z.ZodLiteral<"opencode">;
88
+ agent: z.ZodObject<{
89
+ name: z.ZodString;
90
+ source: z.ZodObject<{
91
+ id: z.ZodString;
92
+ path: z.ZodString;
93
+ sha256: z.ZodString;
94
+ }, z.core.$strict>;
95
+ }, z.core.$strict>;
96
+ denyTools: z.ZodDefault<z.ZodArray<z.ZodString>>;
97
+ }, z.core.$strict>], "runtime">>>;
98
+ export type AgentPolicies = z.infer<typeof AgentPoliciesSchema>;
99
+ export type PolicySource = z.infer<typeof PolicySourceSchema>;
100
+ export declare const MaterializedPolicySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
101
+ runtime: z.ZodLiteral<"codex">;
102
+ metadata: z.ZodObject<{
103
+ id: z.ZodString;
104
+ revision: z.ZodString;
105
+ digest: z.ZodString;
106
+ runtime: z.ZodEnum<{
107
+ codex: "codex";
108
+ opencode: "opencode";
109
+ }>;
110
+ sources: z.ZodArray<z.ZodObject<{
111
+ id: z.ZodString;
112
+ digest: z.ZodString;
113
+ kind: z.ZodEnum<{
114
+ agent: "agent";
115
+ instructions: "instructions";
116
+ skill: "skill";
117
+ }>;
118
+ }, z.core.$strict>>;
119
+ capabilities: z.ZodArray<z.ZodEnum<{
120
+ "developer-instructions": "developer-instructions";
121
+ "native-agent": "native-agent";
122
+ "native-skills": "native-skills";
123
+ "tool-denials": "tool-denials";
124
+ }>>;
125
+ }, z.core.$strict>;
126
+ instructionSources: z.ZodArray<z.ZodObject<{
127
+ id: z.ZodString;
128
+ path: z.ZodString;
129
+ sha256: z.ZodString;
130
+ body: z.ZodString;
131
+ }, z.core.$strict>>;
132
+ skills: z.ZodArray<z.ZodObject<{
133
+ id: z.ZodString;
134
+ path: z.ZodString;
135
+ sha256: z.ZodString;
136
+ body: z.ZodString;
137
+ name: z.ZodString;
138
+ }, z.core.$strict>>;
139
+ }, z.core.$strict>, z.ZodObject<{
140
+ runtime: z.ZodLiteral<"opencode">;
141
+ metadata: z.ZodObject<{
142
+ id: z.ZodString;
143
+ revision: z.ZodString;
144
+ digest: z.ZodString;
145
+ runtime: z.ZodEnum<{
146
+ codex: "codex";
147
+ opencode: "opencode";
148
+ }>;
149
+ sources: z.ZodArray<z.ZodObject<{
150
+ id: z.ZodString;
151
+ digest: z.ZodString;
152
+ kind: z.ZodEnum<{
153
+ agent: "agent";
154
+ instructions: "instructions";
155
+ skill: "skill";
156
+ }>;
157
+ }, z.core.$strict>>;
158
+ capabilities: z.ZodArray<z.ZodEnum<{
159
+ "developer-instructions": "developer-instructions";
160
+ "native-agent": "native-agent";
161
+ "native-skills": "native-skills";
162
+ "tool-denials": "tool-denials";
163
+ }>>;
164
+ }, z.core.$strict>;
165
+ agent: z.ZodObject<{
166
+ name: z.ZodString;
167
+ source: z.ZodObject<{
168
+ id: z.ZodString;
169
+ path: z.ZodString;
170
+ sha256: z.ZodString;
171
+ body: z.ZodString;
172
+ }, z.core.$strict>;
173
+ prompt: z.ZodString;
174
+ }, z.core.$strict>;
175
+ denyTools: z.ZodArray<z.ZodString>;
176
+ }, z.core.$strict>], "runtime">;
177
+ export type MaterializedPolicy = z.infer<typeof MaterializedPolicySchema>;
@@ -0,0 +1,124 @@
1
+ import { z } from 'zod';
2
+ import type { Session } from "../types.js";
3
+ export declare const RuntimeCapabilitiesSchema: z.ZodObject<{
4
+ runtime: z.ZodEnum<{
5
+ antigravity: "antigravity";
6
+ claude: "claude";
7
+ codex: "codex";
8
+ custom: "custom";
9
+ opencode: "opencode";
10
+ }>;
11
+ structured: z.ZodBoolean;
12
+ creation: z.ZodObject<{
13
+ noInference: z.ZodBoolean;
14
+ inference: z.ZodEnum<{
15
+ deferred: "deferred";
16
+ "not-guaranteed": "not-guaranteed";
17
+ required: "required";
18
+ }>;
19
+ requirements: z.ZodOptional<z.ZodArray<z.ZodEnum<{
20
+ delegation: "delegation";
21
+ "explicit-model": "explicit-model";
22
+ }>>>;
23
+ reason: z.ZodEnum<{
24
+ "delegated-input-only": "delegated-input-only";
25
+ "native-rollout-requires-bootstrap": "native-rollout-requires-bootstrap";
26
+ "provider-initialization-not-certified": "provider-initialization-not-certified";
27
+ }>;
28
+ }, z.core.$strict>;
29
+ delegation: z.ZodOptional<z.ZodBoolean>;
30
+ sleep: z.ZodOptional<z.ZodBoolean>;
31
+ modelCatalog: z.ZodBoolean;
32
+ modelSelection: z.ZodBoolean;
33
+ approval: z.ZodBoolean;
34
+ input: z.ZodBoolean;
35
+ nativeStream: z.ZodBoolean;
36
+ interrupt: z.ZodBoolean;
37
+ resume: z.ZodBoolean;
38
+ imageInput: z.ZodBoolean;
39
+ selectionDefaults: z.ZodBoolean;
40
+ turnOptions: z.ZodBoolean;
41
+ turnSteering: z.ZodBoolean;
42
+ history: z.ZodBoolean;
43
+ fork: z.ZodBoolean;
44
+ compaction: z.ZodBoolean;
45
+ rollback: z.ZodBoolean;
46
+ applicationPolicy: z.ZodBoolean;
47
+ commandCatalog: z.ZodBoolean;
48
+ permissionModes: z.ZodBoolean;
49
+ fileCheckpoints: z.ZodBoolean;
50
+ mcpControl: z.ZodBoolean;
51
+ }, z.core.$strict>;
52
+ export type RuntimeCapabilities = z.infer<typeof RuntimeCapabilitiesSchema>;
53
+ export declare const RuntimeCatalogInputSchema: z.ZodObject<{}, z.core.$strict>;
54
+ export declare const RuntimeCatalogSchema: z.ZodObject<{
55
+ runtimes: z.ZodArray<z.ZodObject<{
56
+ runtime: z.ZodEnum<{
57
+ antigravity: "antigravity";
58
+ claude: "claude";
59
+ codex: "codex";
60
+ custom: "custom";
61
+ opencode: "opencode";
62
+ }>;
63
+ mode: z.ZodEnum<{
64
+ "app-server": "app-server";
65
+ native: "native";
66
+ tui: "tui";
67
+ }>;
68
+ availability: z.ZodEnum<{
69
+ configured: "configured";
70
+ unavailable: "unavailable";
71
+ }>;
72
+ reason: z.ZodNullable<z.ZodString>;
73
+ capabilities: z.ZodObject<{
74
+ runtime: z.ZodEnum<{
75
+ antigravity: "antigravity";
76
+ claude: "claude";
77
+ codex: "codex";
78
+ custom: "custom";
79
+ opencode: "opencode";
80
+ }>;
81
+ structured: z.ZodBoolean;
82
+ creation: z.ZodObject<{
83
+ noInference: z.ZodBoolean;
84
+ inference: z.ZodEnum<{
85
+ deferred: "deferred";
86
+ "not-guaranteed": "not-guaranteed";
87
+ required: "required";
88
+ }>;
89
+ requirements: z.ZodOptional<z.ZodArray<z.ZodEnum<{
90
+ delegation: "delegation";
91
+ "explicit-model": "explicit-model";
92
+ }>>>;
93
+ reason: z.ZodEnum<{
94
+ "delegated-input-only": "delegated-input-only";
95
+ "native-rollout-requires-bootstrap": "native-rollout-requires-bootstrap";
96
+ "provider-initialization-not-certified": "provider-initialization-not-certified";
97
+ }>;
98
+ }, z.core.$strict>;
99
+ delegation: z.ZodOptional<z.ZodBoolean>;
100
+ sleep: z.ZodOptional<z.ZodBoolean>;
101
+ modelCatalog: z.ZodBoolean;
102
+ modelSelection: z.ZodBoolean;
103
+ approval: z.ZodBoolean;
104
+ input: z.ZodBoolean;
105
+ nativeStream: z.ZodBoolean;
106
+ interrupt: z.ZodBoolean;
107
+ resume: z.ZodBoolean;
108
+ imageInput: z.ZodBoolean;
109
+ selectionDefaults: z.ZodBoolean;
110
+ turnOptions: z.ZodBoolean;
111
+ turnSteering: z.ZodBoolean;
112
+ history: z.ZodBoolean;
113
+ fork: z.ZodBoolean;
114
+ compaction: z.ZodBoolean;
115
+ rollback: z.ZodBoolean;
116
+ applicationPolicy: z.ZodBoolean;
117
+ commandCatalog: z.ZodBoolean;
118
+ permissionModes: z.ZodBoolean;
119
+ fileCheckpoints: z.ZodBoolean;
120
+ mcpControl: z.ZodBoolean;
121
+ }, z.core.$strict>;
122
+ }, z.core.$strict>>;
123
+ }, z.core.$strict>;
124
+ export declare function runtimeCapabilities(session: Pick<Session, 'agent' | 'runtime'> & Partial<Pick<Session, 'delegation'>>): RuntimeCapabilities;
@@ -0,0 +1,47 @@
1
+ import type { Session } from "../types.js";
2
+ export type RuntimeMode = 'tui' | 'app-server' | 'native';
3
+ export declare const runtimeModes: {
4
+ claude: {
5
+ native: "native";
6
+ interactive: "tui";
7
+ fallback: "tui";
8
+ creatable: ("native" | "tui")[];
9
+ keepsTerminal: false;
10
+ };
11
+ codex: {
12
+ native: "app-server";
13
+ interactive: "tui";
14
+ fallback: "app-server";
15
+ creatable: "app-server"[];
16
+ keepsTerminal: true;
17
+ };
18
+ opencode: {
19
+ native: "native";
20
+ interactive: null;
21
+ fallback: "native";
22
+ creatable: "native"[];
23
+ keepsTerminal: false;
24
+ };
25
+ custom: {
26
+ native: "native";
27
+ interactive: null;
28
+ fallback: "native";
29
+ creatable: "native"[];
30
+ keepsTerminal: false;
31
+ };
32
+ antigravity: {
33
+ native: "native";
34
+ interactive: null;
35
+ fallback: "native";
36
+ creatable: "native"[];
37
+ keepsTerminal: false;
38
+ };
39
+ };
40
+ /** Whether this session speaks its runtime's own protocol rather than driving a terminal. */
41
+ export declare function hasNativeRuntime(session: Pick<Session, 'agent' | 'runtime'>): boolean;
42
+ /** The mode a create will actually use, so a capability check asks about the session it will make. */
43
+ export declare function resolveRuntimeMode(agent: Session['agent'], requested: RuntimeMode | undefined): RuntimeMode;
44
+ /** Whether this session takes its input through a mailbox rather than through a terminal composer. */
45
+ export declare function hasNoComposer(session: Pick<Session, 'agent' | 'runtime'>): boolean;
46
+ /** Whether an agent and a mode name each other. Used where a bad pair must be refused, not resolved. */
47
+ export declare function runtimeModeIsValid(agent: Session['agent'], mode: RuntimeMode): boolean;
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod';
2
+ export declare const PermissionScopeSchema: z.ZodObject<{
3
+ operation: z.ZodString;
4
+ kind: z.ZodLiteral<"filesystem-patterns">;
5
+ requested: z.ZodObject<{
6
+ patterns: z.ZodArray<z.ZodString>;
7
+ omitted: z.ZodNumber;
8
+ complete: z.ZodBoolean;
9
+ }, z.core.$strict>;
10
+ session: z.ZodObject<{
11
+ patterns: z.ZodArray<z.ZodString>;
12
+ omitted: z.ZodNumber;
13
+ complete: z.ZodBoolean;
14
+ }, z.core.$strict>;
15
+ }, z.core.$strict>;
16
+ export type PermissionScope = z.infer<typeof PermissionScopeSchema>;
17
+ /** Native filesystem patterns are display context, never caller authorization or raw tool input. */
18
+ export declare function openCodePermissionScope(request: {
19
+ permission: string;
20
+ patterns?: string[] | undefined;
21
+ always?: string[] | undefined;
22
+ }): PermissionScope | null;
@@ -0,0 +1,55 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * How much of a subscription plan a runtime says has been used, in one vocabulary.
4
+ *
5
+ * The two runtimes disagree about everything except the percentage. Claude names its windows
6
+ * (`five_hour`, `seven_day`) and leaves the duration implied; Codex numbers them (`primary`,
7
+ * `secondary`) and states the duration explicitly — and a measured `primary` turned out to be the
8
+ * WEEKLY window, so rendering position as duration would have been an invention. So a window here
9
+ * carries its provider's own key AND the duration when the provider declares one; neither is
10
+ * derived from the other.
11
+ *
12
+ * The limit belongs to the ACCOUNT, not to the session that happened to ask. Ten sessions on one
13
+ * account share one window, and ten identical bars beside them is a wrong model rather than a
14
+ * cosmetic issue — which is why the projection travels next to the account label a reader groups on.
15
+ */
16
+ export declare const PlanWindowSchema: z.ZodObject<{
17
+ key: z.ZodString;
18
+ label: z.ZodNullable<z.ZodString>;
19
+ percent: z.ZodNumber;
20
+ windowMinutes: z.ZodNullable<z.ZodNumber>;
21
+ resetsAt: z.ZodNullable<z.ZodISODateTime>;
22
+ scope: z.ZodNullable<z.ZodString>;
23
+ }, z.core.$strict>;
24
+ export type PlanWindow = z.infer<typeof PlanWindowSchema>;
25
+ /**
26
+ * Three answers, kept apart because collapsing any two of them lies to an operator.
27
+ *
28
+ * `known` carries windows. `no-plan-limit` is a session that has no plan window at all — an API
29
+ * key, Bedrock, Vertex — and is not "nothing used yet". `unpublished` is a runtime that does not
30
+ * report the fact, which is not "no limit". A zero would read as an empty window in all three.
31
+ */
32
+ export declare const PlanLimitsSchema: z.ZodObject<{
33
+ answer: z.ZodEnum<{
34
+ known: "known";
35
+ "no-plan-limit": "no-plan-limit";
36
+ unpublished: "unpublished";
37
+ }>;
38
+ plan: z.ZodNullable<z.ZodString>;
39
+ windows: z.ZodArray<z.ZodObject<{
40
+ key: z.ZodString;
41
+ label: z.ZodNullable<z.ZodString>;
42
+ percent: z.ZodNumber;
43
+ windowMinutes: z.ZodNullable<z.ZodNumber>;
44
+ resetsAt: z.ZodNullable<z.ZodISODateTime>;
45
+ scope: z.ZodNullable<z.ZodString>;
46
+ }, z.core.$strict>>;
47
+ observedAt: z.ZodISODateTime;
48
+ source: z.ZodDefault<z.ZodEnum<{
49
+ native: "native";
50
+ probe: "probe";
51
+ statusline: "statusline";
52
+ }>>;
53
+ error: z.ZodDefault<z.ZodNullable<z.ZodString>>;
54
+ }, z.core.$strict>;
55
+ export type PlanLimits = z.infer<typeof PlanLimitsSchema>;