@botpress/adk 1.19.0-beta.9 → 2.0.0-alpha.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/dist/agent-init/agent-project-generator.d.ts +5 -1
- package/dist/agent-init/agent-project-generator.d.ts.map +1 -1
- package/dist/agent-project/agent-project.d.ts +3 -3
- package/dist/agent-project/agent-project.d.ts.map +1 -1
- package/dist/agent-project/agent-resolver.d.ts.map +1 -1
- package/dist/agent-project/config-writer.d.ts +1 -1
- package/dist/agent-project/dependency-state-to-dependencies.d.ts +11 -0
- package/dist/agent-project/dependency-state-to-dependencies.d.ts.map +1 -0
- package/dist/agent-project/types.d.ts +9 -4
- package/dist/agent-project/types.d.ts.map +1 -1
- package/dist/agent0/capabilities/commands/adk-build.md +6 -5
- package/dist/agent0/capabilities/commands/adk-debug.md +1 -1
- package/dist/agent0/capabilities/commands/adk-dev-console.md +1 -1
- package/dist/agent0/capabilities/commands/adk-document.md +10 -2
- package/dist/agent0/capabilities/commands/adk-eval.md +1 -1
- package/dist/agent0/capabilities/commands/adk-explain.md +2 -2
- package/dist/agent0/capabilities/commands/adk-init.md +2 -2
- package/dist/agent0/capabilities/commands/adk-ship.md +1 -1
- package/dist/agent0/capabilities/commands/adk-test.md +3 -3
- package/dist/agent0/capabilities/commands/adk-validate.md +3 -3
- package/dist/agent0/capabilities/skills/adk/SKILL.md +21 -21
- package/dist/agent0/capabilities/skills/adk/references/actions.md +245 -239
- package/dist/agent0/capabilities/skills/adk/references/advanced-patterns.md +185 -218
- package/dist/agent0/capabilities/skills/adk/references/agent-config.md +74 -71
- package/dist/agent0/capabilities/skills/adk/references/assets.md +45 -48
- package/dist/agent0/capabilities/skills/adk/references/autonomous-execution.md +40 -46
- package/dist/agent0/capabilities/skills/adk/references/cli.md +17 -7
- package/dist/agent0/capabilities/skills/adk/references/context-api.md +98 -94
- package/dist/agent0/capabilities/skills/adk/references/conversation-lifecycle.md +65 -62
- package/dist/agent0/capabilities/skills/adk/references/conversations.md +395 -385
- package/dist/agent0/capabilities/skills/adk/references/custom-components.md +1 -1
- package/dist/agent0/capabilities/skills/adk/references/desk.md +236 -234
- package/dist/agent0/capabilities/skills/adk/references/explain-config.md +54 -37
- package/dist/agent0/capabilities/skills/adk/references/files.md +301 -306
- package/dist/agent0/capabilities/skills/adk/references/integration-actions.md +211 -214
- package/dist/agent0/capabilities/skills/adk/references/integrations.md +33 -31
- package/dist/agent0/capabilities/skills/adk/references/interfaces.md +13 -12
- package/dist/agent0/capabilities/skills/adk/references/knowledge-bases.md +98 -111
- package/dist/agent0/capabilities/skills/adk/references/mcp-server.md +6 -0
- package/dist/agent0/capabilities/skills/adk/references/messages.md +280 -256
- package/dist/agent0/capabilities/skills/adk/references/model-configuration.md +52 -49
- package/dist/agent0/capabilities/skills/adk/references/patterns-mistakes.md +102 -101
- package/dist/agent0/capabilities/skills/adk/references/plugins.md +15 -15
- package/dist/agent0/capabilities/skills/adk/references/tables.md +204 -210
- package/dist/agent0/capabilities/skills/adk/references/tags.md +141 -143
- package/dist/agent0/capabilities/skills/adk/references/tools.md +191 -199
- package/dist/agent0/capabilities/skills/adk/references/triggers.md +331 -336
- package/dist/agent0/capabilities/skills/adk/references/workflow-steps.md +132 -96
- package/dist/agent0/capabilities/skills/adk/references/workflows.md +479 -464
- package/dist/agent0/capabilities/skills/adk/references/zai-agent-reference.md +127 -129
- package/dist/agent0/capabilities/skills/adk/references/zai-complete-guide.md +255 -276
- package/dist/agent0/capabilities/skills/adk-debugger/SKILL.md +21 -17
- package/dist/agent0/capabilities/skills/adk-debugger/references/common-failures.md +25 -25
- package/dist/agent0/capabilities/skills/adk-debugger/references/conversation-analysis.md +49 -41
- package/dist/agent0/capabilities/skills/adk-debugger/references/debug-workflow.md +20 -14
- package/dist/agent0/capabilities/skills/adk-debugger/references/llm-debugging.md +13 -13
- package/dist/agent0/capabilities/skills/adk-debugger/references/trace-summarization.md +18 -18
- package/dist/agent0/capabilities/skills/adk-debugger/references/traces-and-logs.md +67 -67
- package/dist/agent0/capabilities/skills/adk-dev-console/SKILL.md +36 -36
- package/dist/agent0/capabilities/skills/adk-dev-console/references/agent-steps.md +14 -6
- package/dist/agent0/capabilities/skills/adk-dev-console/references/multi-agent-dashboard.md +13 -13
- package/dist/agent0/capabilities/skills/adk-dev-console/references/pages.md +18 -0
- package/dist/agent0/capabilities/skills/adk-docs/SKILL.md +13 -13
- package/dist/agent0/capabilities/skills/adk-docs/references/doc-standards.md +15 -0
- package/dist/agent0/capabilities/skills/adk-evals/SKILL.md +29 -23
- package/dist/agent0/capabilities/skills/adk-evals/references/eval-format.md +31 -23
- package/dist/agent0/capabilities/skills/adk-evals/references/test-patterns.md +25 -36
- package/dist/agent0/capabilities/skills/adk-evals/references/testing-workflow.md +6 -4
- package/dist/agent0/index.js +41 -19
- package/dist/agent0/index.js.map +7 -7
- package/dist/agent0/runtime/client.d.ts +2 -0
- package/dist/agent0/runtime/client.d.ts.map +1 -1
- package/dist/agent0/runtime/engine.d.ts +2 -1
- package/dist/agent0/runtime/engine.d.ts.map +1 -1
- package/dist/agent0/runtime/process.d.ts +1 -0
- package/dist/agent0/runtime/process.d.ts.map +1 -1
- package/dist/assets/manager.d.ts +3 -0
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/auth/credentials.d.ts +1 -1
- package/dist/bot-generator/generator.d.ts +22 -0
- package/dist/bot-generator/generator.d.ts.map +1 -1
- package/dist/bot-generator/plugin-sync.d.ts.map +1 -1
- package/dist/commands/base-command.d.ts +1 -0
- package/dist/commands/base-command.d.ts.map +1 -1
- package/dist/commands/bp-dev-command.d.ts +1 -1
- package/dist/commands/bp-dev-command.d.ts.map +1 -1
- package/dist/commands/bp-dev-stderr.d.ts +9 -0
- package/dist/commands/bp-dev-stderr.d.ts.map +1 -1
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/dependencies/catalog/catalog-service.d.ts +53 -0
- package/dist/dependencies/catalog/catalog-service.d.ts.map +1 -0
- package/dist/dependencies/catalog/client-factory.d.ts +33 -0
- package/dist/dependencies/catalog/client-factory.d.ts.map +1 -0
- package/dist/dependencies/catalog/integration-source.d.ts +34 -0
- package/dist/dependencies/catalog/integration-source.d.ts.map +1 -0
- package/dist/dependencies/catalog/interface-source.d.ts +23 -0
- package/dist/dependencies/catalog/interface-source.d.ts.map +1 -0
- package/dist/dependencies/catalog/plugin-source.d.ts +49 -0
- package/dist/dependencies/catalog/plugin-source.d.ts.map +1 -0
- package/dist/dependencies/catalog/resolution-cache.d.ts +76 -0
- package/dist/dependencies/catalog/resolution-cache.d.ts.map +1 -0
- package/dist/dependencies/dependency-manager.d.ts +31 -16
- package/dist/dependencies/dependency-manager.d.ts.map +1 -1
- package/dist/dependencies/errors.d.ts +2 -2
- package/dist/dependencies/errors.d.ts.map +1 -1
- package/dist/dependencies/index.d.ts +5 -4
- package/dist/dependencies/index.d.ts.map +1 -1
- package/dist/dependencies/index.js +2089 -1670
- package/dist/dependencies/index.js.map +37 -30
- package/dist/dependencies/legacy-lock-file.d.ts +15 -0
- package/dist/dependencies/legacy-lock-file.d.ts.map +1 -0
- package/dist/dependencies/migration.d.ts +19 -0
- package/dist/dependencies/migration.d.ts.map +1 -1
- package/dist/dependencies/resolvers/integration-resolver.d.ts +4 -3
- package/dist/dependencies/resolvers/integration-resolver.d.ts.map +1 -1
- package/dist/dependencies/resolvers/plugin-resolver.d.ts +4 -4
- package/dist/dependencies/resolvers/plugin-resolver.d.ts.map +1 -1
- package/dist/dependencies/snapshot-store.d.ts +59 -0
- package/dist/dependencies/snapshot-store.d.ts.map +1 -0
- package/dist/dependencies/status-resolver.d.ts +36 -0
- package/dist/dependencies/status-resolver.d.ts.map +1 -0
- package/dist/dependencies/status.d.ts +214 -0
- package/dist/dependencies/status.d.ts.map +1 -0
- package/dist/dependencies/types.d.ts +380 -29
- package/dist/dependencies/types.d.ts.map +1 -1
- package/dist/file-watcher/watcher.d.ts +21 -5
- package/dist/file-watcher/watcher.d.ts.map +1 -1
- package/dist/generators/action-types.d.ts.map +1 -1
- package/dist/generators/client-wrapper.d.ts.map +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3134 -2226
- package/dist/index.js.map +55 -48
- package/dist/integrations/config-utils.d.ts +11 -7
- package/dist/integrations/config-utils.d.ts.map +1 -1
- package/dist/integrations/hub-cache.d.ts +0 -58
- package/dist/integrations/hub-cache.d.ts.map +1 -1
- package/dist/integrations/index.d.ts +1 -3
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/manager.d.ts +19 -53
- package/dist/integrations/manager.d.ts.map +1 -1
- package/dist/interfaces/enhanced-cache.d.ts +7 -7
- package/dist/interfaces/enhanced-cache.d.ts.map +1 -1
- package/dist/interfaces/manager.d.ts +11 -17
- package/dist/interfaces/manager.d.ts.map +1 -1
- package/dist/knowledge/manager.d.ts +3 -0
- package/dist/knowledge/manager.d.ts.map +1 -1
- package/dist/plugins/index.d.ts +0 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/manager.d.ts +16 -48
- package/dist/plugins/manager.d.ts.map +1 -1
- package/dist/preflight/checker.d.ts +6 -1
- package/dist/preflight/checker.d.ts.map +1 -1
- package/dist/preflight/dependency-gate.d.ts +37 -0
- package/dist/preflight/dependency-gate.d.ts.map +1 -0
- package/dist/preflight/index.d.ts +2 -1
- package/dist/preflight/index.d.ts.map +1 -1
- package/dist/preflight/types.d.ts +18 -0
- package/dist/preflight/types.d.ts.map +1 -1
- package/dist/runner/script-runner.d.ts.map +1 -1
- package/dist/tables/table-manager.d.ts +3 -0
- package/dist/tables/table-manager.d.ts.map +1 -1
- package/dist/templates/README.md +23 -13
- package/dist/templates/blank/agent.config.ts +3 -3
- package/dist/templates/blank/src/triggers/index.ts +1 -1
- package/dist/templates/botpress-desk/evals/index.eval.ts +1 -1
- package/dist/templates/botpress-desk/src/triggers/index.ts +1 -1
- package/dist/templates/crm-enrichment/README.md +3 -3
- package/dist/templates/crm-enrichment/agent.config.ts +2 -2
- package/dist/templates/crm-enrichment/src/conversations/index.ts +1 -1
- package/dist/templates/hello-world/agent.config.ts +3 -3
- package/dist/templates/hello-world/src/triggers/index.ts +1 -1
- package/dist/templates/knowledge-assistant/src/triggers/index.ts +1 -1
- package/dist/templates/template.config.json +3 -3
- package/dist/utils/ids.d.ts +10 -0
- package/dist/utils/ids.d.ts.map +1 -1
- package/dist/workspace/workspace-cache.d.ts +2 -1
- package/dist/workspace/workspace-cache.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/agent-project/lock-to-dependencies.d.ts +0 -11
- package/dist/agent-project/lock-to-dependencies.d.ts.map +0 -1
- package/dist/dependencies/lock-file.d.ts +0 -15
- package/dist/dependencies/lock-file.d.ts.map +0 -1
- package/dist/integrations/enhanced-cache.d.ts +0 -53
- package/dist/integrations/enhanced-cache.d.ts.map +0 -1
- package/dist/plugins/enhanced-cache.d.ts +0 -53
- package/dist/plugins/enhanced-cache.d.ts.map +0 -1
- package/dist/templates/blank/package.json +0 -17
- package/dist/templates/blank/tsconfig.json +0 -25
- package/dist/templates/botpress-desk/package.json +0 -17
- package/dist/templates/crm-enrichment/package.json +0 -18
- package/dist/templates/crm-enrichment/tsconfig.json +0 -25
- package/dist/templates/hello-world/package.json +0 -18
- package/dist/templates/hello-world/tsconfig.json +0 -25
- package/dist/templates/knowledge-assistant/package.json +0 -18
- package/dist/templates/knowledge-assistant/tsconfig.json +0 -25
- package/dist/templates/slack-triage/package.json +0 -18
- package/dist/templates/slack-triage/tsconfig.json +0 -25
|
@@ -1,23 +1,60 @@
|
|
|
1
1
|
import { z } from '@botpress/sdk';
|
|
2
|
+
import type { StatusVerdict } from '@botpress/runtime';
|
|
2
3
|
export type Environment = 'dev' | 'prod';
|
|
3
4
|
export type ResourceType = 'integration' | 'plugin' | 'interface';
|
|
4
|
-
export declare const
|
|
5
|
+
export declare const integrationDependencyEntrySchema: z.ZodObject<{
|
|
5
6
|
name: z.ZodString;
|
|
6
7
|
version: z.ZodString;
|
|
7
8
|
enabled: z.ZodBoolean;
|
|
8
9
|
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
10
|
+
/**
|
|
11
|
+
* Active configuration variant (`configurations[type]`), echoed from Cloud's
|
|
12
|
+
* `getBot` response (WS0). Absent for the default configuration. Lets the
|
|
13
|
+
* status resolver validate against the right variant schema without a cloud
|
|
14
|
+
* roundtrip.
|
|
15
|
+
*/
|
|
16
|
+
configurationType: z.ZodOptional<z.ZodString>;
|
|
17
|
+
/**
|
|
18
|
+
* Cloud's install-time verdict of which required fields were still missing
|
|
19
|
+
* when the integration was last installed/enabled (WS0). Persisted only while
|
|
20
|
+
* the integration stays disabled with unchanged config; the offline status
|
|
21
|
+
* resolver reads it as authoritative (Cloud's actual validation beats the
|
|
22
|
+
* catalog spec, and enumerates fields a client-side schema check can't — e.g.
|
|
23
|
+
* OAuth/identifier credentials). A live (online) build trusts the current
|
|
24
|
+
* cloud state over this snapshot instead.
|
|
25
|
+
*
|
|
26
|
+
* Both fields are additive-optional: old legacy locks omit them and still validate
|
|
27
|
+
* against `version: 1` — no schema bump, no migration.
|
|
28
|
+
*/
|
|
29
|
+
missingFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
30
|
+
/**
|
|
31
|
+
* Last-known authorization state of an OAuth/connection-gated integration
|
|
32
|
+
* (WS5/#7): set on every cloud refresh when the spec gates on an identifier
|
|
33
|
+
* the cloud bot doesn't have yet; cleared the moment the identifier appears
|
|
34
|
+
* (the user completed the connect flow). Lets the offline surfaces
|
|
35
|
+
* (`adk integrations status`, `adk check`, the deploy gate) report the same
|
|
36
|
+
* `unconfigured` verdict the codegen carrier bakes into the runtime, instead
|
|
37
|
+
* of mapping enabled ⟹ available. Additive-optional like the fields above.
|
|
38
|
+
*/
|
|
39
|
+
authorizationPending: z.ZodOptional<z.ZodBoolean>;
|
|
9
40
|
}, "strip", {
|
|
10
41
|
name: string;
|
|
11
42
|
version: string;
|
|
12
43
|
enabled: boolean;
|
|
13
44
|
config: Record<string, any>;
|
|
45
|
+
configurationType?: string | undefined;
|
|
46
|
+
missingFields?: string[] | undefined;
|
|
47
|
+
authorizationPending?: boolean | undefined;
|
|
14
48
|
}, {
|
|
15
49
|
name: string;
|
|
16
50
|
version: string;
|
|
17
51
|
enabled: boolean;
|
|
52
|
+
configurationType?: string | undefined;
|
|
18
53
|
config?: Record<string, any> | undefined;
|
|
54
|
+
missingFields?: string[] | undefined;
|
|
55
|
+
authorizationPending?: boolean | undefined;
|
|
19
56
|
}>;
|
|
20
|
-
export type
|
|
57
|
+
export type IntegrationDependencyEntry = z.infer<typeof integrationDependencyEntrySchema>;
|
|
21
58
|
export declare const pluginDependencyMappingSchema: z.ZodObject<{
|
|
22
59
|
integrationAlias: z.ZodString;
|
|
23
60
|
}, "strip", {
|
|
@@ -26,7 +63,82 @@ export declare const pluginDependencyMappingSchema: z.ZodObject<{
|
|
|
26
63
|
integrationAlias: string;
|
|
27
64
|
}>;
|
|
28
65
|
export type PluginDependencyMapping = z.infer<typeof pluginDependencyMappingSchema>;
|
|
29
|
-
export declare const
|
|
66
|
+
export declare const pluginDependencyEntrySchema: z.ZodObject<{
|
|
67
|
+
name: z.ZodString;
|
|
68
|
+
version: z.ZodString;
|
|
69
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
70
|
+
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
71
|
+
dependencies: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
72
|
+
integrationAlias: z.ZodString;
|
|
73
|
+
}, "strip", {
|
|
74
|
+
integrationAlias: string;
|
|
75
|
+
}, {
|
|
76
|
+
integrationAlias: string;
|
|
77
|
+
}>>>;
|
|
78
|
+
/**
|
|
79
|
+
* Cloud's install-time verdict of which required fields were still missing when
|
|
80
|
+
* the plugin was last installed/enabled (WS0/WS5) — the plugin counterpart of the
|
|
81
|
+
* integration field above, with the same lifecycle: persisted only while the
|
|
82
|
+
* plugin stays disabled with unchanged config, read as authoritative by the
|
|
83
|
+
* offline status resolver, additive-optional (old legacy locks validate unchanged).
|
|
84
|
+
*/
|
|
85
|
+
missingFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
86
|
+
}, "strip", {
|
|
87
|
+
name: string;
|
|
88
|
+
version: string;
|
|
89
|
+
enabled: boolean;
|
|
90
|
+
config: Record<string, any>;
|
|
91
|
+
dependencies: Record<string, {
|
|
92
|
+
integrationAlias: string;
|
|
93
|
+
}>;
|
|
94
|
+
missingFields?: string[] | undefined;
|
|
95
|
+
}, {
|
|
96
|
+
name: string;
|
|
97
|
+
version: string;
|
|
98
|
+
enabled?: boolean | undefined;
|
|
99
|
+
config?: Record<string, any> | undefined;
|
|
100
|
+
dependencies?: Record<string, {
|
|
101
|
+
integrationAlias: string;
|
|
102
|
+
}> | undefined;
|
|
103
|
+
missingFields?: string[] | undefined;
|
|
104
|
+
}>;
|
|
105
|
+
export type PluginDependencyEntry = z.infer<typeof pluginDependencyEntrySchema>;
|
|
106
|
+
export declare const integrationSnapshotEntrySchema: z.ZodObject<{
|
|
107
|
+
name: z.ZodString;
|
|
108
|
+
version: z.ZodString;
|
|
109
|
+
enabled: z.ZodBoolean;
|
|
110
|
+
configurationType: z.ZodOptional<z.ZodString>;
|
|
111
|
+
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
112
|
+
missingFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
113
|
+
authorizationPending: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
cloudAlias: z.ZodOptional<z.ZodString>;
|
|
115
|
+
cloudId: z.ZodOptional<z.ZodString>;
|
|
116
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
117
|
+
}, "strip", {
|
|
118
|
+
name: string;
|
|
119
|
+
version: string;
|
|
120
|
+
enabled: boolean;
|
|
121
|
+
config: Record<string, any>;
|
|
122
|
+
configurationType?: string | undefined;
|
|
123
|
+
missingFields?: string[] | undefined;
|
|
124
|
+
updatedAt?: string | undefined;
|
|
125
|
+
authorizationPending?: boolean | undefined;
|
|
126
|
+
cloudAlias?: string | undefined;
|
|
127
|
+
cloudId?: string | undefined;
|
|
128
|
+
}, {
|
|
129
|
+
name: string;
|
|
130
|
+
version: string;
|
|
131
|
+
enabled: boolean;
|
|
132
|
+
configurationType?: string | undefined;
|
|
133
|
+
config?: Record<string, any> | undefined;
|
|
134
|
+
missingFields?: string[] | undefined;
|
|
135
|
+
updatedAt?: string | undefined;
|
|
136
|
+
authorizationPending?: boolean | undefined;
|
|
137
|
+
cloudAlias?: string | undefined;
|
|
138
|
+
cloudId?: string | undefined;
|
|
139
|
+
}>;
|
|
140
|
+
export type IntegrationSnapshotEntry = z.infer<typeof integrationSnapshotEntrySchema>;
|
|
141
|
+
export declare const pluginSnapshotEntrySchema: z.ZodObject<{
|
|
30
142
|
name: z.ZodString;
|
|
31
143
|
version: z.ZodString;
|
|
32
144
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -38,6 +150,10 @@ export declare const pluginLockEntrySchema: z.ZodObject<{
|
|
|
38
150
|
}, {
|
|
39
151
|
integrationAlias: string;
|
|
40
152
|
}>>>;
|
|
153
|
+
missingFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
154
|
+
cloudAlias: z.ZodOptional<z.ZodString>;
|
|
155
|
+
cloudId: z.ZodOptional<z.ZodString>;
|
|
156
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
41
157
|
}, "strip", {
|
|
42
158
|
name: string;
|
|
43
159
|
version: string;
|
|
@@ -46,6 +162,10 @@ export declare const pluginLockEntrySchema: z.ZodObject<{
|
|
|
46
162
|
dependencies: Record<string, {
|
|
47
163
|
integrationAlias: string;
|
|
48
164
|
}>;
|
|
165
|
+
missingFields?: string[] | undefined;
|
|
166
|
+
updatedAt?: string | undefined;
|
|
167
|
+
cloudAlias?: string | undefined;
|
|
168
|
+
cloudId?: string | undefined;
|
|
49
169
|
}, {
|
|
50
170
|
name: string;
|
|
51
171
|
version: string;
|
|
@@ -54,27 +174,196 @@ export declare const pluginLockEntrySchema: z.ZodObject<{
|
|
|
54
174
|
dependencies?: Record<string, {
|
|
55
175
|
integrationAlias: string;
|
|
56
176
|
}> | undefined;
|
|
177
|
+
missingFields?: string[] | undefined;
|
|
178
|
+
updatedAt?: string | undefined;
|
|
179
|
+
cloudAlias?: string | undefined;
|
|
180
|
+
cloudId?: string | undefined;
|
|
181
|
+
}>;
|
|
182
|
+
export type PluginSnapshotEntry = z.infer<typeof pluginSnapshotEntrySchema>;
|
|
183
|
+
export declare const dependencyStateSchema: z.ZodObject<{
|
|
184
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
185
|
+
version: z.ZodLiteral<1>;
|
|
186
|
+
env: z.ZodEnum<["dev", "prod"]>;
|
|
187
|
+
integrations: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
188
|
+
name: z.ZodString;
|
|
189
|
+
version: z.ZodString;
|
|
190
|
+
enabled: z.ZodBoolean;
|
|
191
|
+
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
192
|
+
/**
|
|
193
|
+
* Active configuration variant (`configurations[type]`), echoed from Cloud's
|
|
194
|
+
* `getBot` response (WS0). Absent for the default configuration. Lets the
|
|
195
|
+
* status resolver validate against the right variant schema without a cloud
|
|
196
|
+
* roundtrip.
|
|
197
|
+
*/
|
|
198
|
+
configurationType: z.ZodOptional<z.ZodString>;
|
|
199
|
+
/**
|
|
200
|
+
* Cloud's install-time verdict of which required fields were still missing
|
|
201
|
+
* when the integration was last installed/enabled (WS0). Persisted only while
|
|
202
|
+
* the integration stays disabled with unchanged config; the offline status
|
|
203
|
+
* resolver reads it as authoritative (Cloud's actual validation beats the
|
|
204
|
+
* catalog spec, and enumerates fields a client-side schema check can't — e.g.
|
|
205
|
+
* OAuth/identifier credentials). A live (online) build trusts the current
|
|
206
|
+
* cloud state over this snapshot instead.
|
|
207
|
+
*
|
|
208
|
+
* Both fields are additive-optional: old legacy locks omit them and still validate
|
|
209
|
+
* against `version: 1` — no schema bump, no migration.
|
|
210
|
+
*/
|
|
211
|
+
missingFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
212
|
+
/**
|
|
213
|
+
* Last-known authorization state of an OAuth/connection-gated integration
|
|
214
|
+
* (WS5/#7): set on every cloud refresh when the spec gates on an identifier
|
|
215
|
+
* the cloud bot doesn't have yet; cleared the moment the identifier appears
|
|
216
|
+
* (the user completed the connect flow). Lets the offline surfaces
|
|
217
|
+
* (`adk integrations status`, `adk check`, the deploy gate) report the same
|
|
218
|
+
* `unconfigured` verdict the codegen carrier bakes into the runtime, instead
|
|
219
|
+
* of mapping enabled ⟹ available. Additive-optional like the fields above.
|
|
220
|
+
*/
|
|
221
|
+
authorizationPending: z.ZodOptional<z.ZodBoolean>;
|
|
222
|
+
}, "strip", {
|
|
223
|
+
name: string;
|
|
224
|
+
version: string;
|
|
225
|
+
enabled: boolean;
|
|
226
|
+
config: Record<string, any>;
|
|
227
|
+
configurationType?: string | undefined;
|
|
228
|
+
missingFields?: string[] | undefined;
|
|
229
|
+
authorizationPending?: boolean | undefined;
|
|
230
|
+
}, {
|
|
231
|
+
name: string;
|
|
232
|
+
version: string;
|
|
233
|
+
enabled: boolean;
|
|
234
|
+
configurationType?: string | undefined;
|
|
235
|
+
config?: Record<string, any> | undefined;
|
|
236
|
+
missingFields?: string[] | undefined;
|
|
237
|
+
authorizationPending?: boolean | undefined;
|
|
238
|
+
}>>>;
|
|
239
|
+
plugins: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
240
|
+
name: z.ZodString;
|
|
241
|
+
version: z.ZodString;
|
|
242
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
243
|
+
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
244
|
+
dependencies: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
245
|
+
integrationAlias: z.ZodString;
|
|
246
|
+
}, "strip", {
|
|
247
|
+
integrationAlias: string;
|
|
248
|
+
}, {
|
|
249
|
+
integrationAlias: string;
|
|
250
|
+
}>>>;
|
|
251
|
+
/**
|
|
252
|
+
* Cloud's install-time verdict of which required fields were still missing when
|
|
253
|
+
* the plugin was last installed/enabled (WS0/WS5) — the plugin counterpart of the
|
|
254
|
+
* integration field above, with the same lifecycle: persisted only while the
|
|
255
|
+
* plugin stays disabled with unchanged config, read as authoritative by the
|
|
256
|
+
* offline status resolver, additive-optional (old legacy locks validate unchanged).
|
|
257
|
+
*/
|
|
258
|
+
missingFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
259
|
+
}, "strip", {
|
|
260
|
+
name: string;
|
|
261
|
+
version: string;
|
|
262
|
+
enabled: boolean;
|
|
263
|
+
config: Record<string, any>;
|
|
264
|
+
dependencies: Record<string, {
|
|
265
|
+
integrationAlias: string;
|
|
266
|
+
}>;
|
|
267
|
+
missingFields?: string[] | undefined;
|
|
268
|
+
}, {
|
|
269
|
+
name: string;
|
|
270
|
+
version: string;
|
|
271
|
+
enabled?: boolean | undefined;
|
|
272
|
+
config?: Record<string, any> | undefined;
|
|
273
|
+
dependencies?: Record<string, {
|
|
274
|
+
integrationAlias: string;
|
|
275
|
+
}> | undefined;
|
|
276
|
+
missingFields?: string[] | undefined;
|
|
277
|
+
}>>>;
|
|
278
|
+
}, "strip", {
|
|
279
|
+
version: 1;
|
|
280
|
+
integrations: Record<string, {
|
|
281
|
+
name: string;
|
|
282
|
+
version: string;
|
|
283
|
+
enabled: boolean;
|
|
284
|
+
config: Record<string, any>;
|
|
285
|
+
configurationType?: string | undefined;
|
|
286
|
+
missingFields?: string[] | undefined;
|
|
287
|
+
authorizationPending?: boolean | undefined;
|
|
288
|
+
}>;
|
|
289
|
+
plugins: Record<string, {
|
|
290
|
+
name: string;
|
|
291
|
+
version: string;
|
|
292
|
+
enabled: boolean;
|
|
293
|
+
config: Record<string, any>;
|
|
294
|
+
dependencies: Record<string, {
|
|
295
|
+
integrationAlias: string;
|
|
296
|
+
}>;
|
|
297
|
+
missingFields?: string[] | undefined;
|
|
298
|
+
}>;
|
|
299
|
+
env: "dev" | "prod";
|
|
300
|
+
$schema?: string | undefined;
|
|
301
|
+
}, {
|
|
302
|
+
version: 1;
|
|
303
|
+
env: "dev" | "prod";
|
|
304
|
+
integrations?: Record<string, {
|
|
305
|
+
name: string;
|
|
306
|
+
version: string;
|
|
307
|
+
enabled: boolean;
|
|
308
|
+
configurationType?: string | undefined;
|
|
309
|
+
config?: Record<string, any> | undefined;
|
|
310
|
+
missingFields?: string[] | undefined;
|
|
311
|
+
authorizationPending?: boolean | undefined;
|
|
312
|
+
}> | undefined;
|
|
313
|
+
plugins?: Record<string, {
|
|
314
|
+
name: string;
|
|
315
|
+
version: string;
|
|
316
|
+
enabled?: boolean | undefined;
|
|
317
|
+
config?: Record<string, any> | undefined;
|
|
318
|
+
dependencies?: Record<string, {
|
|
319
|
+
integrationAlias: string;
|
|
320
|
+
}> | undefined;
|
|
321
|
+
missingFields?: string[] | undefined;
|
|
322
|
+
}> | undefined;
|
|
323
|
+
$schema?: string | undefined;
|
|
57
324
|
}>;
|
|
58
|
-
export type
|
|
59
|
-
export declare const
|
|
325
|
+
export type DependencyStateData = z.infer<typeof dependencyStateSchema>;
|
|
326
|
+
export declare const dependencySnapshotSchema: z.ZodObject<{
|
|
60
327
|
$schema: z.ZodOptional<z.ZodString>;
|
|
61
328
|
version: z.ZodLiteral<1>;
|
|
62
329
|
env: z.ZodEnum<["dev", "prod"]>;
|
|
330
|
+
botId: z.ZodString;
|
|
331
|
+
fetchedAt: z.ZodString;
|
|
332
|
+
botUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
333
|
+
stale: z.ZodOptional<z.ZodBoolean>;
|
|
63
334
|
integrations: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
64
335
|
name: z.ZodString;
|
|
65
336
|
version: z.ZodString;
|
|
66
337
|
enabled: z.ZodBoolean;
|
|
338
|
+
configurationType: z.ZodOptional<z.ZodString>;
|
|
67
339
|
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
340
|
+
missingFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
341
|
+
authorizationPending: z.ZodOptional<z.ZodBoolean>;
|
|
342
|
+
cloudAlias: z.ZodOptional<z.ZodString>;
|
|
343
|
+
cloudId: z.ZodOptional<z.ZodString>;
|
|
344
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
68
345
|
}, "strip", {
|
|
69
346
|
name: string;
|
|
70
347
|
version: string;
|
|
71
348
|
enabled: boolean;
|
|
72
349
|
config: Record<string, any>;
|
|
350
|
+
configurationType?: string | undefined;
|
|
351
|
+
missingFields?: string[] | undefined;
|
|
352
|
+
updatedAt?: string | undefined;
|
|
353
|
+
authorizationPending?: boolean | undefined;
|
|
354
|
+
cloudAlias?: string | undefined;
|
|
355
|
+
cloudId?: string | undefined;
|
|
73
356
|
}, {
|
|
74
357
|
name: string;
|
|
75
358
|
version: string;
|
|
76
359
|
enabled: boolean;
|
|
360
|
+
configurationType?: string | undefined;
|
|
77
361
|
config?: Record<string, any> | undefined;
|
|
362
|
+
missingFields?: string[] | undefined;
|
|
363
|
+
updatedAt?: string | undefined;
|
|
364
|
+
authorizationPending?: boolean | undefined;
|
|
365
|
+
cloudAlias?: string | undefined;
|
|
366
|
+
cloudId?: string | undefined;
|
|
78
367
|
}>>>;
|
|
79
368
|
plugins: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
80
369
|
name: z.ZodString;
|
|
@@ -88,6 +377,10 @@ export declare const lockFileSchema: z.ZodObject<{
|
|
|
88
377
|
}, {
|
|
89
378
|
integrationAlias: string;
|
|
90
379
|
}>>>;
|
|
380
|
+
missingFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
381
|
+
cloudAlias: z.ZodOptional<z.ZodString>;
|
|
382
|
+
cloudId: z.ZodOptional<z.ZodString>;
|
|
383
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
91
384
|
}, "strip", {
|
|
92
385
|
name: string;
|
|
93
386
|
version: string;
|
|
@@ -96,6 +389,10 @@ export declare const lockFileSchema: z.ZodObject<{
|
|
|
96
389
|
dependencies: Record<string, {
|
|
97
390
|
integrationAlias: string;
|
|
98
391
|
}>;
|
|
392
|
+
missingFields?: string[] | undefined;
|
|
393
|
+
updatedAt?: string | undefined;
|
|
394
|
+
cloudAlias?: string | undefined;
|
|
395
|
+
cloudId?: string | undefined;
|
|
99
396
|
}, {
|
|
100
397
|
name: string;
|
|
101
398
|
version: string;
|
|
@@ -104,14 +401,25 @@ export declare const lockFileSchema: z.ZodObject<{
|
|
|
104
401
|
dependencies?: Record<string, {
|
|
105
402
|
integrationAlias: string;
|
|
106
403
|
}> | undefined;
|
|
404
|
+
missingFields?: string[] | undefined;
|
|
405
|
+
updatedAt?: string | undefined;
|
|
406
|
+
cloudAlias?: string | undefined;
|
|
407
|
+
cloudId?: string | undefined;
|
|
107
408
|
}>>>;
|
|
108
409
|
}, "strip", {
|
|
410
|
+
botId: string;
|
|
109
411
|
version: 1;
|
|
110
412
|
integrations: Record<string, {
|
|
111
413
|
name: string;
|
|
112
414
|
version: string;
|
|
113
415
|
enabled: boolean;
|
|
114
416
|
config: Record<string, any>;
|
|
417
|
+
configurationType?: string | undefined;
|
|
418
|
+
missingFields?: string[] | undefined;
|
|
419
|
+
updatedAt?: string | undefined;
|
|
420
|
+
authorizationPending?: boolean | undefined;
|
|
421
|
+
cloudAlias?: string | undefined;
|
|
422
|
+
cloudId?: string | undefined;
|
|
115
423
|
}>;
|
|
116
424
|
plugins: Record<string, {
|
|
117
425
|
name: string;
|
|
@@ -121,17 +429,32 @@ export declare const lockFileSchema: z.ZodObject<{
|
|
|
121
429
|
dependencies: Record<string, {
|
|
122
430
|
integrationAlias: string;
|
|
123
431
|
}>;
|
|
432
|
+
missingFields?: string[] | undefined;
|
|
433
|
+
updatedAt?: string | undefined;
|
|
434
|
+
cloudAlias?: string | undefined;
|
|
435
|
+
cloudId?: string | undefined;
|
|
124
436
|
}>;
|
|
125
437
|
env: "dev" | "prod";
|
|
438
|
+
fetchedAt: string;
|
|
126
439
|
$schema?: string | undefined;
|
|
440
|
+
botUpdatedAt?: string | undefined;
|
|
441
|
+
stale?: boolean | undefined;
|
|
127
442
|
}, {
|
|
443
|
+
botId: string;
|
|
128
444
|
version: 1;
|
|
129
445
|
env: "dev" | "prod";
|
|
446
|
+
fetchedAt: string;
|
|
130
447
|
integrations?: Record<string, {
|
|
131
448
|
name: string;
|
|
132
449
|
version: string;
|
|
133
450
|
enabled: boolean;
|
|
451
|
+
configurationType?: string | undefined;
|
|
134
452
|
config?: Record<string, any> | undefined;
|
|
453
|
+
missingFields?: string[] | undefined;
|
|
454
|
+
updatedAt?: string | undefined;
|
|
455
|
+
authorizationPending?: boolean | undefined;
|
|
456
|
+
cloudAlias?: string | undefined;
|
|
457
|
+
cloudId?: string | undefined;
|
|
135
458
|
}> | undefined;
|
|
136
459
|
plugins?: Record<string, {
|
|
137
460
|
name: string;
|
|
@@ -141,10 +464,43 @@ export declare const lockFileSchema: z.ZodObject<{
|
|
|
141
464
|
dependencies?: Record<string, {
|
|
142
465
|
integrationAlias: string;
|
|
143
466
|
}> | undefined;
|
|
467
|
+
missingFields?: string[] | undefined;
|
|
468
|
+
updatedAt?: string | undefined;
|
|
469
|
+
cloudAlias?: string | undefined;
|
|
470
|
+
cloudId?: string | undefined;
|
|
144
471
|
}> | undefined;
|
|
145
472
|
$schema?: string | undefined;
|
|
473
|
+
botUpdatedAt?: string | undefined;
|
|
474
|
+
stale?: boolean | undefined;
|
|
475
|
+
}>;
|
|
476
|
+
export type DependencySnapshotData = z.infer<typeof dependencySnapshotSchema>;
|
|
477
|
+
export declare const dependencyMigrationMarkerSchema: z.ZodObject<{
|
|
478
|
+
version: z.ZodLiteral<1>;
|
|
479
|
+
migratedAt: z.ZodString;
|
|
480
|
+
sources: z.ZodArray<z.ZodEnum<["lock", "agentConfig", "cloud"]>, "many">;
|
|
481
|
+
}, "strip", {
|
|
482
|
+
version: 1;
|
|
483
|
+
migratedAt: string;
|
|
484
|
+
sources: ("lock" | "agentConfig" | "cloud")[];
|
|
485
|
+
}, {
|
|
486
|
+
version: 1;
|
|
487
|
+
migratedAt: string;
|
|
488
|
+
sources: ("lock" | "agentConfig" | "cloud")[];
|
|
146
489
|
}>;
|
|
147
|
-
export type
|
|
490
|
+
export type DependencyMigrationMarker = z.infer<typeof dependencyMigrationMarkerSchema>;
|
|
491
|
+
/**
|
|
492
|
+
* A dependency's capability state plus its identity — the flat record surfaced
|
|
493
|
+
* by `adk integrations status --format=json`, the deploy plan, and `adk check`.
|
|
494
|
+
* Embeds the same {@link StatusVerdict} the runtime carrier uses so the build,
|
|
495
|
+
* CLI, and runtime surfaces cannot disagree. Field names are a public contract.
|
|
496
|
+
*/
|
|
497
|
+
export interface DependencyStatus extends StatusVerdict {
|
|
498
|
+
type: ResourceType;
|
|
499
|
+
alias: string;
|
|
500
|
+
name: string;
|
|
501
|
+
version: string;
|
|
502
|
+
enabled: boolean;
|
|
503
|
+
}
|
|
148
504
|
export interface AddSpec {
|
|
149
505
|
name: string;
|
|
150
506
|
version?: string;
|
|
@@ -166,7 +522,7 @@ export interface MutationResult {
|
|
|
166
522
|
name: string;
|
|
167
523
|
version: string;
|
|
168
524
|
};
|
|
169
|
-
|
|
525
|
+
stateChange?: {
|
|
170
526
|
before: unknown;
|
|
171
527
|
after: unknown;
|
|
172
528
|
};
|
|
@@ -176,52 +532,43 @@ export interface MutationResult {
|
|
|
176
532
|
integrationAlias: string;
|
|
177
533
|
}>;
|
|
178
534
|
/**
|
|
179
|
-
* Set when
|
|
180
|
-
* the enable due to missing required configuration.
|
|
535
|
+
* Set when a dependency (integration or plugin) was installed but left disabled
|
|
536
|
+
* because Cloud rejected the enable due to missing required configuration.
|
|
537
|
+
* Mirrors the Integration Hub UI behavior.
|
|
181
538
|
*/
|
|
182
539
|
installedDisabled?: {
|
|
183
540
|
missingFields: string[];
|
|
184
541
|
};
|
|
542
|
+
/**
|
|
543
|
+
* Set when an OAuth/connection-gated integration was installed disabled because
|
|
544
|
+
* the user hasn't completed the connect flow yet (WS5/#7). The snapshot entry
|
|
545
|
+
* carries `authorizationPending: true` until the cloud bot gains an identifier.
|
|
546
|
+
*/
|
|
547
|
+
installedAwaitingAuthorization?: boolean;
|
|
185
548
|
}
|
|
186
549
|
export interface DiffResult {
|
|
187
550
|
target: Environment;
|
|
188
|
-
|
|
551
|
+
snapshotReflectsCloud: boolean;
|
|
189
552
|
delta: {
|
|
190
|
-
|
|
553
|
+
addedInSnapshot: Array<{
|
|
191
554
|
type: ResourceType;
|
|
192
555
|
alias: string;
|
|
193
556
|
name: string;
|
|
194
557
|
version: string;
|
|
195
558
|
}>;
|
|
196
|
-
|
|
559
|
+
removedInSnapshot: Array<{
|
|
197
560
|
type: ResourceType;
|
|
198
561
|
alias: string;
|
|
199
562
|
name: string;
|
|
200
563
|
version: string;
|
|
201
564
|
}>;
|
|
202
|
-
|
|
565
|
+
changedInSnapshot: Array<{
|
|
203
566
|
type: ResourceType;
|
|
204
567
|
alias: string;
|
|
205
568
|
field: string;
|
|
206
569
|
}>;
|
|
207
570
|
};
|
|
208
571
|
}
|
|
209
|
-
export interface SyncResult {
|
|
210
|
-
target: Environment;
|
|
211
|
-
updated: Array<{
|
|
212
|
-
type: ResourceType;
|
|
213
|
-
alias: string;
|
|
214
|
-
}>;
|
|
215
|
-
added: Array<{
|
|
216
|
-
type: ResourceType;
|
|
217
|
-
alias: string;
|
|
218
|
-
}>;
|
|
219
|
-
removed: Array<{
|
|
220
|
-
type: ResourceType;
|
|
221
|
-
alias: string;
|
|
222
|
-
}>;
|
|
223
|
-
dryRun: boolean;
|
|
224
|
-
}
|
|
225
572
|
export interface ApplyAction {
|
|
226
573
|
type: ResourceType;
|
|
227
574
|
alias: string;
|
|
@@ -236,6 +583,7 @@ export interface ApplyResult {
|
|
|
236
583
|
action: ApplyAction;
|
|
237
584
|
code: string;
|
|
238
585
|
message: string;
|
|
586
|
+
suggestion?: string;
|
|
239
587
|
}>;
|
|
240
588
|
dryRun: boolean;
|
|
241
589
|
}
|
|
@@ -249,5 +597,8 @@ export interface MigrationResult {
|
|
|
249
597
|
env: Environment;
|
|
250
598
|
reason: string;
|
|
251
599
|
}>;
|
|
600
|
+
legacySources?: Array<'lock' | 'agentConfig'>;
|
|
601
|
+
snapshotWrites?: Environment[];
|
|
602
|
+
cloudWrites?: Environment[];
|
|
252
603
|
}
|
|
253
604
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dependencies/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dependencies/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAA;AACjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEtD,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,CAAA;AACxC,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,QAAQ,GAAG,WAAW,CAAA;AAEjE,eAAO,MAAM,gCAAgC;;;;;IAK3C;;;;;OAKG;;IAEH;;;;;;;;;;;OAWG;;IAEH;;;;;;;;OAQG;;;;;;;;;;;;;;;;;;EAEH,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAEzF,eAAO,MAAM,6BAA6B;;;;;;EAExC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAA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AE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC1F,MAAM,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,WAAW,EAAE,CAAA;IACvB,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAClD,OAAO,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,WAAW,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACpD,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,aAAa,CAAC,CAAA;IAC7C,cAAc,CAAC,EAAE,WAAW,EAAE,CAAA;IAC9B,WAAW,CAAC,EAAE,WAAW,EAAE,CAAA;CAC5B"}
|
|
@@ -28,6 +28,7 @@ export declare class FileWatcher extends EventEmitter {
|
|
|
28
28
|
private debounceMs;
|
|
29
29
|
private debounceTimer;
|
|
30
30
|
private pendingChanges;
|
|
31
|
+
private pendingRootMtimeCheck;
|
|
31
32
|
constructor(options: FileWatcherOptions);
|
|
32
33
|
/**
|
|
33
34
|
* Start watching files
|
|
@@ -38,9 +39,20 @@ export declare class FileWatcher extends EventEmitter {
|
|
|
38
39
|
*/
|
|
39
40
|
private initializeDirectoryState;
|
|
40
41
|
/**
|
|
41
|
-
* Watch
|
|
42
|
+
* Watch the project-root config files (package.json, agent.json,
|
|
43
|
+
* agent.config.ts) via a single non-recursive directory watcher, filtered by
|
|
44
|
+
* name. Events for anything else in the root (temp files, node_modules
|
|
45
|
+
* shuffles) are ignored. Directory watches report renames by NAME, so atomic
|
|
46
|
+
* saves keep working — and a root file created later is picked up too.
|
|
42
47
|
*/
|
|
43
|
-
private
|
|
48
|
+
private watchRootFiles;
|
|
49
|
+
/**
|
|
50
|
+
* Coalesce root mtime sweeps: mark one pending and piggyback on the next
|
|
51
|
+
* debounce tick. Multiple rapid root events (both halves of an atomic save,
|
|
52
|
+
* node_modules churn) collapse into a single stat sweep.
|
|
53
|
+
*/
|
|
54
|
+
private scheduleRootMtimeCheck;
|
|
55
|
+
private checkRootFilesByMtime;
|
|
44
56
|
/**
|
|
45
57
|
* Watch a directory recursively
|
|
46
58
|
*/
|
|
@@ -54,8 +66,10 @@ export declare class FileWatcher extends EventEmitter {
|
|
|
54
66
|
*/
|
|
55
67
|
private emitPendingChanges;
|
|
56
68
|
/**
|
|
57
|
-
* Scan a directory for
|
|
58
|
-
*
|
|
69
|
+
* Scan a directory for added, deleted, or silently-replaced files compared
|
|
70
|
+
* to tracked state. Used on Linux where fs.watch reports directory-level
|
|
71
|
+
* events, and on macOS to recover atomic saves whose rename target never
|
|
72
|
+
* got its own event (modification detected by mtime, see handleFileChange).
|
|
59
73
|
*/
|
|
60
74
|
private scanDirectoryForChanges;
|
|
61
75
|
/**
|
|
@@ -63,7 +77,9 @@ export declare class FileWatcher extends EventEmitter {
|
|
|
63
77
|
*/
|
|
64
78
|
private scheduleDebouncedEmit;
|
|
65
79
|
/**
|
|
66
|
-
* Update internal file state tracking
|
|
80
|
+
* Update internal file state tracking. Stores the file's mtime (not the
|
|
81
|
+
* observation time) so scanDirectoryForChanges can detect files replaced
|
|
82
|
+
* behind the watcher's back by comparing against the current mtime.
|
|
67
83
|
*/
|
|
68
84
|
private updateFileState;
|
|
69
85
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watcher.d.ts","sourceRoot":"","sources":["../../src/file-watcher/watcher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAIrC,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;AAE9D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,eAAe,CAAA;CACtB;AAED,MAAM,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G;IACH,KAAK,IAAI,IAAI;IAmCb;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAiBhC;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;IA2BtB;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAQ9B,OAAO,CAAC,qBAAqB;IA+B7B;;OAEG;IACH,OAAO,CAAC,cAAc;IAmBtB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAyDxB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAwB1B;;;;;OAKG;IACH,OAAO,CAAC,uBAAuB;IAsD/B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAS7B;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAUvB;;OAEG;IACH,IAAI,IAAI,IAAI;IAiBZ;;OAEG;IACH,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,GAAG,IAAI;IAIrE;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,GAAG,OAAO;CAGtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-types.d.ts","sourceRoot":"","sources":["../../src/generators/action-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"action-types.d.ts","sourceRoot":"","sources":["../../src/generators/action-types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAOhE,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA+E9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-wrapper.d.ts","sourceRoot":"","sources":["../../src/generators/client-wrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client-wrapper.d.ts","sourceRoot":"","sources":["../../src/generators/client-wrapper.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAWhE,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA4dhF"}
|