@stigmer/server 3.32.0 → 3.33.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/boot/compose.d.ts.map +1 -1
- package/dist/boot/compose.js +8 -1
- package/dist/boot/compose.js.map +1 -1
- package/dist/domain/apikey/controller.d.ts.map +1 -1
- package/dist/domain/apikey/controller.js +7 -2
- package/dist/domain/apikey/controller.js.map +1 -1
- package/dist/domain/apikey/verifier.d.ts +5 -0
- package/dist/domain/apikey/verifier.d.ts.map +1 -1
- package/dist/domain/apikey/verifier.js +32 -3
- package/dist/domain/apikey/verifier.js.map +1 -1
- package/dist/domain/platformclient/mint.d.ts.map +1 -1
- package/dist/domain/platformclient/mint.js +28 -1
- package/dist/domain/platformclient/mint.js.map +1 -1
- package/dist/domain/platformclient/resource-store.d.ts.map +1 -1
- package/dist/domain/platformclient/resource-store.js +13 -0
- package/dist/domain/platformclient/resource-store.js.map +1 -1
- package/dist/domain/platformclient/store-contract.d.ts.map +1 -1
- package/dist/domain/platformclient/store-contract.js +59 -0
- package/dist/domain/platformclient/store-contract.js.map +1 -1
- package/dist/domain/platformclient/store.d.ts +20 -0
- package/dist/domain/platformclient/store.d.ts.map +1 -1
- package/dist/domain/platformclient/store.js.map +1 -1
- package/dist/identity/credential-use.d.ts +74 -0
- package/dist/identity/credential-use.d.ts.map +1 -0
- package/dist/identity/credential-use.js +59 -0
- package/dist/identity/credential-use.js.map +1 -0
- package/dist/pipeline/steps/defaults.d.ts +10 -0
- package/dist/pipeline/steps/defaults.d.ts.map +1 -1
- package/dist/pipeline/steps/defaults.js +25 -0
- package/dist/pipeline/steps/defaults.js.map +1 -1
- package/dist/temporal/schedule/activities.d.ts.map +1 -1
- package/dist/temporal/schedule/activities.js +2 -1
- package/dist/temporal/schedule/activities.js.map +1 -1
- package/dist/temporal/schedule/run-starter.d.ts.map +1 -1
- package/dist/temporal/schedule/run-starter.js +2 -1
- package/dist/temporal/schedule/run-starter.js.map +1 -1
- package/dist/temporal/schedule/status-writes.d.ts +0 -6
- package/dist/temporal/schedule/status-writes.d.ts.map +1 -1
- package/dist/temporal/schedule/status-writes.js +8 -27
- package/dist/temporal/schedule/status-writes.js.map +1 -1
- package/dist/temporal/schedule/syncer.d.ts.map +1 -1
- package/dist/temporal/schedule/syncer.js +2 -1
- package/dist/temporal/schedule/syncer.js.map +1 -1
- package/package.json +6 -6
- package/src/boot/compose.ts +8 -1
- package/src/domain/apikey/__tests__/apikey.test.ts +17 -2
- package/src/domain/apikey/__tests__/verifier.test.ts +86 -3
- package/src/domain/apikey/controller.ts +12 -2
- package/src/domain/apikey/verifier.ts +46 -3
- package/src/domain/platformclient/__tests__/mint.test.ts +97 -11
- package/src/domain/platformclient/__tests__/resource-store.test.ts +4 -0
- package/src/domain/platformclient/mint.ts +34 -1
- package/src/domain/platformclient/resource-store.ts +18 -0
- package/src/domain/platformclient/store-contract.ts +100 -0
- package/src/domain/platformclient/store.ts +23 -0
- package/src/identity/__tests__/credential-use.test.ts +186 -0
- package/src/identity/credential-use.ts +130 -0
- package/src/pipeline/steps/defaults.ts +27 -0
- package/src/temporal/schedule/activities.ts +2 -1
- package/src/temporal/schedule/run-starter.ts +2 -1
- package/src/temporal/schedule/status-writes.ts +8 -31
- package/src/temporal/schedule/syncer.ts +2 -1
|
@@ -1,26 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The clock's status-write
|
|
3
|
-
*
|
|
2
|
+
* The clock's status-write helper — ports ensureStatus of
|
|
3
|
+
* pkg/domain/schedule/temporal/syncer.go.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* steps.SetAuditFieldsForUpdate from the clock's bump. Two flavors, two
|
|
12
|
-
* writers, both wire-visible — keep them distinct.
|
|
5
|
+
* The clock's audit stamp is the shared `bumpStatusAudit`
|
|
6
|
+
* (pipeline/steps/defaults.ts): status-audit updated_at + event only, never
|
|
7
|
+
* an actor — the clock is the platform, not an operator. Controller-side
|
|
8
|
+
* status writes (trigger's last_fire_at stamp, resume's clear) use the FULL
|
|
9
|
+
* setAuditFieldsForUpdate instead, exactly as Go splits
|
|
10
|
+
* steps.SetAuditFieldsForUpdate from the clock's bump.
|
|
13
11
|
*/
|
|
14
12
|
import { create } from "@bufbuild/protobuf";
|
|
15
|
-
import { timestampNow } from "@bufbuild/protobuf/wkt";
|
|
16
13
|
|
|
17
14
|
import type { Schedule } from "@stigmer/protos/ai/stigmer/agentic/schedule/v1/api_pb";
|
|
18
15
|
import { ScheduleStatusSchema } from "@stigmer/protos/ai/stigmer/agentic/schedule/v1/status_pb";
|
|
19
16
|
import type { ScheduleStatus } from "@stigmer/protos/ai/stigmer/agentic/schedule/v1/status_pb";
|
|
20
|
-
import {
|
|
21
|
-
ApiResourceAuditInfoSchema,
|
|
22
|
-
ApiResourceAuditSchema,
|
|
23
|
-
} from "@stigmer/protos/ai/stigmer/commons/apiresource/status_pb";
|
|
24
17
|
|
|
25
18
|
/**
|
|
26
19
|
* Returns the schedule's status, materializing the nested message a fresh
|
|
@@ -32,19 +25,3 @@ export function ensureStatus(schedule: Schedule): ScheduleStatus {
|
|
|
32
25
|
}
|
|
33
26
|
return schedule.status;
|
|
34
27
|
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Stamps the status-audit trail for a runtime write — updated_at + event
|
|
38
|
-
* "updated", nothing else (Go bumpStatusAudit; see the module header for
|
|
39
|
-
* why this is not setAuditFieldsForUpdate).
|
|
40
|
-
*/
|
|
41
|
-
export function bumpStatusAudit(status: ScheduleStatus): void {
|
|
42
|
-
if (status.audit === undefined) {
|
|
43
|
-
status.audit = create(ApiResourceAuditSchema);
|
|
44
|
-
}
|
|
45
|
-
if (status.audit.statusAudit === undefined) {
|
|
46
|
-
status.audit.statusAudit = create(ApiResourceAuditInfoSchema);
|
|
47
|
-
}
|
|
48
|
-
status.audit.statusAudit.updatedAt = timestampNow();
|
|
49
|
-
status.audit.statusAudit.event = "updated";
|
|
50
|
-
}
|
|
@@ -34,12 +34,13 @@ import type { Schedule } from "@stigmer/protos/ai/stigmer/agentic/schedule/v1/ap
|
|
|
34
34
|
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
35
35
|
|
|
36
36
|
import type { Logger } from "../../boot/logger.js";
|
|
37
|
+
import { bumpStatusAudit } from "../../pipeline/steps/defaults.js";
|
|
37
38
|
import { ResourceNotFoundError } from "../../store/interface.js";
|
|
38
39
|
import type { Store } from "../../store/interface.js";
|
|
39
40
|
import type { ScheduleArtifact } from "./artifact.js";
|
|
40
41
|
import { desiredPaused, note } from "./artifact.js";
|
|
41
42
|
import { artifactId } from "./names.js";
|
|
42
|
-
import {
|
|
43
|
+
import { ensureStatus } from "./status-writes.js";
|
|
43
44
|
|
|
44
45
|
/**
|
|
45
46
|
* The syncer's answer when no Temporal client exists right now (Go
|