@gobing-ai/ts-infra 0.4.35 → 0.4.36
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/README.md +2 -2
- package/dist/application/index.d.ts +1 -1
- package/dist/application/index.d.ts.map +1 -1
- package/dist/application/index.js +3 -2
- package/dist/application/types.d.ts +1 -1
- package/dist/application-node.js +1 -1
- package/package.json +6 -6
- package/src/application/index.ts +3 -2
- package/src/application/types.ts +1 -1
- package/src/application-node.ts +1 -1
package/README.md
CHANGED
|
@@ -744,9 +744,9 @@ single `lifecycleBus`.
|
|
|
744
744
|
**Portable vs Node subpath split (ADR-011).** `runApplication` (portable)
|
|
745
745
|
never opens files: it calls `attachFileObserver(lifecycleBus, filePath, writer)`
|
|
746
746
|
only when `services.fileObserverWriter` is provided; its portable default path is
|
|
747
|
-
|
|
747
|
+
`.spur/logs/system-events.jsonl`. The Node subpath `runNodeApplication` constructs a
|
|
748
748
|
Node writer and uses `createNodeFileSystem()` to resolve the path to
|
|
749
|
-
`<projectRoot
|
|
749
|
+
`<projectRoot>/.spur/logs/system-events.jsonl`. Set `config.events.fileObserver: false`
|
|
750
750
|
to disable; supply a custom `filePath` (or a test-stub writer via
|
|
751
751
|
`services.fileObserverWriter`) to override.
|
|
752
752
|
|
|
@@ -23,7 +23,7 @@ import type { ApplicationBootstrapOptions, ApplicationRuntime } from './types';
|
|
|
23
23
|
* can be passed to RuleEngine, WorkflowService, AiRunner, TeamOrchestrator, and
|
|
24
24
|
* APIClient so their domain events share one System Events stream. A supplied
|
|
25
25
|
* file-observer writer records that stream as JSONL; the Node subpath supplies
|
|
26
|
-
* the writer and default
|
|
26
|
+
* the writer and default `.spur/logs/system-events.jsonl` path.
|
|
27
27
|
*
|
|
28
28
|
* Startup is plugin-driven. Built-in service plugins are registered in dependency
|
|
29
29
|
* order, then `loadAll()` + `startAll()` run them forward:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/application/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAsB,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAM7C,OAAO,KAAK,EAER,2BAA2B,EAC3B,kBAAkB,EAGrB,MAAM,SAAS,CAAC;AAiCjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAsB,cAAc,CAAC,UAAU,GAAG,OAAO,EAAE,OAAO,SAAS,QAAQ,GAAG,WAAW,EAC7F,OAAO,EAAE,2BAA2B,CAAC,UAAU,EAAE,OAAO,CAAC,GAC1D,OAAO,CAAC,kBAAkB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/application/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAsB,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAM7C,OAAO,KAAK,EAER,2BAA2B,EAC3B,kBAAkB,EAGrB,MAAM,SAAS,CAAC;AAiCjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAsB,cAAc,CAAC,UAAU,GAAG,OAAO,EAAE,OAAO,SAAS,QAAQ,GAAG,WAAW,EAC7F,OAAO,EAAE,2BAA2B,CAAC,UAAU,EAAE,OAAO,CAAC,GAC1D,OAAO,CAAC,kBAAkB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CA0JlD;AAED,YAAY,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACvE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE7D,YAAY,EACR,0BAA0B,EAC1B,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,EACb,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GACnB,MAAM,SAAS,CAAC"}
|
|
@@ -44,7 +44,7 @@ async function performShutdown(state, reason) {
|
|
|
44
44
|
* can be passed to RuleEngine, WorkflowService, AiRunner, TeamOrchestrator, and
|
|
45
45
|
* APIClient so their domain events share one System Events stream. A supplied
|
|
46
46
|
* file-observer writer records that stream as JSONL; the Node subpath supplies
|
|
47
|
-
* the writer and default
|
|
47
|
+
* the writer and default `.spur/logs/system-events.jsonl` path.
|
|
48
48
|
*
|
|
49
49
|
* Startup is plugin-driven. Built-in service plugins are registered in dependency
|
|
50
50
|
* order, then `loadAll()` + `startAll()` run them forward:
|
|
@@ -100,7 +100,8 @@ export async function runApplication(options) {
|
|
|
100
100
|
const eventsDefaultObservers = options.config?.events?.defaultObservers ?? true;
|
|
101
101
|
const eventsFileObserver = options.config?.events?.fileObserver ?? true;
|
|
102
102
|
const fileObserverWriter = options.services?.fileObserverWriter;
|
|
103
|
-
const eventsFilePath = options.config?.events?.filePath ??
|
|
103
|
+
const eventsFilePath = options.config?.events?.filePath ??
|
|
104
|
+
(fileObserverWriter !== undefined ? '.spur/logs/system-events.jsonl' : undefined);
|
|
104
105
|
const state = {
|
|
105
106
|
app: undefined,
|
|
106
107
|
stopped: false,
|
|
@@ -48,7 +48,7 @@ export interface EventsOptions<TEvents extends EventMap = InfraEvents> {
|
|
|
48
48
|
*/
|
|
49
49
|
fileObserver?: boolean;
|
|
50
50
|
/**
|
|
51
|
-
* JSONL output path. Defaults to
|
|
51
|
+
* JSONL output path. Defaults to `.spur/logs/system-events.jsonl` when a writer
|
|
52
52
|
* is supplied; the Node subpath resolves this against the project root.
|
|
53
53
|
* Portable callers may override it with an absolute path.
|
|
54
54
|
*/
|
package/dist/application-node.js
CHANGED
|
@@ -241,7 +241,7 @@ export async function runNodeApplication(options) {
|
|
|
241
241
|
appendFileSync(path, content);
|
|
242
242
|
},
|
|
243
243
|
};
|
|
244
|
-
const eventsFilePath = eventsOpts.filePath ?? injectedFileSystem.resolve('logs', 'system-events.jsonl');
|
|
244
|
+
const eventsFilePath = eventsOpts.filePath ?? injectedFileSystem.resolve('.spur', 'logs', 'system-events.jsonl');
|
|
245
245
|
const eventsConfig = {
|
|
246
246
|
...eventsOpts,
|
|
247
247
|
filePath: eventsFilePath,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobing-ai/ts-infra",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.36",
|
|
4
4
|
"description": "@gobing-ai/ts-infra — Infrastructure backbone: event bus, job queue, scheduler, telemetry, API client, and logging.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
"release": "echo 'Manual publish is disabled. Releases go through GitHub Actions via Trusted Publishing — push a tag: git tag @gobing-ai/ts-infra-v<version> && git push --tags' && exit 1"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@gobing-ai/ts-utils": "^0.4.
|
|
81
|
+
"@gobing-ai/ts-utils": "^0.4.36",
|
|
82
82
|
"@logtape/logtape": "^2.0.0"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
|
-
"@gobing-ai/ts-db": "^0.4.
|
|
86
|
-
"@gobing-ai/ts-runtime": "^0.4.
|
|
85
|
+
"@gobing-ai/ts-db": "^0.4.36",
|
|
86
|
+
"@gobing-ai/ts-runtime": "^0.4.36",
|
|
87
87
|
"@opentelemetry/api": "^1.9.0",
|
|
88
88
|
"@opentelemetry/sdk-trace-node": "^2.0.0",
|
|
89
89
|
"@opentelemetry/sdk-metrics": "^2.0.0",
|
|
@@ -116,8 +116,8 @@
|
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
"devDependencies": {
|
|
119
|
-
"@gobing-ai/ts-db": "^0.4.
|
|
120
|
-
"@gobing-ai/ts-runtime": "^0.4.
|
|
119
|
+
"@gobing-ai/ts-db": "^0.4.36",
|
|
120
|
+
"@gobing-ai/ts-runtime": "^0.4.36",
|
|
121
121
|
"@types/bun": "1.3.14",
|
|
122
122
|
"@opentelemetry/api": "^1.9.0",
|
|
123
123
|
"@opentelemetry/sdk-trace-node": "^2.0.0",
|
package/src/application/index.ts
CHANGED
|
@@ -70,7 +70,7 @@ async function performShutdown<TAppConfig, TEvents extends EventMap>(
|
|
|
70
70
|
* can be passed to RuleEngine, WorkflowService, AiRunner, TeamOrchestrator, and
|
|
71
71
|
* APIClient so their domain events share one System Events stream. A supplied
|
|
72
72
|
* file-observer writer records that stream as JSONL; the Node subpath supplies
|
|
73
|
-
* the writer and default
|
|
73
|
+
* the writer and default `.spur/logs/system-events.jsonl` path.
|
|
74
74
|
*
|
|
75
75
|
* Startup is plugin-driven. Built-in service plugins are registered in dependency
|
|
76
76
|
* order, then `loadAll()` + `startAll()` run them forward:
|
|
@@ -132,7 +132,8 @@ export async function runApplication<TAppConfig = unknown, TEvents extends Event
|
|
|
132
132
|
const eventsFileObserver = options.config?.events?.fileObserver ?? true;
|
|
133
133
|
const fileObserverWriter = options.services?.fileObserverWriter;
|
|
134
134
|
const eventsFilePath =
|
|
135
|
-
options.config?.events?.filePath ??
|
|
135
|
+
options.config?.events?.filePath ??
|
|
136
|
+
(fileObserverWriter !== undefined ? '.spur/logs/system-events.jsonl' : undefined);
|
|
136
137
|
|
|
137
138
|
const state: RuntimeState<TAppConfig, TEvents> = {
|
|
138
139
|
app: undefined,
|
package/src/application/types.ts
CHANGED
|
@@ -53,7 +53,7 @@ export interface EventsOptions<TEvents extends EventMap = InfraEvents> {
|
|
|
53
53
|
*/
|
|
54
54
|
fileObserver?: boolean;
|
|
55
55
|
/**
|
|
56
|
-
* JSONL output path. Defaults to
|
|
56
|
+
* JSONL output path. Defaults to `.spur/logs/system-events.jsonl` when a writer
|
|
57
57
|
* is supplied; the Node subpath resolves this against the project root.
|
|
58
58
|
* Portable callers may override it with an absolute path.
|
|
59
59
|
*/
|
package/src/application-node.ts
CHANGED
|
@@ -342,7 +342,7 @@ export async function runNodeApplication<TAppConfig = unknown, TEvents extends E
|
|
|
342
342
|
appendFileSync(path, content);
|
|
343
343
|
},
|
|
344
344
|
};
|
|
345
|
-
const eventsFilePath = eventsOpts.filePath ?? injectedFileSystem.resolve('logs', 'system-events.jsonl');
|
|
345
|
+
const eventsFilePath = eventsOpts.filePath ?? injectedFileSystem.resolve('.spur', 'logs', 'system-events.jsonl');
|
|
346
346
|
const eventsConfig: EventsOptions<TEvents> = {
|
|
347
347
|
...eventsOpts,
|
|
348
348
|
filePath: eventsFilePath,
|