@sdlcagent/agent-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/AgentError.d.ts +22 -0
  2. package/dist/AgentError.d.ts.map +1 -0
  3. package/dist/AgentError.js +53 -0
  4. package/dist/AgentError.js.map +1 -0
  5. package/dist/AgentServer.d.ts +14 -0
  6. package/dist/AgentServer.d.ts.map +1 -0
  7. package/dist/AgentServer.js +149 -0
  8. package/dist/AgentServer.js.map +1 -0
  9. package/dist/envelopes/ContextEnvelope.d.ts +26 -0
  10. package/dist/envelopes/ContextEnvelope.d.ts.map +1 -0
  11. package/dist/envelopes/ContextEnvelope.js +13 -0
  12. package/dist/envelopes/ContextEnvelope.js.map +1 -0
  13. package/dist/envelopes/ResultEnvelope.d.ts +23 -0
  14. package/dist/envelopes/ResultEnvelope.d.ts.map +1 -0
  15. package/dist/envelopes/ResultEnvelope.js +13 -0
  16. package/dist/envelopes/ResultEnvelope.js.map +1 -0
  17. package/dist/envelopes/sub-types/ActionRequest.d.ts +7 -0
  18. package/dist/envelopes/sub-types/ActionRequest.d.ts.map +1 -0
  19. package/dist/envelopes/sub-types/ActionRequest.js +3 -0
  20. package/dist/envelopes/sub-types/ActionRequest.js.map +1 -0
  21. package/dist/envelopes/sub-types/AgentMetrics.d.ts +9 -0
  22. package/dist/envelopes/sub-types/AgentMetrics.d.ts.map +1 -0
  23. package/dist/envelopes/sub-types/AgentMetrics.js +3 -0
  24. package/dist/envelopes/sub-types/AgentMetrics.js.map +1 -0
  25. package/dist/envelopes/sub-types/ArtifactRef.d.ts +9 -0
  26. package/dist/envelopes/sub-types/ArtifactRef.d.ts.map +1 -0
  27. package/dist/envelopes/sub-types/ArtifactRef.js +3 -0
  28. package/dist/envelopes/sub-types/ArtifactRef.js.map +1 -0
  29. package/dist/envelopes/sub-types/CriticSignal.d.ts +15 -0
  30. package/dist/envelopes/sub-types/CriticSignal.d.ts.map +1 -0
  31. package/dist/envelopes/sub-types/CriticSignal.js +3 -0
  32. package/dist/envelopes/sub-types/CriticSignal.js.map +1 -0
  33. package/dist/envelopes/sub-types/EffectivePolicy.d.ts +7 -0
  34. package/dist/envelopes/sub-types/EffectivePolicy.d.ts.map +1 -0
  35. package/dist/envelopes/sub-types/EffectivePolicy.js +3 -0
  36. package/dist/envelopes/sub-types/EffectivePolicy.js.map +1 -0
  37. package/dist/envelopes/sub-types/HitlTypes.d.ts +6 -0
  38. package/dist/envelopes/sub-types/HitlTypes.d.ts.map +1 -0
  39. package/dist/envelopes/sub-types/HitlTypes.js +3 -0
  40. package/dist/envelopes/sub-types/HitlTypes.js.map +1 -0
  41. package/dist/envelopes/sub-types/MemoryRefs.d.ts +13 -0
  42. package/dist/envelopes/sub-types/MemoryRefs.d.ts.map +1 -0
  43. package/dist/envelopes/sub-types/MemoryRefs.js +3 -0
  44. package/dist/envelopes/sub-types/MemoryRefs.js.map +1 -0
  45. package/dist/envelopes/sub-types/MemorySignal.d.ts +10 -0
  46. package/dist/envelopes/sub-types/MemorySignal.d.ts.map +1 -0
  47. package/dist/envelopes/sub-types/MemorySignal.js +3 -0
  48. package/dist/envelopes/sub-types/MemorySignal.js.map +1 -0
  49. package/dist/envelopes/sub-types/PromptRef.d.ts +8 -0
  50. package/dist/envelopes/sub-types/PromptRef.d.ts.map +1 -0
  51. package/dist/envelopes/sub-types/PromptRef.js +3 -0
  52. package/dist/envelopes/sub-types/PromptRef.js.map +1 -0
  53. package/dist/envelopes/sub-types/RedactionProfile.d.ts +6 -0
  54. package/dist/envelopes/sub-types/RedactionProfile.d.ts.map +1 -0
  55. package/dist/envelopes/sub-types/RedactionProfile.js +3 -0
  56. package/dist/envelopes/sub-types/RedactionProfile.js.map +1 -0
  57. package/dist/envelopes/sub-types/TriggerPayload.d.ts +5 -0
  58. package/dist/envelopes/sub-types/TriggerPayload.d.ts.map +1 -0
  59. package/dist/envelopes/sub-types/TriggerPayload.js +3 -0
  60. package/dist/envelopes/sub-types/TriggerPayload.js.map +1 -0
  61. package/dist/index.d.ts +26 -0
  62. package/dist/index.d.ts.map +1 -0
  63. package/dist/index.js +21 -0
  64. package/dist/index.js.map +1 -0
  65. package/dist/logger.d.ts +32 -0
  66. package/dist/logger.d.ts.map +1 -0
  67. package/dist/logger.js +50 -0
  68. package/dist/logger.js.map +1 -0
  69. package/dist/logging/emitLog.d.ts +11 -0
  70. package/dist/logging/emitLog.d.ts.map +1 -0
  71. package/dist/logging/emitLog.js +31 -0
  72. package/dist/logging/emitLog.js.map +1 -0
  73. package/dist/logging/phases.d.ts +3 -0
  74. package/dist/logging/phases.d.ts.map +1 -0
  75. package/dist/logging/phases.js +14 -0
  76. package/dist/logging/phases.js.map +1 -0
  77. package/dist/server-utils.d.ts +6 -0
  78. package/dist/server-utils.d.ts.map +1 -0
  79. package/dist/server-utils.js +22 -0
  80. package/dist/server-utils.js.map +1 -0
  81. package/dist/validation.d.ts +311 -0
  82. package/dist/validation.d.ts.map +1 -0
  83. package/dist/validation.js +88 -0
  84. package/dist/validation.js.map +1 -0
  85. package/package.json +43 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TriggerPayload.js","sourceRoot":"","sources":["../../../src/envelopes/sub-types/TriggerPayload.ts"],"names":[],"mappings":""}
