@bluelibs/runner-dev 6.1.0 → 6.2.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/AI.md +9 -1
- package/README.md +14 -4
- package/dist/cli/generators/scaffold/templates/README.md.js +7 -4
- package/dist/cli/generators/scaffold/templates/README.md.js.map +1 -1
- package/dist/cli/generators/scaffold/templates/index.d.ts +0 -2
- package/dist/cli/generators/scaffold/templates/index.js +1 -5
- package/dist/cli/generators/scaffold/templates/index.js.map +1 -1
- package/dist/cli/generators/scaffold/templates/package.json.d.ts +6 -8
- package/dist/cli/generators/scaffold/templates/package.json.js +6 -8
- package/dist/cli/generators/scaffold/templates/package.json.js.map +1 -1
- package/dist/cli/generators/scaffold/templates/src/main.test.ts.js +3 -1
- package/dist/cli/generators/scaffold/templates/src/main.test.ts.js.map +1 -1
- package/dist/cli/generators/scaffold/templates/src/main.ts.js +1 -1
- package/dist/cli/generators/scaffold.js +0 -2
- package/dist/cli/generators/scaffold.js.map +1 -1
- package/dist/cli/init.js +1 -2
- package/dist/cli/init.js.map +1 -1
- package/dist/cli.js +0 -0
- package/dist/generated/resolvers-types.d.ts +13 -13
- package/dist/index.d.ts +1 -1
- package/dist/resources/cli.config.resource.js +1 -1
- package/dist/resources/cli.config.resource.js.map +1 -1
- package/dist/resources/coverage.resource.js +1 -1
- package/dist/resources/coverage.resource.js.map +1 -1
- package/dist/resources/dev.resource.d.ts +1 -1
- package/dist/resources/dev.resource.js +1 -1
- package/dist/resources/dev.resource.js.map +1 -1
- package/dist/resources/docs.generator.resource.js +1 -1
- package/dist/resources/docs.generator.resource.js.map +1 -1
- package/dist/resources/graphql-accumulator.resource.js +1 -1
- package/dist/resources/graphql-accumulator.resource.js.map +1 -1
- package/dist/resources/graphql.cli.resource.js +1 -1
- package/dist/resources/graphql.cli.resource.js.map +1 -1
- package/dist/resources/graphql.query.cli.task.d.ts +2 -4
- package/dist/resources/graphql.query.cli.task.js +1 -1
- package/dist/resources/graphql.query.cli.task.js.map +1 -1
- package/dist/resources/graphql.query.task.d.ts +2 -4
- package/dist/resources/graphql.query.task.js +1 -1
- package/dist/resources/graphql.query.task.js.map +1 -1
- package/dist/resources/http.tag.js +1 -1
- package/dist/resources/http.tag.js.map +1 -1
- package/dist/resources/introspector.cli.resource.js +1 -1
- package/dist/resources/introspector.cli.resource.js.map +1 -1
- package/dist/resources/introspector.resource.js +1 -1
- package/dist/resources/introspector.resource.js.map +1 -1
- package/dist/resources/live.resource.js +3 -3
- package/dist/resources/live.resource.js.map +1 -1
- package/dist/resources/models/Introspector.d.ts +4 -4
- package/dist/resources/models/Introspector.js +17 -11
- package/dist/resources/models/Introspector.js.map +1 -1
- package/dist/resources/models/durable.tools.js +3 -1
- package/dist/resources/models/durable.tools.js.map +1 -1
- package/dist/resources/models/initializeFromStore.utils.js +30 -11
- package/dist/resources/models/initializeFromStore.utils.js.map +1 -1
- package/dist/resources/models/introspector.tools.js +15 -15
- package/dist/resources/models/introspector.tools.js.map +1 -1
- package/dist/resources/routeHandlers/registerHttpRoutes.hook.js +1 -1
- package/dist/resources/routeHandlers/registerHttpRoutes.hook.js.map +1 -1
- package/dist/resources/server.resource.js +1 -1
- package/dist/resources/server.resource.js.map +1 -1
- package/dist/resources/swap.cli.resource.js +1 -1
- package/dist/resources/swap.cli.resource.js.map +1 -1
- package/dist/resources/swap.resource.js +1 -1
- package/dist/resources/swap.resource.js.map +1 -1
- package/dist/resources/telemetry.resource.js +27 -6
- package/dist/resources/telemetry.resource.js.map +1 -1
- package/dist/runtime/symbolMetadata.d.ts +1 -0
- package/dist/{architect/core/interfaces.js → runtime/symbolMetadata.js} +1 -1
- package/dist/runtime/symbolMetadata.js.map +1 -0
- package/dist/schema/query.js +3 -1
- package/dist/schema/query.js.map +1 -1
- package/dist/schema/types/AsyncContextType.js +21 -17
- package/dist/schema/types/AsyncContextType.js.map +1 -1
- package/dist/ui/.vite/manifest.json +2 -2
- package/dist/ui/assets/{docs-CipvKUxZ.css → docs-CWJO6emS.css} +1 -1
- package/dist/ui/assets/{docs-CHvYnckk.js → docs-Zej7hPlV.js} +52 -52
- package/dist/ui/assets/{docs-CHvYnckk.js.map → docs-Zej7hPlV.js.map} +1 -1
- package/dist/utils/lane-resources.js +9 -1
- package/dist/utils/lane-resources.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +11 -9
- package/readmes/runner-AI.md +544 -367
- package/readmes/runner-durable-workflows.md +2 -2
- package/readmes/runner-full-guide.md +3620 -3479
- package/readmes/runner-remote-lanes.md +15 -14
- package/dist/app/tasks/create-user.task.d.ts +0 -5
- package/dist/app/tasks/create-user.task.js +0 -20
- package/dist/app/tasks/create-user.task.js.map +0 -1
- package/dist/app/tasks/index.d.ts +0 -1
- package/dist/app/tasks/index.js +0 -18
- package/dist/app/tasks/index.js.map +0 -1
- package/dist/architect/core/errors.d.ts +0 -39
- package/dist/architect/core/errors.js +0 -143
- package/dist/architect/core/errors.js.map +0 -1
- package/dist/architect/core/index.d.ts +0 -3
- package/dist/architect/core/index.js +0 -21
- package/dist/architect/core/index.js.map +0 -1
- package/dist/architect/core/interfaces.d.ts +0 -158
- package/dist/architect/core/interfaces.js.map +0 -1
- package/dist/architect/core/types.d.ts +0 -544
- package/dist/architect/core/types.js +0 -49
- package/dist/architect/core/types.js.map +0 -1
- package/dist/architect/execution/executor.d.ts +0 -23
- package/dist/architect/execution/executor.js +0 -476
- package/dist/architect/execution/executor.js.map +0 -1
- package/dist/architect/execution/index.d.ts +0 -1
- package/dist/architect/execution/index.js +0 -19
- package/dist/architect/execution/index.js.map +0 -1
- package/dist/architect/executor.d.ts +0 -7
- package/dist/architect/executor.js +0 -150
- package/dist/architect/executor.js.map +0 -1
- package/dist/architect/index.d.ts +0 -45
- package/dist/architect/index.js +0 -76
- package/dist/architect/index.js.map +0 -1
- package/dist/architect/llmClient.d.ts +0 -10
- package/dist/architect/llmClient.js +0 -33
- package/dist/architect/llmClient.js.map +0 -1
- package/dist/architect/models/base.d.ts +0 -16
- package/dist/architect/models/base.js +0 -68
- package/dist/architect/models/base.js.map +0 -1
- package/dist/architect/models/factory.d.ts +0 -16
- package/dist/architect/models/factory.js +0 -73
- package/dist/architect/models/factory.js.map +0 -1
- package/dist/architect/models/index.d.ts +0 -3
- package/dist/architect/models/index.js +0 -21
- package/dist/architect/models/index.js.map +0 -1
- package/dist/architect/models/openai.d.ts +0 -7
- package/dist/architect/models/openai.js +0 -71
- package/dist/architect/models/openai.js.map +0 -1
- package/dist/architect/planner.d.ts +0 -9
- package/dist/architect/planner.js +0 -42
- package/dist/architect/planner.js.map +0 -1
- package/dist/architect/planning/index.d.ts +0 -4
- package/dist/architect/planning/index.js +0 -22
- package/dist/architect/planning/index.js.map +0 -1
- package/dist/architect/planning/optimizer.d.ts +0 -14
- package/dist/architect/planning/optimizer.js +0 -275
- package/dist/architect/planning/optimizer.js.map +0 -1
- package/dist/architect/planning/planner.d.ts +0 -15
- package/dist/architect/planning/planner.js +0 -124
- package/dist/architect/planning/planner.js.map +0 -1
- package/dist/architect/planning/prompts.d.ts +0 -6
- package/dist/architect/planning/prompts.js +0 -111
- package/dist/architect/planning/prompts.js.map +0 -1
- package/dist/architect/planning/validator.d.ts +0 -16
- package/dist/architect/planning/validator.js +0 -331
- package/dist/architect/planning/validator.js.map +0 -1
- package/dist/architect/prompt.d.ts +0 -1
- package/dist/architect/prompt.js +0 -13
- package/dist/architect/prompt.js.map +0 -1
- package/dist/architect/types.d.ts +0 -4
- package/dist/architect/types.js +0 -24
- package/dist/architect/types.js.map +0 -1
- package/dist/cli/generators/scaffold/templates/jest.config.cjs.d.ts +0 -1
- package/dist/cli/generators/scaffold/templates/jest.config.cjs.js +0 -24
- package/dist/cli/generators/scaffold/templates/jest.config.cjs.js.map +0 -1
- package/dist/cli/generators/scaffold/templates/tsconfig.jest.json.d.ts +0 -11
- package/dist/cli/generators/scaffold/templates/tsconfig.jest.json.js +0 -17
- package/dist/cli/generators/scaffold/templates/tsconfig.jest.json.js.map +0 -1
- package/dist/client/documentation.d.ts +0 -8
- package/dist/client/documentation.js +0 -144
- package/dist/client/documentation.js.map +0 -1
- package/dist/components/Documentation/Documentation.d.ts +0 -8
- package/dist/components/Documentation/Documentation.js +0 -283
- package/dist/components/Documentation/Documentation.js.map +0 -1
- package/dist/components/Documentation/components/DiagnosticsPanel.d.ts +0 -7
- package/dist/components/Documentation/components/DiagnosticsPanel.js +0 -189
- package/dist/components/Documentation/components/DiagnosticsPanel.js.map +0 -1
- package/dist/components/Documentation/components/EventCard.d.ts +0 -8
- package/dist/components/Documentation/components/EventCard.js +0 -290
- package/dist/components/Documentation/components/EventCard.js.map +0 -1
- package/dist/components/Documentation/components/HookCard.d.ts +0 -8
- package/dist/components/Documentation/components/HookCard.js +0 -282
- package/dist/components/Documentation/components/HookCard.js.map +0 -1
- package/dist/components/Documentation/components/MiddlewareCard.d.ts +0 -8
- package/dist/components/Documentation/components/MiddlewareCard.js +0 -314
- package/dist/components/Documentation/components/MiddlewareCard.js.map +0 -1
- package/dist/components/Documentation/components/ResourceCard.d.ts +0 -8
- package/dist/components/Documentation/components/ResourceCard.js +0 -228
- package/dist/components/Documentation/components/ResourceCard.js.map +0 -1
- package/dist/components/Documentation/components/Sidebar.d.ts +0 -13
- package/dist/components/Documentation/components/Sidebar.js +0 -165
- package/dist/components/Documentation/components/Sidebar.js.map +0 -1
- package/dist/components/Documentation/components/TagCard.d.ts +0 -7
- package/dist/components/Documentation/components/TagCard.js +0 -75
- package/dist/components/Documentation/components/TagCard.js.map +0 -1
- package/dist/components/Documentation/components/TaskCard.d.ts +0 -8
- package/dist/components/Documentation/components/TaskCard.js +0 -196
- package/dist/components/Documentation/components/TaskCard.js.map +0 -1
- package/dist/components/Documentation/index.d.ts +0 -2
- package/dist/components/Documentation/index.js +0 -6
- package/dist/components/Documentation/index.js.map +0 -1
- package/dist/components/Documentation/utils/formatting.d.ts +0 -8
- package/dist/components/Documentation/utils/formatting.js +0 -84
- package/dist/components/Documentation/utils/formatting.js.map +0 -1
- package/dist/components/ExampleComponent.d.ts +0 -10
- package/dist/components/ExampleComponent.js +0 -89
- package/dist/components/ExampleComponent.js.map +0 -1
- package/dist/mcp/z3.d.ts +0 -1
- package/dist/mcp/z3.js +0 -9
- package/dist/mcp/z3.js.map +0 -1
- package/dist/project-writer/AIModel.d.ts +0 -29
- package/dist/project-writer/AIModel.js +0 -48
- package/dist/project-writer/AIModel.js.map +0 -1
- package/dist/resources/docs.route.d.ts +0 -23
- package/dist/resources/docs.route.js +0 -73
- package/dist/resources/docs.route.js.map +0 -1
- package/dist/resources/durable.workflow.tag.d.ts +0 -2
- package/dist/resources/durable.workflow.tag.js +0 -28
- package/dist/resources/durable.workflow.tag.js.map +0 -1
- package/dist/resources/getFileContents.task.d.ts +0 -17
- package/dist/resources/getFileContents.task.js +0 -44
- package/dist/resources/getFileContents.task.js.map +0 -1
- package/dist/resources/introspector.tools.d.ts +0 -47
- package/dist/resources/introspector.tools.js +0 -505
- package/dist/resources/introspector.tools.js.map +0 -1
- package/dist/resources/models/extractTunnelInfo.d.ts +0 -8
- package/dist/resources/models/extractTunnelInfo.js +0 -85
- package/dist/resources/models/extractTunnelInfo.js.map +0 -1
- package/dist/resources/models/tunnel.tools.d.ts +0 -3
- package/dist/resources/models/tunnel.tools.js +0 -35
- package/dist/resources/models/tunnel.tools.js.map +0 -1
- package/dist/runner-compat.d.ts +0 -85
- package/dist/runner-compat.js +0 -178
- package/dist/runner-compat.js.map +0 -1
- package/dist/runner-node-compat.d.ts +0 -2
- package/dist/runner-node-compat.js +0 -28
- package/dist/runner-node-compat.js.map +0 -1
- package/dist/schema/types/TunnelInfoType.d.ts +0 -5
- package/dist/schema/types/TunnelInfoType.js +0 -86
- package/dist/schema/types/TunnelInfoType.js.map +0 -1
- package/dist/tasks/create-user.d.ts +0 -5
- package/dist/tasks/create-user.js +0 -20
- package/dist/tasks/create-user.js.map +0 -1
- package/dist/tasks/index.d.ts +0 -1
- package/dist/tasks/index.js +0 -18
- package/dist/tasks/index.js.map +0 -1
- package/dist/ui-test/index.html +0 -1
|
@@ -103,8 +103,8 @@ Use when you want lane assignments present but transport bypassed entirely.
|
|
|
103
103
|
import { r } from "@bluelibs/runner";
|
|
104
104
|
import { eventLanesResource, rpcLanesResource } from "@bluelibs/runner/node";
|
|
105
105
|
|
|
106
|
-
const lane = r.eventLane("
|
|
107
|
-
const rpc = r.rpcLane("
|
|
106
|
+
const lane = r.eventLane("notifications-lane").build();
|
|
107
|
+
const rpc = r.rpcLane("billing-lane").build();
|
|
108
108
|
|
|
109
109
|
const topologyEvents = r.eventLane.topology({
|
|
110
110
|
profiles: { local: { consume: [] } },
|
|
@@ -144,8 +144,8 @@ Use when you want local execution with transport-like serialization behavior.
|
|
|
144
144
|
import { r } from "@bluelibs/runner";
|
|
145
145
|
import { eventLanesResource, rpcLanesResource } from "@bluelibs/runner/node";
|
|
146
146
|
|
|
147
|
-
const eventLane = r.eventLane("
|
|
148
|
-
const rpcLane = r.rpcLane("
|
|
147
|
+
const eventLane = r.eventLane("audit-lane").build();
|
|
148
|
+
const rpcLane = r.rpcLane("users-lane").build();
|
|
149
149
|
|
|
150
150
|
const app = r
|
|
151
151
|
.resource("app")
|
|
@@ -184,7 +184,7 @@ import {
|
|
|
184
184
|
MemoryEventLaneQueue,
|
|
185
185
|
} from "@bluelibs/runner/node";
|
|
186
186
|
|
|
187
|
-
const lane = r.eventLane("
|
|
187
|
+
const lane = r.eventLane("notifications-lane").build();
|
|
188
188
|
const queue = new MemoryEventLaneQueue();
|
|
189
189
|
|
|
190
190
|
const topology = r.eventLane.topology({
|
|
@@ -229,7 +229,7 @@ import {
|
|
|
229
229
|
} from "@bluelibs/runner/node";
|
|
230
230
|
|
|
231
231
|
// 1. Define a lane — a logical routing channel
|
|
232
|
-
const notificationsLane = r.eventLane("
|
|
232
|
+
const notificationsLane = r.eventLane("notifications-lane").build();
|
|
233
233
|
|
|
234
234
|
// 2. Tag the event for lane routing
|
|
235
235
|
const notificationRequested = r
|
|
@@ -398,7 +398,7 @@ import { r } from "@bluelibs/runner";
|
|
|
398
398
|
import { rpcLanesResource } from "@bluelibs/runner/node";
|
|
399
399
|
|
|
400
400
|
// 1. Define a lane
|
|
401
|
-
const billingLane = r.rpcLane("
|
|
401
|
+
const billingLane = r.rpcLane("billing-lane").build();
|
|
402
402
|
|
|
403
403
|
// 2. Tag the task for lane routing
|
|
404
404
|
const chargeCard = r
|
|
@@ -635,7 +635,7 @@ import {
|
|
|
635
635
|
MemoryEventLaneQueue,
|
|
636
636
|
} from "@bluelibs/runner/node";
|
|
637
637
|
|
|
638
|
-
const lane = r.eventLane("
|
|
638
|
+
const lane = r.eventLane("test-lane").build();
|
|
639
639
|
const queue = new MemoryEventLaneQueue();
|
|
640
640
|
|
|
641
641
|
const topology = r.eventLane.topology({
|
|
@@ -711,7 +711,7 @@ You usually want both.
|
|
|
711
711
|
|
|
712
712
|
```typescript
|
|
713
713
|
const activeProfile = (process.env.RUNNER_PROFILE as "api" | "billing") ?? "api";
|
|
714
|
-
const billingLane = r.rpcLane("
|
|
714
|
+
const billingLane = r.rpcLane("billing-lane").build();
|
|
715
715
|
const topology = r.rpcLane.topology({
|
|
716
716
|
profiles: {
|
|
717
717
|
api: { serve: [] },
|
|
@@ -795,12 +795,12 @@ Fail-fast proof snippets (recommended in integration tests):
|
|
|
795
795
|
```typescript
|
|
796
796
|
// 1) Producer with only public key -> signer missing (cannot mint lane token)
|
|
797
797
|
await expect(run(producerAppWithPublicKeyOnly)).rejects.toMatchObject({
|
|
798
|
-
name: "
|
|
798
|
+
name: "remoteLanes-auth-signerMissing",
|
|
799
799
|
});
|
|
800
800
|
|
|
801
801
|
// 2) Consumer with only private key -> verifier missing (cannot verify lane token)
|
|
802
802
|
await expect(run(consumerAppWithPrivateKeyOnly)).rejects.toMatchObject({
|
|
803
|
-
name: "
|
|
803
|
+
name: "remoteLanes-auth-verifierMissing",
|
|
804
804
|
});
|
|
805
805
|
```
|
|
806
806
|
|
|
@@ -808,7 +808,7 @@ Event Lane parity example (same asymmetric role split):
|
|
|
808
808
|
|
|
809
809
|
```typescript
|
|
810
810
|
const activeProfile = (process.env.RUNNER_PROFILE as "api" | "worker") ?? "api";
|
|
811
|
-
const notificationsLane = r.eventLane("
|
|
811
|
+
const notificationsLane = r.eventLane("notifications-lane").build();
|
|
812
812
|
const topology = r.eventLane.topology({
|
|
813
813
|
profiles: {
|
|
814
814
|
api: { consume: [] }, // producer profile
|
|
@@ -838,6 +838,7 @@ eventLanesResource.with({
|
|
|
838
838
|
|
|
839
839
|
- Auth is still enforced.
|
|
840
840
|
- For `jwt_asymmetric`, the same runtime signs and verifies during simulation, so binding auth must provide both sides of material.
|
|
841
|
+
- Event lane `asyncContexts` allowlist still applies in `local-simulated` (default `[]`, so no implicit forwarding).
|
|
841
842
|
- RPC lane `asyncContexts` allowlist still applies in `local-simulated` (default `[]`, so no implicit forwarding).
|
|
842
843
|
|
|
843
844
|
## Migration Notes (v6)
|
|
@@ -882,7 +883,7 @@ When routing does not behave as expected, check in this order:
|
|
|
882
883
|
|
|
883
884
|
| Concept | API |
|
|
884
885
|
| ---------------- | ---------------------------------------------------------------- |
|
|
885
|
-
| Lane definition | `r.eventLane("...").applyTo([...])` or `r.eventLane("...").applyTo((event) => boolean)` |
|
|
886
|
+
| Lane definition | `r.eventLane("...").asyncContexts([...]).applyTo([...])` or `r.eventLane("...").asyncContexts([...]).applyTo((event) => boolean)` |
|
|
886
887
|
| Event tagging | `r.runner.tags.eventLane.with({ lane })` |
|
|
887
888
|
| Topology | `r.eventLane.topology({ profiles, bindings })` |
|
|
888
889
|
| Profile consume | `profiles[profile].consume: lane[]` |
|
|
@@ -893,7 +894,7 @@ When routing does not behave as expected, check in this order:
|
|
|
893
894
|
|
|
894
895
|
| Concept | API |
|
|
895
896
|
| ------------------ | ---------------------------------------------------------------- |
|
|
896
|
-
| Lane definition | `r.rpcLane("...").applyTo([...])` or `r.rpcLane("...").applyTo((taskOrEvent) => boolean)` |
|
|
897
|
+
| Lane definition | `r.rpcLane("...").asyncContexts([...]).applyTo([...])` or `r.rpcLane("...").asyncContexts([...]).applyTo((taskOrEvent) => boolean)` |
|
|
897
898
|
| Task/event tagging | `r.runner.tags.rpcLane.with({ lane })` |
|
|
898
899
|
| Topology | `r.rpcLane.topology({ profiles, bindings })` |
|
|
899
900
|
| Profile serve | `profiles[profile].serve: lane[]` |
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export interface CreateUserInput {
|
|
2
|
-
}
|
|
3
|
-
export interface CreateUserResult {
|
|
4
|
-
}
|
|
5
|
-
export declare const createUser: import("@bluelibs/runner/dist/defs").ITask<CreateUserInput, Promise<CreateUserResult>, any, any, import("@bluelibs/runner/dist/defs").TagType[], import("@bluelibs/runner/dist/defs").TaskMiddlewareAttachmentType[]>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createUser = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Generated by runner-dev new task create-user
|
|
6
|
-
* - Namespace: app
|
|
7
|
-
* - File: src/app/tasks/create-user.task.ts
|
|
8
|
-
*/
|
|
9
|
-
const runner_1 = require("@bluelibs/runner");
|
|
10
|
-
exports.createUser = (0, runner_1.task)({
|
|
11
|
-
id: 'app.tasks.create-user',
|
|
12
|
-
// middleware: [],
|
|
13
|
-
// dependencies: { /* resources */ },
|
|
14
|
-
run: async (_input, _deps) => {
|
|
15
|
-
return {};
|
|
16
|
-
},
|
|
17
|
-
// inputSchema,
|
|
18
|
-
// resultSchema,
|
|
19
|
-
});
|
|
20
|
-
//# sourceMappingURL=create-user.task.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-user.task.js","sourceRoot":"","sources":["../../../src/app/tasks/create-user.task.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,6CAAwC;AAU3B,QAAA,UAAU,GAAG,IAAA,aAAI,EAAC;IAC7B,EAAE,EAAE,uBAAuB;IAC3B,kBAAkB;IAClB,qCAAqC;IACrC,GAAG,EAAE,KAAK,EAAE,MAAuB,EAAE,KAAK,EAA6B,EAAE;QACvE,OAAO,EAAsB,CAAC;IAChC,CAAC;IACD,eAAe;IACf,gBAAgB;CACjB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './create-user.task';
|
package/dist/app/tasks/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./create-user.task"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app/tasks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export declare class ArchitectError extends Error {
|
|
2
|
-
readonly code: string;
|
|
3
|
-
readonly context?: Record<string, any> | undefined;
|
|
4
|
-
constructor(message: string, code: string, context?: Record<string, any> | undefined);
|
|
5
|
-
}
|
|
6
|
-
export declare class AIModelError extends ArchitectError {
|
|
7
|
-
readonly modelId?: string | undefined;
|
|
8
|
-
constructor(message: string, modelId?: string | undefined, context?: Record<string, any>);
|
|
9
|
-
}
|
|
10
|
-
export declare class PlanningError extends ArchitectError {
|
|
11
|
-
readonly prompt?: string | undefined;
|
|
12
|
-
constructor(message: string, prompt?: string | undefined, context?: Record<string, any>);
|
|
13
|
-
}
|
|
14
|
-
export declare class ExecutionError extends ArchitectError {
|
|
15
|
-
readonly actionIndex?: number | undefined;
|
|
16
|
-
readonly actionType?: string | undefined;
|
|
17
|
-
constructor(message: string, actionIndex?: number | undefined, actionType?: string | undefined, context?: Record<string, any>);
|
|
18
|
-
}
|
|
19
|
-
export declare class ValidationError extends ArchitectError {
|
|
20
|
-
readonly field?: string | undefined;
|
|
21
|
-
readonly value?: any;
|
|
22
|
-
constructor(message: string, field?: string | undefined, value?: any, context?: Record<string, any>);
|
|
23
|
-
}
|
|
24
|
-
export declare class ConfigurationError extends ArchitectError {
|
|
25
|
-
readonly configKey?: string | undefined;
|
|
26
|
-
constructor(message: string, configKey?: string | undefined, context?: Record<string, any>);
|
|
27
|
-
}
|
|
28
|
-
export declare class PermissionError extends ArchitectError {
|
|
29
|
-
readonly operation?: string | undefined;
|
|
30
|
-
constructor(message: string, operation?: string | undefined, context?: Record<string, any>);
|
|
31
|
-
}
|
|
32
|
-
export declare class PluginError extends ArchitectError {
|
|
33
|
-
readonly pluginName?: string | undefined;
|
|
34
|
-
readonly pluginVersion?: string | undefined;
|
|
35
|
-
constructor(message: string, pluginName?: string | undefined, pluginVersion?: string | undefined, context?: Record<string, any>);
|
|
36
|
-
}
|
|
37
|
-
export declare function isArchitectError(error: unknown): error is ArchitectError;
|
|
38
|
-
export declare function createErrorFromResponse(response: any): ArchitectError;
|
|
39
|
-
export declare function formatErrorForUser(error: ArchitectError): string;
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Custom error classes for the architect system
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.PluginError = exports.PermissionError = exports.ConfigurationError = exports.ValidationError = exports.ExecutionError = exports.PlanningError = exports.AIModelError = exports.ArchitectError = void 0;
|
|
5
|
-
exports.isArchitectError = isArchitectError;
|
|
6
|
-
exports.createErrorFromResponse = createErrorFromResponse;
|
|
7
|
-
exports.formatErrorForUser = formatErrorForUser;
|
|
8
|
-
class ArchitectError extends Error {
|
|
9
|
-
code;
|
|
10
|
-
context;
|
|
11
|
-
constructor(message, code, context) {
|
|
12
|
-
super(message);
|
|
13
|
-
this.code = code;
|
|
14
|
-
this.context = context;
|
|
15
|
-
this.name = "ArchitectError";
|
|
16
|
-
Object.setPrototypeOf(this, ArchitectError.prototype);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.ArchitectError = ArchitectError;
|
|
20
|
-
class AIModelError extends ArchitectError {
|
|
21
|
-
modelId;
|
|
22
|
-
constructor(message, modelId, context) {
|
|
23
|
-
super(message, "AI_MODEL_ERROR", context);
|
|
24
|
-
this.modelId = modelId;
|
|
25
|
-
this.name = "AIModelError";
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.AIModelError = AIModelError;
|
|
29
|
-
class PlanningError extends ArchitectError {
|
|
30
|
-
prompt;
|
|
31
|
-
constructor(message, prompt, context) {
|
|
32
|
-
super(message, "PLANNING_ERROR", context);
|
|
33
|
-
this.prompt = prompt;
|
|
34
|
-
this.name = "PlanningError";
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.PlanningError = PlanningError;
|
|
38
|
-
class ExecutionError extends ArchitectError {
|
|
39
|
-
actionIndex;
|
|
40
|
-
actionType;
|
|
41
|
-
constructor(message, actionIndex, actionType, context) {
|
|
42
|
-
super(message, "EXECUTION_ERROR", context);
|
|
43
|
-
this.actionIndex = actionIndex;
|
|
44
|
-
this.actionType = actionType;
|
|
45
|
-
this.name = "ExecutionError";
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
exports.ExecutionError = ExecutionError;
|
|
49
|
-
class ValidationError extends ArchitectError {
|
|
50
|
-
field;
|
|
51
|
-
value;
|
|
52
|
-
constructor(message, field, value, context) {
|
|
53
|
-
super(message, "VALIDATION_ERROR", context);
|
|
54
|
-
this.field = field;
|
|
55
|
-
this.value = value;
|
|
56
|
-
this.name = "ValidationError";
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.ValidationError = ValidationError;
|
|
60
|
-
class ConfigurationError extends ArchitectError {
|
|
61
|
-
configKey;
|
|
62
|
-
constructor(message, configKey, context) {
|
|
63
|
-
super(message, "CONFIGURATION_ERROR", context);
|
|
64
|
-
this.configKey = configKey;
|
|
65
|
-
this.name = "ConfigurationError";
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
exports.ConfigurationError = ConfigurationError;
|
|
69
|
-
class PermissionError extends ArchitectError {
|
|
70
|
-
operation;
|
|
71
|
-
constructor(message, operation, context) {
|
|
72
|
-
super(message, "PERMISSION_ERROR", context);
|
|
73
|
-
this.operation = operation;
|
|
74
|
-
this.name = "PermissionError";
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
exports.PermissionError = PermissionError;
|
|
78
|
-
class PluginError extends ArchitectError {
|
|
79
|
-
pluginName;
|
|
80
|
-
pluginVersion;
|
|
81
|
-
constructor(message, pluginName, pluginVersion, context) {
|
|
82
|
-
super(message, "PLUGIN_ERROR", context);
|
|
83
|
-
this.pluginName = pluginName;
|
|
84
|
-
this.pluginVersion = pluginVersion;
|
|
85
|
-
this.name = "PluginError";
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
exports.PluginError = PluginError;
|
|
89
|
-
// Error utilities
|
|
90
|
-
function isArchitectError(error) {
|
|
91
|
-
return error instanceof ArchitectError;
|
|
92
|
-
}
|
|
93
|
-
function createErrorFromResponse(response) {
|
|
94
|
-
if (response.error) {
|
|
95
|
-
const { message, code, type } = response.error;
|
|
96
|
-
switch (type) {
|
|
97
|
-
case "invalid_request_error":
|
|
98
|
-
return new ValidationError(message, undefined, undefined, { code });
|
|
99
|
-
case "authentication_error":
|
|
100
|
-
return new ConfigurationError(message, "apiKey", { code });
|
|
101
|
-
case "permission_error":
|
|
102
|
-
return new PermissionError(message, undefined, { code });
|
|
103
|
-
case "rate_limit_error":
|
|
104
|
-
return new AIModelError(message, undefined, {
|
|
105
|
-
code,
|
|
106
|
-
rateLimited: true,
|
|
107
|
-
});
|
|
108
|
-
default:
|
|
109
|
-
return new ArchitectError(message, code || "UNKNOWN_ERROR", response.error);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return new ArchitectError("Unknown error occurred", "UNKNOWN_ERROR", {
|
|
113
|
-
response,
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
function formatErrorForUser(error) {
|
|
117
|
-
switch (error.name) {
|
|
118
|
-
case "AIModelError":
|
|
119
|
-
return `AI Model Error: ${error.message}${error.code ? ` (Model: ${error.name})` : ""}`;
|
|
120
|
-
case "PlanningError":
|
|
121
|
-
return `Planning Error: ${error.message}`;
|
|
122
|
-
case "ExecutionError":
|
|
123
|
-
const execError = error;
|
|
124
|
-
return `Execution Error: ${error.message}${execError.actionIndex !== undefined
|
|
125
|
-
? ` (Action ${execError.actionIndex})`
|
|
126
|
-
: ""}`;
|
|
127
|
-
case "ValidationError":
|
|
128
|
-
const valError = error;
|
|
129
|
-
return `Validation Error: ${error.message}${valError.field ? ` (Field: ${valError.field})` : ""}`;
|
|
130
|
-
case "ConfigurationError":
|
|
131
|
-
const configError = error;
|
|
132
|
-
return `Configuration Error: ${error.message}${configError.configKey ? ` (Key: ${configError.configKey})` : ""}`;
|
|
133
|
-
case "PermissionError":
|
|
134
|
-
const permError = error;
|
|
135
|
-
return `Permission Error: ${error.message}${permError.operation ? ` (Operation: ${permError.operation})` : ""}`;
|
|
136
|
-
case "PluginError":
|
|
137
|
-
const pluginError = error;
|
|
138
|
-
return `Plugin Error: ${error.message}${pluginError.pluginName ? ` (Plugin: ${pluginError.pluginName})` : ""}`;
|
|
139
|
-
default:
|
|
140
|
-
return `Architect Error: ${error.message}`;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/architect/core/errors.ts"],"names":[],"mappings":";AAAA,gDAAgD;;;AA+FhD,4CAEC;AAED,0DA2BC;AAED,gDAsCC;AApKD,MAAa,cAAe,SAAQ,KAAK;IAGrB;IACA;IAHlB,YACE,OAAe,EACC,IAAY,EACZ,OAA6B;QAE7C,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAsB;QAG7C,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACxD,CAAC;CACF;AAVD,wCAUC;AAED,MAAa,YAAa,SAAQ,cAAc;IAG5B;IAFlB,YACE,OAAe,EACC,OAAgB,EAChC,OAA6B;QAE7B,KAAK,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAH1B,YAAO,GAAP,OAAO,CAAS;QAIhC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AATD,oCASC;AAED,MAAa,aAAc,SAAQ,cAAc;IAG7B;IAFlB,YACE,OAAe,EACC,MAAe,EAC/B,OAA6B;QAE7B,KAAK,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAH1B,WAAM,GAAN,MAAM,CAAS;QAI/B,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AATD,sCASC;AAED,MAA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CAAC,EACpE,EAAE,CAAC;QACL;YACE,OAAO,oBAAoB,KAAK,CAAC,OAAO,EAAE,CAAC;IAC/C,CAAC;AACH,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
// Core exports for the architect system
|
|
18
|
-
__exportStar(require("./types"), exports);
|
|
19
|
-
__exportStar(require("./interfaces"), exports);
|
|
20
|
-
__exportStar(require("./errors"), exports);
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/architect/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAwC;AACxC,0CAAwB;AACxB,+CAA6B;AAC7B,2CAAyB"}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { AIModelConfig, ChatMessage, ChatCompletionRequest, ChatCompletionResponse, ArchitectPlan, ArchitectResult, ArchitectAction } from './types';
|
|
2
|
-
export interface IAIModel {
|
|
3
|
-
readonly config: AIModelConfig;
|
|
4
|
-
/**
|
|
5
|
-
* Send a chat completion request
|
|
6
|
-
*/
|
|
7
|
-
chat(request: ChatCompletionRequest): Promise<ChatCompletionResponse>;
|
|
8
|
-
/**
|
|
9
|
-
* Simple text completion with messages
|
|
10
|
-
*/
|
|
11
|
-
complete(messages: ChatMessage[]): Promise<string>;
|
|
12
|
-
/**
|
|
13
|
-
* Check if the model supports a specific feature
|
|
14
|
-
*/
|
|
15
|
-
supports(feature: 'tools' | 'vision' | 'json_mode'): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Get model information
|
|
18
|
-
*/
|
|
19
|
-
getInfo(): Promise<{
|
|
20
|
-
id: string;
|
|
21
|
-
contextWindow: number;
|
|
22
|
-
maxOutputTokens: number;
|
|
23
|
-
supportedFeatures: string[];
|
|
24
|
-
}>;
|
|
25
|
-
}
|
|
26
|
-
export interface IArchitectPlanner {
|
|
27
|
-
/**
|
|
28
|
-
* Generate a plan from a user prompt
|
|
29
|
-
*/
|
|
30
|
-
plan(prompt: string, context?: PlanningContext): Promise<ArchitectPlan>;
|
|
31
|
-
/**
|
|
32
|
-
* Validate a plan before execution
|
|
33
|
-
*/
|
|
34
|
-
validate(plan: ArchitectPlan): Promise<ValidationResult>;
|
|
35
|
-
/**
|
|
36
|
-
* Optimize a plan for better execution
|
|
37
|
-
*/
|
|
38
|
-
optimize(plan: ArchitectPlan): Promise<ArchitectPlan>;
|
|
39
|
-
/**
|
|
40
|
-
* Estimate the complexity and duration of a plan
|
|
41
|
-
*/
|
|
42
|
-
estimate(plan: ArchitectPlan): Promise<PlanEstimate>;
|
|
43
|
-
}
|
|
44
|
-
export interface IArchitectExecutor {
|
|
45
|
-
/**
|
|
46
|
-
* Execute a validated plan
|
|
47
|
-
*/
|
|
48
|
-
execute(plan: ArchitectPlan, options?: ExecutionOptions): Promise<ArchitectResult>;
|
|
49
|
-
/**
|
|
50
|
-
* Execute a single action
|
|
51
|
-
*/
|
|
52
|
-
executeAction(action: ArchitectAction, context?: ExecutionContext): Promise<ActionResult>;
|
|
53
|
-
/**
|
|
54
|
-
* Check if execution is allowed for the current environment
|
|
55
|
-
*/
|
|
56
|
-
canExecute(action: ArchitectAction): Promise<boolean>;
|
|
57
|
-
/**
|
|
58
|
-
* Rollback executed actions if possible
|
|
59
|
-
*/
|
|
60
|
-
rollback(result: ArchitectResult): Promise<RollbackResult>;
|
|
61
|
-
}
|
|
62
|
-
export interface PlanningContext {
|
|
63
|
-
projectRoot: string;
|
|
64
|
-
existingFiles: string[];
|
|
65
|
-
packageJson?: any;
|
|
66
|
-
tsConfig?: any;
|
|
67
|
-
runnerConfig?: any;
|
|
68
|
-
constraints?: string[];
|
|
69
|
-
preferences?: Record<string, any>;
|
|
70
|
-
}
|
|
71
|
-
export interface ExecutionOptions {
|
|
72
|
-
dryRun?: boolean;
|
|
73
|
-
allowWrites?: boolean;
|
|
74
|
-
allowCommands?: boolean;
|
|
75
|
-
allowPackageInstalls?: boolean;
|
|
76
|
-
continueOnError?: boolean;
|
|
77
|
-
maxConcurrentActions?: number;
|
|
78
|
-
timeout?: number;
|
|
79
|
-
}
|
|
80
|
-
export interface ExecutionContext {
|
|
81
|
-
projectRoot: string;
|
|
82
|
-
currentDirectory: string;
|
|
83
|
-
environment: Record<string, string>;
|
|
84
|
-
logger: IArchitectLogger;
|
|
85
|
-
}
|
|
86
|
-
export interface ValidationResult {
|
|
87
|
-
valid: boolean;
|
|
88
|
-
errors: ValidationError[];
|
|
89
|
-
warnings: ValidationWarning[];
|
|
90
|
-
suggestions: string[];
|
|
91
|
-
}
|
|
92
|
-
export interface ValidationError {
|
|
93
|
-
actionIndex: number;
|
|
94
|
-
field: string;
|
|
95
|
-
message: string;
|
|
96
|
-
severity: 'error' | 'warning';
|
|
97
|
-
}
|
|
98
|
-
export interface ValidationWarning {
|
|
99
|
-
actionIndex: number;
|
|
100
|
-
message: string;
|
|
101
|
-
recommendation?: string;
|
|
102
|
-
}
|
|
103
|
-
export interface PlanEstimate {
|
|
104
|
-
complexity: 'low' | 'medium' | 'high';
|
|
105
|
-
estimatedDuration: number;
|
|
106
|
-
riskFactors: string[];
|
|
107
|
-
prerequisites: string[];
|
|
108
|
-
}
|
|
109
|
-
export interface ActionResult {
|
|
110
|
-
success: boolean;
|
|
111
|
-
output?: any;
|
|
112
|
-
error?: string;
|
|
113
|
-
logs: string[];
|
|
114
|
-
sideEffects: SideEffect[];
|
|
115
|
-
}
|
|
116
|
-
export interface SideEffect {
|
|
117
|
-
type: 'file_created' | 'file_modified' | 'file_deleted' | 'command_executed' | 'package_installed';
|
|
118
|
-
target: string;
|
|
119
|
-
before?: any;
|
|
120
|
-
after?: any;
|
|
121
|
-
}
|
|
122
|
-
export interface RollbackResult {
|
|
123
|
-
success: boolean;
|
|
124
|
-
actionsRolledBack: number;
|
|
125
|
-
errors: string[];
|
|
126
|
-
warnings: string[];
|
|
127
|
-
}
|
|
128
|
-
export interface IArchitectLogger {
|
|
129
|
-
info(message: string, context?: Record<string, any>): void;
|
|
130
|
-
warn(message: string, context?: Record<string, any>): void;
|
|
131
|
-
error(message: string, error?: Error, context?: Record<string, any>): void;
|
|
132
|
-
debug(message: string, context?: Record<string, any>): void;
|
|
133
|
-
}
|
|
134
|
-
export interface IArchitectPlugin {
|
|
135
|
-
readonly name: string;
|
|
136
|
-
readonly version: string;
|
|
137
|
-
/**
|
|
138
|
-
* Initialize the plugin
|
|
139
|
-
*/
|
|
140
|
-
initialize(context: PluginContext): Promise<void>;
|
|
141
|
-
/**
|
|
142
|
-
* Handle custom actions
|
|
143
|
-
*/
|
|
144
|
-
handleAction?(action: ArchitectAction): Promise<ActionResult>;
|
|
145
|
-
/**
|
|
146
|
-
* Modify plans before execution
|
|
147
|
-
*/
|
|
148
|
-
transformPlan?(plan: ArchitectPlan): Promise<ArchitectPlan>;
|
|
149
|
-
/**
|
|
150
|
-
* Cleanup resources
|
|
151
|
-
*/
|
|
152
|
-
dispose?(): Promise<void>;
|
|
153
|
-
}
|
|
154
|
-
export interface PluginContext {
|
|
155
|
-
logger: IArchitectLogger;
|
|
156
|
-
config: Record<string, any>;
|
|
157
|
-
projectRoot: string;
|
|
158
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/architect/core/interfaces.ts"],"names":[],"mappings":""}
|