@sapiom/agent-core 0.6.0 → 0.8.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/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # @sapiom/orchestration-core
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3dfbd10: Ship the `sapiom-agent-authoring` skill with every scaffold, and finish the MCP
8
+ instructions rename.
9
+
10
+ - New canonical skill (`agent-core/skills/sapiom-agent-authoring/SKILL.md`) with a
11
+ task-shape trigger ("automate a multi-step / scheduled / deployable task"), the full
12
+ authoring guide (`defineAgent`, directives, pause/resume, stubs), and a bootstrap
13
+ step for agents whose client doesn't have the sapiom-dev MCP yet.
14
+ - Both scaffold templates ship it at `.claude/skills/sapiom-agent-authoring/` (auto-loads
15
+ as a project skill in Claude Code) and `AGENTS.md` points to it, so every scaffolded
16
+ project self-documents. A sync test keeps template copies identical to the canonical.
17
+ - `@sapiom/mcp`'s bundled instructions fallback rewritten to the agents/models
18
+ vocabulary (the rename left it on the old text), thinned to lifecycle + canonical
19
+ rules + pointers — deep guidance lives in the skill/AGENTS.md/docs.
20
+
21
+ ### Patch Changes
22
+
23
+ - 020139a: `check()` now recognizes workflow definitions authored against the pre-rename SDK: `@sapiom/agent` exports `isLegacyOrchestrationDefinition`/`LEGACY_ORCHESTRATION_DEFINITION_BRAND` (the `Symbol.for('sapiom.orchestration.definition')` brand the old `defineOrchestration` attached), and `@sapiom/agent-core`'s `check()` accepts either brand in its export detection — the definition shape is unchanged by the rename, so manifests build identically. `check()` also gains a `typecheck` option (default `true`): pass `typecheck: false` to skip the project's `tsc --noEmit` when only the manifest/graph is needed (esbuild still surfaces bundle-level breakage).
24
+ - Updated dependencies [020139a]
25
+ - @sapiom/agent@0.6.1
26
+
27
+ ## 0.7.0
28
+
29
+ ### Minor Changes
30
+
31
+ - 7a9d57a: Rename the execution-context field `ctx.workflowName` → `ctx.agentName`.
32
+
33
+ **Breaking:** a step that reads `ctx.workflowName` must now read `ctx.agentName`. The value is unchanged — the agent's name (slug).
34
+
35
+ ### Patch Changes
36
+
37
+ - Updated dependencies [7a9d57a]
38
+ - @sapiom/agent@0.6.0
39
+ - @sapiom/agent-runtime@0.3.1
40
+
3
41
  ## 0.6.0
4
42
 
5
43
  ### Minor Changes
@@ -1,5 +1,6 @@
1
1
  export interface CheckOptions {
2
2
  sourceDir: string;
3
+ typecheck?: boolean;
3
4
  }
4
5
  export interface CheckResult {
5
6
  name: string;
package/dist/cjs/check.js CHANGED
@@ -76,9 +76,11 @@ async function check(opts) {
76
76
  });
77
77
  }
78
78
  const warnings = [];
79
- const typecheckSkip = runTypecheck(sourceDir);
80
- if (typecheckSkip)
81
- warnings.push(typecheckSkip);
79
+ if (opts.typecheck !== false) {
80
+ const typecheckSkip = runTypecheck(sourceDir);
81
+ if (typecheckSkip)
82
+ warnings.push(typecheckSkip);
83
+ }
82
84
  const tmp = (0, node_fs_1.mkdtempSync)(node_path_1.default.join((0, node_os_1.tmpdir)(), 'sapiom-check-'));
83
85
  const bundlePath = node_path_1.default.join(tmp, 'definition.mjs');
84
86
  try {
@@ -103,8 +105,9 @@ async function check(opts) {
103
105
  const mod = await Promise.resolve(`${`file://${bundlePath}?t=${Date.now()}`}`).then(s => __importStar(require(s)));
104
106
  const defs = [];
105
107
  for (const value of Object.values(mod)) {
106
- if ((0, agent_1.isAgentDefinition)(value) && !defs.includes(value))
108
+ if (((0, agent_1.isAgentDefinition)(value) || (0, agent_1.isLegacyOrchestrationDefinition)(value)) && !defs.includes(value)) {
107
109
  defs.push(value);
110
+ }
108
111
  }
109
112
  if (defs.length === 0) {
110
113
  throw new errors_js_1.AgentOperationError({
@@ -48,7 +48,7 @@ class LocalStubDispatcher {
48
48
  });
49
49
  const ctx = {
50
50
  executionId: request.executionId,
51
- workflowName: request.workflowName,
51
+ agentName: request.workflowName,
52
52
  organizationId: request.organizationId,
53
53
  tenantId: request.tenantId,
54
54
  input: request.workflowInput,
@@ -1,5 +1,6 @@
1
1
  export interface CheckOptions {
2
2
  sourceDir: string;
3
+ typecheck?: boolean;
3
4
  }
4
5
  export interface CheckResult {
5
6
  name: string;
package/dist/esm/check.js CHANGED
@@ -3,7 +3,7 @@ import { createHash } from 'node:crypto';
3
3
  import { existsSync, mkdtempSync, readFileSync, rmSync } from 'node:fs';
4
4
  import { tmpdir } from 'node:os';
5
5
  import path from 'node:path';
6
- import { assertValidGraph, buildManifest, isAgentDefinition, agentManifestSchema } from '@sapiom/agent';
6
+ import { assertValidGraph, buildManifest, isAgentDefinition, isLegacyOrchestrationDefinition, agentManifestSchema, } from '@sapiom/agent';
7
7
  import * as esbuild from 'esbuild';
8
8
  import { AgentOperationError } from './errors.js';
9
9
  function runTypecheck(sourceDir) {
@@ -37,9 +37,11 @@ export async function check(opts) {
37
37
  });
38
38
  }
39
39
  const warnings = [];
40
- const typecheckSkip = runTypecheck(sourceDir);
41
- if (typecheckSkip)
42
- warnings.push(typecheckSkip);
40
+ if (opts.typecheck !== false) {
41
+ const typecheckSkip = runTypecheck(sourceDir);
42
+ if (typecheckSkip)
43
+ warnings.push(typecheckSkip);
44
+ }
43
45
  const tmp = mkdtempSync(path.join(tmpdir(), 'sapiom-check-'));
44
46
  const bundlePath = path.join(tmp, 'definition.mjs');
45
47
  try {
@@ -64,8 +66,9 @@ export async function check(opts) {
64
66
  const mod = await import(`file://${bundlePath}?t=${Date.now()}`);
65
67
  const defs = [];
66
68
  for (const value of Object.values(mod)) {
67
- if (isAgentDefinition(value) && !defs.includes(value))
69
+ if ((isAgentDefinition(value) || isLegacyOrchestrationDefinition(value)) && !defs.includes(value)) {
68
70
  defs.push(value);
71
+ }
69
72
  }
70
73
  if (defs.length === 0) {
71
74
  throw new AgentOperationError({
@@ -45,7 +45,7 @@ export class LocalStubDispatcher {
45
45
  });
46
46
  const ctx = {
47
47
  executionId: request.executionId,
48
- workflowName: request.workflowName,
48
+ agentName: request.workflowName,
49
49
  organizationId: request.organizationId,
50
50
  tenantId: request.tenantId,
51
51
  input: request.workflowInput,