@@ -0,0 +1,26 @@
1
+ export { AgentServer, createApp } from './AgentServer';
2
+ export type { AgentHandler, AgentServerOptions } from './AgentServer';
3
+ export type { ContextEnvelope, RunMode } from './envelopes/ContextEnvelope';
4
+ export { parseContextEnvelope } from './envelopes/ContextEnvelope';
5
+ export type { ResultEnvelope, StepStatus } from './envelopes/ResultEnvelope';
6
+ export { validateResultEnvelope } from './envelopes/ResultEnvelope';
7
+ export { AgentError, ContextEnvelopeParseError, ResultEnvelopeValidationError } from './AgentError';
8
+ export type { AgentErrorCode } from './AgentError';
9
+ export type { TriggerPayload } from './envelopes/sub-types/TriggerPayload';
10
+ export type { EffectivePolicy } from './envelopes/sub-types/EffectivePolicy';
11
+ export type { PromptRef } from './envelopes/sub-types/PromptRef';
12
+ export type { RedactionProfile } from './envelopes/sub-types/RedactionProfile';
13
+ export type { MemoryRefs, MemoryRecord } from './envelopes/sub-types/MemoryRefs';
14
+ export type { ActionRequest } from './envelopes/sub-types/ActionRequest';
15
+ export type { ArtifactRef } from './envelopes/sub-types/ArtifactRef';
16
+ export type { CriticSignal, CriticCheck, CriticSeverity } from './envelopes/sub-types/CriticSignal';
17
+ export type { HitlOption } from './envelopes/sub-types/HitlTypes';
18
+ export type { MemorySignal, MemorySignalType, MemorySignalScope, } from './envelopes/sub-types/MemorySignal';
19
+ export type { AgentMetrics } from './envelopes/sub-types/AgentMetrics';
20
+ export { logger } from './logger';
21
+ export type { Logger, LogContext } from './logger';
22
+ export { emitLog } from './logging/emitLog';
23
+ export type { LogLevel, EmitLogOptions } from './logging/emitLog';
24
+ export { AGENT_PHASES } from './logging/phases';
25
+ export type { AgentPhase } from './logging/phases';
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEtE,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AACpG,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,YAAY,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAC3E,YAAY,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAC7E,YAAY,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,YAAY,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACjF,YAAY,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,YAAY,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AACrE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpG,YAAY,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,YAAY,EACV,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AGENT_PHASES = exports.emitLog = exports.logger = exports.ResultEnvelopeValidationError = exports.ContextEnvelopeParseError = exports.AgentError = exports.validateResultEnvelope = exports.parseContextEnvelope = exports.createApp = exports.AgentServer = void 0;
4
+ var AgentServer_1 = require("./AgentServer");
5
+ Object.defineProperty(exports, "AgentServer", { enumerable: true, get: function () { return AgentServer_1.AgentServer; } });
6
+ Object.defineProperty(exports, "createApp", { enumerable: true, get: function () { return AgentServer_1.createApp; } });
7
+ var ContextEnvelope_1 = require("./envelopes/ContextEnvelope");
8
+ Object.defineProperty(exports, "parseContextEnvelope", { enumerable: true, get: function () { return ContextEnvelope_1.parseContextEnvelope; } });
9
+ var ResultEnvelope_1 = require("./envelopes/ResultEnvelope");
10
+ Object.defineProperty(exports, "validateResultEnvelope", { enumerable: true, get: function () { return ResultEnvelope_1.validateResultEnvelope; } });
11
+ var AgentError_1 = require("./AgentError");
12
+ Object.defineProperty(exports, "AgentError", { enumerable: true, get: function () { return AgentError_1.AgentError; } });
13
+ Object.defineProperty(exports, "ContextEnvelopeParseError", { enumerable: true, get: function () { return AgentError_1.ContextEnvelopeParseError; } });
14
+ Object.defineProperty(exports, "ResultEnvelopeValidationError", { enumerable: true, get: function () { return AgentError_1.ResultEnvelopeValidationError; } });
15
+ var logger_1 = require("./logger");
16
+ Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return logger_1.logger; } });
17
+ var emitLog_1 = require("./logging/emitLog");
18
+ Object.defineProperty(exports, "emitLog", { enumerable: true, get: function () { return emitLog_1.emitLog; } });
19
+ var phases_1 = require("./logging/phases");
20
+ Object.defineProperty(exports, "AGENT_PHASES", { enumerable: true, get: function () { return phases_1.AGENT_PHASES; } });
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,6CAAuD;AAA9C,0GAAA,WAAW,OAAA;AAAE,wGAAA,SAAS,OAAA;AAI/B,+DAAmE;AAA1D,uHAAA,oBAAoB,OAAA;AAG7B,6DAAoE;AAA3D,wHAAA,sBAAsB,OAAA;AAE/B,2CAAoG;AAA3F,wGAAA,UAAU,OAAA;AAAE,uHAAA,yBAAyB,OAAA;AAAE,2HAAA,6BAA6B,OAAA;AAmB7E,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AAGf,6CAA4C;AAAnC,kGAAA,OAAO,OAAA;AAEhB,2CAAgD;AAAvC,sGAAA,YAAY,OAAA"}
@@ -0,0 +1,32 @@
1
+ /** Fields automatically included in every log entry within a withContext() scope. */
2
+ export interface LogContext {
3
+ run_id?: string;
4
+ org_id?: string;
5
+ project_id?: string;
6
+ step_id?: string;
7
+ agent_id?: string;
8
+ }
9
+ export interface Logger {
10
+ debug(data: Record<string, unknown>): void;
11
+ info(data: Record<string, unknown>): void;
12
+ warn(data: Record<string, unknown>): void;
13
+ error(data: Record<string, unknown>): void;
14
+ /**
15
+ * Runs fn with ctx merged into every log call in that async chain.
16
+ * Merges with any outer context (inner fields win on conflict).
17
+ */
18
+ withContext<T>(ctx: LogContext, fn: () => T): T;
19
+ /**
20
+ * Returns a new logger with extra fields always merged into every entry.
21
+ * Stacks with AsyncLocalStorage context — child fields take precedence.
22
+ */
23
+ child(fields: Record<string, unknown>): Logger;
24
+ /**
25
+ * Wraps a sync or async step with STEP_START / STEP_END log entries.
26
+ * Logs STEP_ERROR (with duration_ms) and rethrows on failure.
27
+ * All log entries carry the current AsyncLocalStorage context.
28
+ */
29
+ time<T>(step: string, fn: () => T | Promise<T>, extra?: Record<string, unknown>): Promise<Awaited<T>>;
30
+ }
31
+ export declare const logger: Logger;
32
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAOA,qFAAqF;AACrF,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,MAAM;IACrB,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC3C,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC1C,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC1C,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC3C;;;OAGG;IACH,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;IAChD;;;OAGG;IACH,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;IAC/C;;;;OAIG;IACH,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;CACvG;AA0DD,eAAO,MAAM,MAAM,EAAE,MAAqB,CAAC"}
package/dist/logger.js ADDED
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.logger = void 0;
4
+ const node_async_hooks_1 = require("node:async_hooks");
5
+ const LEVELS = { debug: 0, info: 1, warn: 2, error: 3 };
6
+ const currentLevel = LEVELS[(process.env['LOG_LEVEL'] ?? 'info')] ?? 1;
7
+ const contextStorage = new node_async_hooks_1.AsyncLocalStorage();
8
+ function emit(level, fixedFields, data) {
9
+ if (LEVELS[level] < currentLevel)
10
+ return;
11
+ const ctx = contextStorage.getStore() ?? {};
12
+ process.stdout.write(JSON.stringify({ timestamp: new Date().toISOString(), level, ...ctx, ...fixedFields, ...data }) +
13
+ '\n');
14
+ }
15
+ function makeLogger(fixedFields = {}) {
16
+ return {
17
+ debug: (d) => emit('debug', fixedFields, d),
18
+ info: (d) => emit('info', fixedFields, d),
19
+ warn: (d) => emit('warn', fixedFields, d),
20
+ error: (d) => emit('error', fixedFields, d),
21
+ withContext(ctx, fn) {
22
+ const outer = contextStorage.getStore() ?? {};
23
+ return contextStorage.run({ ...outer, ...ctx }, fn);
24
+ },
25
+ child(moreFields) {
26
+ return makeLogger({ ...fixedFields, ...moreFields });
27
+ },
28
+ async time(step, fn, extra) {
29
+ emit('info', fixedFields, { event: 'STEP_START', step, ...extra });
30
+ const t = Date.now();
31
+ try {
32
+ const result = await fn();
33
+ emit('info', fixedFields, { event: 'STEP_END', step, duration_ms: Date.now() - t, ...extra });
34
+ return result;
35
+ }
36
+ catch (err) {
37
+ emit('error', fixedFields, {
38
+ event: 'STEP_ERROR',
39
+ step,
40
+ duration_ms: Date.now() - t,
41
+ error: err instanceof Error ? err.message : String(err),
42
+ ...extra,
43
+ });
44
+ throw err;
45
+ }
46
+ },
47
+ };
48
+ }
49
+ exports.logger = makeLogger();
50
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";;;AAAA,uDAAqD;AAErD,MAAM,MAAM,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAW,CAAC;AAEjE,MAAM,YAAY,GAChB,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,MAAM,CAAwB,CAAC,IAAI,CAAC,CAAC;AAkC3E,MAAM,cAAc,GAAG,IAAI,oCAAiB,EAAc,CAAC;AAE3D,SAAS,IAAI,CACX,KAA0B,EAC1B,WAAoC,EACpC,IAA6B;IAE7B,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,YAAY;QAAE,OAAO;IACzC,MAAM,GAAG,GAAG,cAAc,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5C,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,IAAI,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,GAAG,EAAE,GAAG,WAAW,EAAE,GAAG,IAAI,EAAE,CAAC;QAC7F,IAAI,CACP,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,cAAuC,EAAE;IAC3D,OAAO;QACL,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;QAC3C,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;QACzC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;QACzC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;QAE3C,WAAW,CAAI,GAAe,EAAE,EAAW;YACzC,MAAM,KAAK,GAAG,cAAc,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC9C,OAAO,cAAc,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,GAAG,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;QACtD,CAAC;QAED,KAAK,CAAC,UAAmC;YACvC,OAAO,UAAU,CAAC,EAAE,GAAG,WAAW,EAAE,GAAG,UAAU,EAAE,CAAC,CAAC;QACvD,CAAC;QAED,KAAK,CAAC,IAAI,CACR,IAAY,EACZ,EAAwB,EACxB,KAA+B;YAE/B,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;YACnE,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YACrB,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC;gBAC1B,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;gBAC9F,OAAO,MAAoB,CAAC;YAC9B,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE;oBACzB,KAAK,EAAE,YAAY;oBACnB,IAAI;oBACJ,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC;oBAC3B,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;oBACvD,GAAG,KAAK;iBACT,CAAC,CAAC;gBACH,MAAM,GAAG,CAAC;YACZ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAEY,QAAA,MAAM,GAAW,UAAU,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ContextEnvelope } from '../envelopes/ContextEnvelope';
2
+ import type { AgentPhase } from './phases';
3
+ export type LogLevel = 'DEBUG' | 'INFO' | 'WARN' | 'ERROR';
4
+ export interface EmitLogOptions {
5
+ level?: LogLevel;
6
+ meta?: Record<string, unknown>;
7
+ ts?: string;
8
+ timeoutMs?: number;
9
+ }
10
+ export declare function emitLog(ctx: ContextEnvelope, phase: AgentPhase, message: string, opts?: EmitLogOptions): Promise<void>;
11
+ //# sourceMappingURL=emitLog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emitLog.d.ts","sourceRoot":"","sources":["../../src/logging/emitLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD,wBAAsB,OAAO,CAC3B,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,IAAI,CAAC,CA4Bf"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emitLog = emitLog;
4
+ const DEFAULT_TIMEOUT_MS = 3000;
5
+ const MAX_MESSAGE_CHARS = 1000;
6
+ async function emitLog(ctx, phase, message, opts) {
7
+ if (!ctx?.log_callback_url || !ctx?.step_token)
8
+ return;
9
+ const { level = 'INFO', meta, ts = new Date().toISOString(), timeoutMs = DEFAULT_TIMEOUT_MS, } = opts ?? {};
10
+ try {
11
+ await fetch(ctx.log_callback_url, {
12
+ method: 'POST',
13
+ headers: {
14
+ 'Content-Type': 'application/json',
15
+ Authorization: `Bearer ${ctx.step_token}`,
16
+ },
17
+ body: JSON.stringify({
18
+ component: 'agent',
19
+ phase,
20
+ level,
21
+ message: message.slice(0, MAX_MESSAGE_CHARS),
22
+ meta,
23
+ ts,
24
+ }),
25
+ signal: AbortSignal.timeout(timeoutMs),
26
+ });
27
+ }
28
+ catch {
29
+ }
30
+ }
31
+ //# sourceMappingURL=emitLog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emitLog.js","sourceRoot":"","sources":["../../src/logging/emitLog.ts"],"names":[],"mappings":";;AAeA,0BAiCC;AApCD,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAExB,KAAK,UAAU,OAAO,CAC3B,GAAoB,EACpB,KAAiB,EACjB,OAAe,EACf,IAAqB;IAErB,IAAI,CAAC,GAAG,EAAE,gBAAgB,IAAI,CAAC,GAAG,EAAE,UAAU;QAAE,OAAO;IACvD,MAAM,EACJ,KAAK,GAAG,MAAM,EACd,IAAI,EACJ,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAC7B,SAAS,GAAG,kBAAkB,GAC/B,GAAG,IAAI,IAAI,EAAE,CAAC;IAEf,IAAI,CAAC;QACH,MAAM,KAAK,CAAC,GAAG,CAAC,gBAAgB,EAAE;YAChC,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,UAAU,GAAG,CAAC,UAAU,EAAE;aAC1C;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,SAAS,EAAE,OAAO;gBAClB,KAAK;gBACL,KAAK;gBACL,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,iBAAiB,CAAC;gBAC5C,IAAI;gBACJ,EAAE;aACH,CAAC;YACF,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC;SACvC,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;IACT,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const AGENT_PHASES: readonly ["context_parse", "llm_invoke", "llm_complete", "critic_tier1", "critic_tier2", "tool_call", "artifact_write", "result_emit"];
2
+ export type AgentPhase = (typeof AGENT_PHASES)[number];
3
+ //# sourceMappingURL=phases.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phases.d.ts","sourceRoot":"","sources":["../../src/logging/phases.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY,wIASf,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AGENT_PHASES = void 0;
4
+ exports.AGENT_PHASES = [
5
+ 'context_parse',
6
+ 'llm_invoke',
7
+ 'llm_complete',
8
+ 'critic_tier1',
9
+ 'critic_tier2',
10
+ 'tool_call',
11
+ 'artifact_write',
12
+ 'result_emit',
13
+ ];
14
+ //# sourceMappingURL=phases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phases.js","sourceRoot":"","sources":["../../src/logging/phases.ts"],"names":[],"mappings":";;;AACa,QAAA,YAAY,GAAG;IAC1B,eAAe;IACf,YAAY;IACZ,cAAc;IACd,cAAc;IACd,cAAc;IACd,WAAW;IACX,gBAAgB;IAChB,aAAa;CACL,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare function readManifest(raw: unknown): {
2
+ agent_id: string;
3
+ version: string;
4
+ };
5
+ export declare function withTimeout<T>(promise: Promise<T>, timeoutMs: number, label: string): Promise<T>;
6
+ //# sourceMappingURL=server-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-utils.d.ts","sourceRoot":"","sources":["../src/server-utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAchF;AAED,wBAAgB,WAAW,CAAC,CAAC,EAC3B,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EACnB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,CAAC,CAAC,CAUZ"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readManifest = readManifest;
4
+ exports.withTimeout = withTimeout;
5
+ function readManifest(raw) {
6
+ if (typeof raw === 'object' &&
7
+ raw !== null &&
8
+ 'agent_id' in raw &&
9
+ typeof raw.agent_id === 'string' &&
10
+ 'version' in raw &&
11
+ typeof raw.version === 'string') {
12
+ return raw;
13
+ }
14
+ throw new Error('agent.manifest.json must be provided with at least agent_id and version fields');
15
+ }
16
+ function withTimeout(promise, timeoutMs, label) {
17
+ return Promise.race([
18
+ promise,
19
+ new Promise((_, reject) => setTimeout(() => reject(new Error(`${label} timed out after ${timeoutMs}ms`)), timeoutMs)),
20
+ ]);
21
+ }
22
+ //# sourceMappingURL=server-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-utils.js","sourceRoot":"","sources":["../src/server-utils.ts"],"names":[],"mappings":";;AAAA,oCAcC;AAED,kCAcC;AA9BD,SAAgB,YAAY,CAAC,GAAY;IACvC,IACE,OAAO,GAAG,KAAK,QAAQ;QACvB,GAAG,KAAK,IAAI;QACZ,UAAU,IAAI,GAAG;QACjB,OAAQ,GAA6B,CAAC,QAAQ,KAAK,QAAQ;QAC3D,SAAS,IAAI,GAAG;QAChB,OAAQ,GAA4B,CAAC,OAAO,KAAK,QAAQ,EACzD,CAAC;QACD,OAAO,GAA4C,CAAC;IACtD,CAAC;IACD,MAAM,IAAI,KAAK,CACb,gFAAgF,CACjF,CAAC;AACJ,CAAC;AAED,SAAgB,WAAW,CACzB,OAAmB,EACnB,SAAiB,EACjB,KAAa;IAEb,OAAO,OAAO,CAAC,IAAI,CAAC;QAClB,OAAO;QACP,IAAI,OAAO,CAAI,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAC3B,UAAU,CACR,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,KAAK,oBAAoB,SAAS,IAAI,CAAC,CAAC,EAClE,SAAS,CACV,CACF;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,311 @@
1
+ import { z } from 'zod';
2
+ export declare const contextEnvelopeSchema: z.ZodObject<{
3
+ org_id: z.ZodString;
4
+ project_id: z.ZodString;
5
+ team_id: z.ZodString;
6
+ run_id: z.ZodString;
7
+ step_id: z.ZodString;
8
+ workflow_type: z.ZodString;
9
+ run_mode: z.ZodEnum<["CREATE", "MODIFY_ENHANCE"]>;
10
+ trigger: z.ZodObject<{
11
+ source: z.ZodString;
12
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ source: string;
15
+ payload: Record<string, unknown>;
16
+ }, {
17
+ source: string;
18
+ payload: Record<string, unknown>;
19
+ }>;
20
+ work_item_context: z.ZodString;
21
+ policy_snapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>;
22
+ prompt_refs: z.ZodArray<z.ZodObject<{
23
+ role: z.ZodString;
24
+ rendered: z.ZodString;
25
+ prompt_id: z.ZodOptional<z.ZodString>;
26
+ version: z.ZodOptional<z.ZodString>;
27
+ binding_key: z.ZodOptional<z.ZodString>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ role: string;
30
+ rendered: string;
31
+ prompt_id?: string | undefined;
32
+ version?: string | undefined;
33
+ binding_key?: string | undefined;
34
+ }, {
35
+ role: string;
36
+ rendered: string;
37
+ prompt_id?: string | undefined;
38
+ version?: string | undefined;
39
+ binding_key?: string | undefined;
40
+ }>, "many">;
41
+ redaction_profile: z.ZodRecord<z.ZodString, z.ZodUnknown>;
42
+ memory_refs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
43
+ agent_config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
44
+ log_callback_url: z.ZodString;
45
+ step_token: z.ZodString;
46
+ }, "strip", z.ZodTypeAny, {
47
+ org_id: string;
48
+ project_id: string;
49
+ team_id: string;
50
+ run_id: string;
51
+ step_id: string;
52
+ workflow_type: string;
53
+ run_mode: "CREATE" | "MODIFY_ENHANCE";
54
+ trigger: {
55
+ source: string;
56
+ payload: Record<string, unknown>;
57
+ };
58
+ work_item_context: string;
59
+ policy_snapshot: Record<string, unknown>;
60
+ prompt_refs: {
61
+ role: string;
62
+ rendered: string;
63
+ prompt_id?: string | undefined;
64
+ version?: string | undefined;
65
+ binding_key?: string | undefined;
66
+ }[];
67
+ redaction_profile: Record<string, unknown>;
68
+ agent_config: Record<string, unknown>;
69
+ log_callback_url: string;
70
+ step_token: string;
71
+ memory_refs?: Record<string, unknown> | undefined;
72
+ }, {
73
+ org_id: string;
74
+ project_id: string;
75
+ team_id: string;
76
+ run_id: string;
77
+ step_id: string;
78
+ workflow_type: string;
79
+ run_mode: "CREATE" | "MODIFY_ENHANCE";
80
+ trigger: {
81
+ source: string;
82
+ payload: Record<string, unknown>;
83
+ };
84
+ work_item_context: string;
85
+ policy_snapshot: Record<string, unknown>;
86
+ prompt_refs: {
87
+ role: string;
88
+ rendered: string;
89
+ prompt_id?: string | undefined;
90
+ version?: string | undefined;
91
+ binding_key?: string | undefined;
92
+ }[];
93
+ redaction_profile: Record<string, unknown>;
94
+ agent_config: Record<string, unknown>;
95
+ log_callback_url: string;
96
+ step_token: string;
97
+ memory_refs?: Record<string, unknown> | undefined;
98
+ }>;
99
+ export declare const resultEnvelopeSchema: z.ZodObject<{
100
+ status: z.ZodEnum<["SUCCEEDED", "FAILED", "HITL_REQUIRED"]>;
101
+ summary: z.ZodString;
102
+ output_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
103
+ action_requests: z.ZodOptional<z.ZodArray<z.ZodObject<{
104
+ action_id: z.ZodString;
105
+ action_key: z.ZodString;
106
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
107
+ required: z.ZodOptional<z.ZodBoolean>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ action_id: string;
110
+ action_key: string;
111
+ parameters: Record<string, unknown>;
112
+ required?: boolean | undefined;
113
+ }, {
114
+ action_id: string;
115
+ action_key: string;
116
+ parameters: Record<string, unknown>;
117
+ required?: boolean | undefined;
118
+ }>, "many">>;
119
+ artifacts_created: z.ZodOptional<z.ZodArray<z.ZodObject<{
120
+ artifact_id: z.ZodString;
121
+ type: z.ZodString;
122
+ title: z.ZodString;
123
+ content: z.ZodOptional<z.ZodString>;
124
+ url: z.ZodOptional<z.ZodString>;
125
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
126
+ artifact_id: z.ZodString;
127
+ type: z.ZodString;
128
+ title: z.ZodString;
129
+ content: z.ZodOptional<z.ZodString>;
130
+ url: z.ZodOptional<z.ZodString>;
131
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
132
+ artifact_id: z.ZodString;
133
+ type: z.ZodString;
134
+ title: z.ZodString;
135
+ content: z.ZodOptional<z.ZodString>;
136
+ url: z.ZodOptional<z.ZodString>;
137
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
138
+ critic_signal: z.ZodOptional<z.ZodObject<{
139
+ scorecard_id: z.ZodString;
140
+ overall: z.ZodEnum<["PASS", "WARN", "FAIL"]>;
141
+ checks: z.ZodArray<z.ZodObject<{
142
+ check_id: z.ZodString;
143
+ label: z.ZodString;
144
+ severity: z.ZodEnum<["INFO", "WARN", "ERROR"]>;
145
+ passed: z.ZodBoolean;
146
+ detail: z.ZodOptional<z.ZodString>;
147
+ }, "strip", z.ZodTypeAny, {
148
+ label: string;
149
+ check_id: string;
150
+ severity: "INFO" | "WARN" | "ERROR";
151
+ passed: boolean;
152
+ detail?: string | undefined;
153
+ }, {
154
+ label: string;
155
+ check_id: string;
156
+ severity: "INFO" | "WARN" | "ERROR";
157
+ passed: boolean;
158
+ detail?: string | undefined;
159
+ }>, "many">;
160
+ score: z.ZodOptional<z.ZodNumber>;
161
+ }, "strip", z.ZodTypeAny, {
162
+ scorecard_id: string;
163
+ overall: "WARN" | "PASS" | "FAIL";
164
+ checks: {
165
+ label: string;
166
+ check_id: string;
167
+ severity: "INFO" | "WARN" | "ERROR";
168
+ passed: boolean;
169
+ detail?: string | undefined;
170
+ }[];
171
+ score?: number | undefined;
172
+ }, {
173
+ scorecard_id: string;
174
+ overall: "WARN" | "PASS" | "FAIL";
175
+ checks: {
176
+ label: string;
177
+ check_id: string;
178
+ severity: "INFO" | "WARN" | "ERROR";
179
+ passed: boolean;
180
+ detail?: string | undefined;
181
+ }[];
182
+ score?: number | undefined;
183
+ }>>;
184
+ hitl_reason: z.ZodOptional<z.ZodString>;
185
+ hitl_options: z.ZodOptional<z.ZodArray<z.ZodObject<{
186
+ label: z.ZodString;
187
+ description: z.ZodString;
188
+ value: z.ZodOptional<z.ZodString>;
189
+ }, "strip", z.ZodTypeAny, {
190
+ label: string;
191
+ description: string;
192
+ value?: string | undefined;
193
+ }, {
194
+ label: string;
195
+ description: string;
196
+ value?: string | undefined;
197
+ }>, "many">>;
198
+ remember: z.ZodOptional<z.ZodArray<z.ZodObject<{
199
+ type: z.ZodEnum<["episodic", "semantic", "procedural"]>;
200
+ scope: z.ZodEnum<["workflow", "project", "tenant", "global"]>;
201
+ content: z.ZodString;
202
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
203
+ ttl_days: z.ZodOptional<z.ZodNumber>;
204
+ }, "strip", z.ZodTypeAny, {
205
+ type: "episodic" | "semantic" | "procedural";
206
+ scope: "workflow" | "project" | "tenant" | "global";
207
+ content: string;
208
+ tags?: string[] | undefined;
209
+ ttl_days?: number | undefined;
210
+ }, {
211
+ type: "episodic" | "semantic" | "procedural";
212
+ scope: "workflow" | "project" | "tenant" | "global";
213
+ content: string;
214
+ tags?: string[] | undefined;
215
+ ttl_days?: number | undefined;
216
+ }>, "many">>;
217
+ agent_summary: z.ZodOptional<z.ZodString>;
218
+ next_step_hint: z.ZodOptional<z.ZodString>;
219
+ metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ status: "SUCCEEDED" | "FAILED" | "HITL_REQUIRED";
222
+ summary: string;
223
+ output_data?: Record<string, unknown> | undefined;
224
+ action_requests?: {
225
+ action_id: string;
226
+ action_key: string;
227
+ parameters: Record<string, unknown>;
228
+ required?: boolean | undefined;
229
+ }[] | undefined;
230
+ artifacts_created?: z.objectOutputType<{
231
+ artifact_id: z.ZodString;
232
+ type: z.ZodString;
233
+ title: z.ZodString;
234
+ content: z.ZodOptional<z.ZodString>;
235
+ url: z.ZodOptional<z.ZodString>;
236
+ }, z.ZodTypeAny, "passthrough">[] | undefined;
237
+ critic_signal?: {
238
+ scorecard_id: string;
239
+ overall: "WARN" | "PASS" | "FAIL";
240
+ checks: {
241
+ label: string;
242
+ check_id: string;
243
+ severity: "INFO" | "WARN" | "ERROR";
244
+ passed: boolean;
245
+ detail?: string | undefined;
246
+ }[];
247
+ score?: number | undefined;
248
+ } | undefined;
249
+ hitl_reason?: string | undefined;
250
+ hitl_options?: {
251
+ label: string;
252
+ description: string;
253
+ value?: string | undefined;
254
+ }[] | undefined;
255
+ remember?: {
256
+ type: "episodic" | "semantic" | "procedural";
257
+ scope: "workflow" | "project" | "tenant" | "global";
258
+ content: string;
259
+ tags?: string[] | undefined;
260
+ ttl_days?: number | undefined;
261
+ }[] | undefined;
262
+ agent_summary?: string | undefined;
263
+ next_step_hint?: string | undefined;
264
+ metrics?: Record<string, unknown> | undefined;
265
+ }, {
266
+ status: "SUCCEEDED" | "FAILED" | "HITL_REQUIRED";
267
+ summary: string;
268
+ output_data?: Record<string, unknown> | undefined;
269
+ action_requests?: {
270
+ action_id: string;
271
+ action_key: string;
272
+ parameters: Record<string, unknown>;
273
+ required?: boolean | undefined;
274
+ }[] | undefined;
275
+ artifacts_created?: z.objectInputType<{
276
+ artifact_id: z.ZodString;
277
+ type: z.ZodString;
278
+ title: z.ZodString;
279
+ content: z.ZodOptional<z.ZodString>;
280
+ url: z.ZodOptional<z.ZodString>;
281
+ }, z.ZodTypeAny, "passthrough">[] | undefined;
282
+ critic_signal?: {
283
+ scorecard_id: string;
284
+ overall: "WARN" | "PASS" | "FAIL";
285
+ checks: {
286
+ label: string;
287
+ check_id: string;
288
+ severity: "INFO" | "WARN" | "ERROR";
289
+ passed: boolean;
290
+ detail?: string | undefined;
291
+ }[];
292
+ score?: number | undefined;
293
+ } | undefined;
294
+ hitl_reason?: string | undefined;
295
+ hitl_options?: {
296
+ label: string;
297
+ description: string;
298
+ value?: string | undefined;
299
+ }[] | undefined;
300
+ remember?: {
301
+ type: "episodic" | "semantic" | "procedural";
302
+ scope: "workflow" | "project" | "tenant" | "global";
303
+ content: string;
304
+ tags?: string[] | undefined;
305
+ ttl_days?: number | undefined;
306
+ }[] | undefined;
307
+ agent_summary?: string | undefined;
308
+ next_step_hint?: string | undefined;
309
+ metrics?: Record<string, unknown> | undefined;
310
+ }>;
311
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBhC,CAAC;AAgDH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa/B,CAAC"}