@sema-agent/cli 1.0.15 → 1.0.16

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 (3) hide show
  1. package/npm-shrinkwrap.json +14 -14
  2. package/package.json +5 -5
  3. package/sema.js +127 -22
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@sema-agent/cli",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sema-agent/cli",
9
- "version": "1.0.15",
9
+ "version": "1.0.16",
10
10
  "license": "BUSL-1.1",
11
11
  "dependencies": {
12
12
  "@sema-agent/sdk": "0.0.53",
13
- "@sema-agent/server": "1.220.0"
13
+ "@sema-agent/server": "1.223.0"
14
14
  },
15
15
  "bin": {
16
16
  "sema": "sema.js"
@@ -629,9 +629,9 @@
629
629
  }
630
630
  },
631
631
  "node_modules/@sema-agent/core": {
632
- "version": "1.312.0",
633
- "resolved": "https://registry.npmjs.org/@sema-agent/core/-/core-1.312.0.tgz",
634
- "integrity": "sha512-a50syYHBa3TT1FjqZCGwK2YH3gt6o4YiyamJYGwY4ABdwCaj8wGBJZmkQw48J+1XEDo7NL/rV5xtaNzxn656Gw==",
632
+ "version": "1.317.0",
633
+ "resolved": "https://registry.npmjs.org/@sema-agent/core/-/core-1.317.0.tgz",
634
+ "integrity": "sha512-5RI3IW6cW3hE4WWGGV6mOADCLblWiegRMOyIUcCudjPW0rwplUMH7WiKjsJ2mPHQN6a6aUe/3/OjPek1w/N3Aw==",
635
635
  "license": "BUSL-1.1",
636
636
  "dependencies": {
637
637
  "@modelcontextprotocol/sdk": "1.29.0",
@@ -645,9 +645,9 @@
645
645
  }
646
646
  },
647
647
  "node_modules/@sema-agent/registry-core": {
648
- "version": "0.10.15",
649
- "resolved": "https://registry.npmjs.org/@sema-agent/registry-core/-/registry-core-0.10.15.tgz",
650
- "integrity": "sha512-nOwzBLFSMSgpkP9ftPLPj68IzhsP8fHrT+isCojNPF9oywFsROpFiNzNszmFsTt53eBnpQ+tHwxdsJXU0vV1xA==",
648
+ "version": "0.10.19",
649
+ "resolved": "https://registry.npmjs.org/@sema-agent/registry-core/-/registry-core-0.10.19.tgz",
650
+ "integrity": "sha512-cRqXxGfcnRGY7UM6/ljYZucTt1NcCC0nXt0g1ChDzy+KiiHKuYwgN0jf7iTaT1yyHl+15bYlbA6TMJ2/dEoOQA==",
651
651
  "license": "BUSL-1.1",
652
652
  "dependencies": {
653
653
  "zod": "^3.24.0"
@@ -678,13 +678,13 @@
678
678
  }
679
679
  },
680
680
  "node_modules/@sema-agent/server": {
681
- "version": "1.220.0",
682
- "resolved": "https://registry.npmjs.org/@sema-agent/server/-/server-1.220.0.tgz",
683
- "integrity": "sha512-3i1zW48+gxS6Csb7YDD8PiLInphHtFeLBKTTexwoBCA6bYKqwHSJeO1Zr3YzHTzSm/+gqmOs2VGRCqNYbOz8gg==",
681
+ "version": "1.223.0",
682
+ "resolved": "https://registry.npmjs.org/@sema-agent/server/-/server-1.223.0.tgz",
683
+ "integrity": "sha512-rpgtgF2mQKrFjGY/1SVxVGgkCtMPy7g856NTa5Vv35ugNtqkbRuLoJg70qAgfNWaqSWbGUqgpw5K7DYdOfJ9uw==",
684
684
  "license": "BUSL-1.1",
685
685
  "dependencies": {
686
- "@sema-agent/core": "^1.311.0",
687
- "@sema-agent/registry-core": "^0.10.14",
686
+ "@sema-agent/core": "^1.315.0",
687
+ "@sema-agent/registry-core": "^0.10.16",
688
688
  "e2b": "^2.28.0",
689
689
  "libsodium-wrappers": "^0.8.4",
690
690
  "mysql2": "^3.22.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/cli",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "Sema — your own Claude Code-grade coding agent, in the terminal.",
5
5
  "license": "BUSL-1.1",
6
6
  "bin": {
@@ -22,13 +22,13 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "@sema-agent/sdk": "0.0.53",
25
- "@sema-agent/server": "1.220.0"
25
+ "@sema-agent/server": "1.223.0"
26
26
  },
27
27
  "overrides": {
28
- "@sema-agent/core": "1.312.0",
29
- "@sema-agent/registry-core": "0.10.15"
28
+ "@sema-agent/core": "1.317.0",
29
+ "@sema-agent/registry-core": "0.10.19"
30
30
  },
31
- "semaEngineVersion": "server 1.220.0 / core 1.312.0 / registry-core 0.10.15",
31
+ "semaEngineVersion": "server 1.223.0 / core 1.317.0 / registry-core 0.10.19",
32
32
  "engines": {
33
33
  "node": ">=18"
34
34
  }
package/sema.js CHANGED
@@ -157572,11 +157572,41 @@ function ultracodeFromInput(humanInput) {
157572
157572
  function ultracodeForRequest(humanInput) {
157573
157573
  return getUltracodePreset() || ultracodeFromInput(humanInput) ? true : void 0;
157574
157574
  }
157575
- var ultracodePreset, ULTRACODE_KEYWORD;
157575
+ function workflowFromInput(humanInput) {
157576
+ return typeof humanInput === "string" && WORKFLOW_KEYWORD.test(humanInput) ? true : void 0;
157577
+ }
157578
+ function deferOptedOut(env5) {
157579
+ const raw2 = env5[WORKFLOW_DEFER_ENV];
157580
+ const s = typeof raw2 === "string" ? raw2.trim().toLowerCase() : "";
157581
+ return s === "0" || s === "false" || s === "no" || s === "off";
157582
+ }
157583
+ function workflowDeferForRequest(humanInput, env5 = process.env) {
157584
+ if (deferOptedOut(env5)) return void 0;
157585
+ if (getUltracodePreset() || ultracodeFromInput(humanInput) || workflowFromInput(humanInput)) return void 0;
157586
+ return ["Workflow"];
157587
+ }
157588
+ function extraDeferFromEnv(env5) {
157589
+ const raw2 = env5[DEFER_TOOLS_ENV];
157590
+ if (typeof raw2 !== "string" || raw2.trim().length === 0) return [];
157591
+ return raw2.split(",").map((s) => s.trim()).filter((s) => s.length > 0);
157592
+ }
157593
+ function deferToolsForRequest(humanInput, env5 = process.env) {
157594
+ const workflowLane = workflowDeferForRequest(humanInput, env5) ?? [];
157595
+ const extra = extraDeferFromEnv(env5).filter(
157596
+ (name) => name !== "Workflow" || workflowLane.length > 0
157597
+ // activation wins over the env list for Workflow
157598
+ );
157599
+ const merged = [.../* @__PURE__ */ new Set([...workflowLane, ...extra])];
157600
+ return merged.length > 0 ? merged : void 0;
157601
+ }
157602
+ var ultracodePreset, ULTRACODE_KEYWORD, WORKFLOW_KEYWORD, WORKFLOW_DEFER_ENV, DEFER_TOOLS_ENV;
157576
157603
  var init_ultracodeWireCaps = __esm({
157577
157604
  "build-src/src/sema/ultracodeWireCaps.ts"() {
157578
157605
  ultracodePreset = false;
157579
157606
  ULTRACODE_KEYWORD = /\bultracode\b/i;
157607
+ WORKFLOW_KEYWORD = /\bworkflows?\b/i;
157608
+ WORKFLOW_DEFER_ENV = "SEMA_WORKFLOW_DEFER";
157609
+ DEFER_TOOLS_ENV = "SEMA_DEFER_TOOLS";
157580
157610
  }
157581
157611
  });
157582
157612
 
@@ -268590,7 +268620,7 @@ var require_websocket2 = __commonJS({
268590
268620
  var http3 = __require("http");
268591
268621
  var net = __require("net");
268592
268622
  var tls = __require("tls");
268593
- var { randomBytes: randomBytes26, createHash: createHash27 } = __require("crypto");
268623
+ var { randomBytes: randomBytes26, createHash: createHash28 } = __require("crypto");
268594
268624
  var { Duplex, Readable: Readable5 } = __require("stream");
268595
268625
  var { URL: URL6 } = __require("url");
268596
268626
  var PerMessageDeflate2 = require_permessage_deflate2();
@@ -269258,7 +269288,7 @@ var require_websocket2 = __commonJS({
269258
269288
  abortHandshake(websocket, socket, "Invalid Upgrade header");
269259
269289
  return;
269260
269290
  }
269261
- const digest = createHash27("sha1").update(key + GUID).digest("base64");
269291
+ const digest = createHash28("sha1").update(key + GUID).digest("base64");
269262
269292
  if (res.headers["sec-websocket-accept"] !== digest) {
269263
269293
  abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Accept header");
269264
269294
  return;
@@ -269627,7 +269657,7 @@ var require_websocket_server = __commonJS({
269627
269657
  var EventEmitter5 = __require("events");
269628
269658
  var http3 = __require("http");
269629
269659
  var { Duplex } = __require("stream");
269630
- var { createHash: createHash27 } = __require("crypto");
269660
+ var { createHash: createHash28 } = __require("crypto");
269631
269661
  var extension2 = require_extension();
269632
269662
  var PerMessageDeflate2 = require_permessage_deflate2();
269633
269663
  var subprotocol2 = require_subprotocol();
@@ -269934,7 +269964,7 @@ var require_websocket_server = __commonJS({
269934
269964
  );
269935
269965
  }
269936
269966
  if (this._state > RUNNING) return abortHandshake(socket, 503);
269937
- const digest = createHash27("sha1").update(key + GUID).digest("base64");
269967
+ const digest = createHash28("sha1").update(key + GUID).digest("base64");
269938
269968
  const headers = [
269939
269969
  "HTTP/1.1 101 Switching Protocols",
269940
269970
  "Upgrade: websocket",
@@ -331873,9 +331903,9 @@ function streamingTailWrap(unstableSuffix) {
331873
331903
  var import_compiler_runtime43, import_react43, import_jsx_runtime53, TOKEN_CACHE_MAX, tokenCache, MD_SYNTAX_RE;
331874
331904
  var init_Markdown = __esm({
331875
331905
  "build-src/src/components/Markdown.tsx"() {
331876
- import_compiler_runtime43 = __toESM(require_compiler_runtime(), 1);
331906
+ import_compiler_runtime43 = __toESM(require_compiler_runtime());
331877
331907
  init_marked_esm();
331878
- import_react43 = __toESM(require_react(), 1);
331908
+ import_react43 = __toESM(require_react());
331879
331909
  init_useSettings();
331880
331910
  init_ink2();
331881
331911
  init_cliHighlight();
@@ -331883,7 +331913,7 @@ var init_Markdown = __esm({
331883
331913
  init_markdown();
331884
331914
  init_messages4();
331885
331915
  init_MarkdownTable();
331886
- import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
331916
+ import_jsx_runtime53 = __toESM(require_jsx_runtime());
331887
331917
  TOKEN_CACHE_MAX = 500;
331888
331918
  tokenCache = /* @__PURE__ */ new Map();
331889
331919
  MD_SYNTAX_RE = /[#*`|[>\-_~]|\n\n|^\d+\. |\n\d+\. /;
@@ -354276,7 +354306,7 @@ var init_classifierApprovalsHook = __esm({
354276
354306
  var React29, SentryErrorBoundary;
354277
354307
  var init_SentryErrorBoundary = __esm({
354278
354308
  "build-src/src/components/SentryErrorBoundary.ts"() {
354279
- React29 = __toESM(require_react(), 1);
354309
+ React29 = __toESM(require_react());
354280
354310
  SentryErrorBoundary = class extends React29.Component {
354281
354311
  constructor(props) {
354282
354312
  super(props);
@@ -433337,6 +433367,10 @@ function toTaskRequest(params) {
433337
433367
  if (selfOrchestration && process.env.SEMA_DEBUG) {
433338
433368
  console.error("[sema][seamQuery] selfOrchestration wire: SEMA_SELF_ORCHESTRATION \u2192 TaskRequest.selfOrchestration=true (run_workflow)");
433339
433369
  }
433370
+ const deferTools = selfOrchestration ? deferToolsForRequest(objective) : void 0;
433371
+ if (deferTools && process.env.SEMA_DEBUG) {
433372
+ console.error("[sema][seamQuery] deferTools wire: Workflow deferred (no activation source this turn)");
433373
+ }
433340
433374
  const retainBackground = process.env.SEMA_LIVE_BASEURL ? retainBackgroundFromEnv() : void 0;
433341
433375
  if (retainBackground && process.env.SEMA_DEBUG) {
433342
433376
  console.error("[sema][seamQuery] retainBackground wire: SEMA_RETAIN_BACKGROUND \u2192 TaskRequest.retainBackgroundProcesses=true");
@@ -433420,6 +433454,9 @@ ${objective}`;
433420
433454
  // Workflow super-set: the top-level selfOrchestration flag (SEMA_SELF_ORCHESTRATION env opt-in, live-gated).
433421
433455
  // Present ⇒ the SERVICE mounts core run_workflow (gated on its deployment/tenant policy); absent ⇒ no stamp.
433422
433456
  ...selfOrchestration ? { selfOrchestration } : {},
433457
+ // Workflow deferred-disclosure ([1052]①): absent = fully exposed (activation turn / opt-out); present =
433458
+ // core 1.314 placeholder-on-wire, schema bytes out of the cache prefix, ToolSearch-activatable.
433459
+ ...deferTools ? { deferTools } : {},
433423
433460
  ...retainBackground ? { retainBackgroundProcesses: retainBackground } : {},
433424
433461
  // Fork super-set: the top-level enableFork flag — EXPLICIT boolean on live (core ≥1.257 treats absent
433425
433462
  // as granted; the shell's default-OFF product decision must be spelled out). Mock path stays unstamped.
@@ -450671,7 +450708,7 @@ function Settings({
450671
450708
  var import_react113, import_jsx_runtime192;
450672
450709
  var init_cmd_config = __esm({
450673
450710
  "build-src/src/sema/overrides/cmd-config.tsx"() {
450674
- import_react113 = __toESM(require_react(), 1);
450711
+ import_react113 = __toESM(require_react());
450675
450712
  init_useKeybinding();
450676
450713
  init_useExitOnCtrlCDWithKeybindings();
450677
450714
  init_useTerminalSize();
@@ -450682,7 +450719,7 @@ var init_cmd_config = __esm({
450682
450719
  init_Config();
450683
450720
  init_settings_usage();
450684
450721
  init_Stats();
450685
- import_jsx_runtime192 = __toESM(require_jsx_runtime(), 1);
450722
+ import_jsx_runtime192 = __toESM(require_jsx_runtime());
450686
450723
  }
450687
450724
  });
450688
450725
 
@@ -479549,8 +479586,8 @@ var init_sema_brand = __esm({
479549
479586
  "Slash-command gating wired to the fleet capability handshake"
479550
479587
  ]
479551
479588
  },
479552
- productVersion: "1.0.15",
479553
- announcement: "sema 1.0.15 \u2014 headless (-p) runs stop mounting scheduler tools they can never honor (leaner prompts, faster turns), the init frame reports the tools actually mounted, and background processes can be retained past teardown with SEMA_RETAIN_BACKGROUND=1"
479589
+ productVersion: "1.0.16",
479590
+ announcement: 'sema 1.0.16 \u2014 Workflow is now exposed on demand: say "workflow" or "ultracode" (or pick /effort ultracode) to surface it that turn; otherwise its schema stays out of your prompt for a leaner, cache-stable context. Opt out with SEMA_WORKFLOW_DEFER=0.'
479554
479591
  };
479555
479592
  }
479556
479593
  });
@@ -482484,8 +482521,8 @@ var require_sema_brand = __commonJS({
482484
482521
  "Slash-command gating wired to the fleet capability handshake"
482485
482522
  ]
482486
482523
  },
482487
- productVersion: "1.0.15",
482488
- announcement: "sema 1.0.15 \u2014 headless (-p) runs stop mounting scheduler tools they can never honor (leaner prompts, faster turns), the init frame reports the tools actually mounted, and background processes can be retained past teardown with SEMA_RETAIN_BACKGROUND=1"
482524
+ productVersion: "1.0.16",
482525
+ announcement: 'sema 1.0.16 \u2014 Workflow is now exposed on demand: say "workflow" or "ultracode" (or pick /effort ultracode) to surface it that turn; otherwise its schema stays out of your prompt for a leaner, cache-stable context. Opt out with SEMA_WORKFLOW_DEFER=0.'
482489
482526
  };
482490
482527
  }
482491
482528
  });
@@ -496971,7 +497008,7 @@ function extraBodyUnsafe(v2) {
496971
497008
  function workerRouteKey(w2) {
496972
497009
  return w2.routePrefix ?? w2.name;
496973
497010
  }
496974
- var SECRET_LITERAL_RE, ENV_NAME, hasNul, NON_SECRET_URL, K8S_QUANTITY, TCP_PORT, ModelCost, SEALED_BOX_ALG, BASE64_SHAPE, SealedApiKey, ModelEntry2, ModelRole, RoleTarget, TierBindings, TierGroup, ModelsConfig, RosterEntry, RostersConfig, ScenarioEntry, ScenarioConfig, DELIVER_DENYLIST, SystemEntry, SystemsConfig, SystemStatusEntry, RuntimeConfig, GovernanceConfig, EntitlementBudget, TokenQuota, BudgetGroupMember, BudgetGroup, ScenarioAssignments, EntitlementRuntimeCaps, EntitlementTier, EntitlementOverride, EntitlementSubject, EntitlementGroupBinding, EntitlementConfig, SESSION_MIRROR_ENGINE_URL, SessionMirrorPolicy, ExecutionPublicKey, ExecutionPolicy, PROJECT_ID_REGEX, ProjectRegistration, ProjectsConfig, CollabTopology, CollabFinalizerType, CollabEarlyStop, CollabPersistence, CollabMember, CollabSlot, CollabTemplate, CollabConfig, DURATION, WorkerLifecycle, WorkerSecretRefs, RESERVED_WORKER_ENV, RESERVED_ENV_FIELD, WorkerSpec, WorkersConfig, WorkerCondition, WorkerStatus, HOST_NAME_MAX, HOSTS_ARRAY_MAX, HostEntry, HostsConfig, PROBE_CPU_CORES_MAX, PROBE_MEM_BYTES_MAX, HostProbes, HostStatus, SkillSpec, SkillsConfig, McpEnvRefs, HTTP_HEADER_NAME, McpHeaderRefs, McpTransport, McpServerSpec, McpConfig, PLUGIN_ORIGIN, GIT_COMMIT_SHA, PluginSource, PluginSpec, PluginsConfig, DOMAIN_SCHEMAS, SettingSource, EffectiveKey, DOMAINS;
497011
+ var SECRET_LITERAL_RE, ENV_NAME, hasNul, NON_SECRET_URL, K8S_QUANTITY, TCP_PORT, ModelCost, SEALED_BOX_ALG, BASE64_SHAPE, SealedApiKey, ModelEntry2, ModelRole, RoleTarget, TierBindings, TierGroup, ModelsConfig, RosterEntry, RostersConfig, ScenarioEntry, ScenarioConfig, DELIVER_DENYLIST, SystemEntry, SystemsConfig, SystemStatusEntry, RuntimeConfig, GovernanceConfig, EntitlementBudget, TokenQuota, BudgetGroupMember, BudgetGroup, ScenarioAssignments, EntitlementRuntimeCaps, EntitlementTier, EntitlementOverride, EntitlementSubject, EntitlementGroupBinding, EntitlementConfig, SESSION_MIRROR_ENGINE_URL, SessionMirrorPolicy, ExecutionPublicKey, ExecutionPolicy, PROJECT_ID_REGEX, ProjectRegistration, ProjectsConfig, CollabTopology, CollabFinalizerType, CollabEarlyStop, CollabPersistence, CollabMember, CollabSlot, CollabTemplate, CollabConfig, DURATION, WorkerLifecycle, WorkerSecretRefs, RESERVED_WORKER_ENV, RESERVED_ENV_FIELD, WorkerSpec, WorkersConfig, WorkerCondition, WorkerStatus, HOST_NAME_MAX, HOSTS_ARRAY_MAX, HostEntry, HostsConfig, PROBE_CPU_CORES_MAX, PROBE_MEM_BYTES_MAX, HostProbes, HostStatus, SkillSpec, SkillsConfig, McpEnvRefs, HTTP_HEADER_NAME, McpHeaderRefs, McpTransport, McpServerSpec, McpConfig, PLUGIN_ORIGIN, GIT_COMMIT_SHA, PluginSource, PluginSpec, PluginsConfig, PromptTextDeclaration, PromptBinding, PromptsConfig, EffectivePrompts, DOMAIN_SCHEMAS, SettingSource, EffectiveKey, DOMAINS;
496975
497012
  var init_types19 = __esm({
496976
497013
  "node_modules/@sema-agent/registry-core/dist/types.js"() {
496977
497014
  init_zod2();
@@ -497157,7 +497194,6 @@ var init_types19 = __esm({
497157
497194
  ScenarioEntry = external_exports3.object({
497158
497195
  name: external_exports3.string().regex(/^[a-z][a-z0-9-]{1,31}$/, "lowercase slug, 2-32 chars (a-z, 0-9, -)"),
497159
497196
  toolset: external_exports3.string().regex(/^[a-z][a-z0-9-]{0,63}$/, "toolset key (lowercase slug)"),
497160
- prompt: external_exports3.string().max(4096).optional(),
497161
497197
  enabled: external_exports3.boolean().default(true),
497162
497198
  notes: external_exports3.string().optional()
497163
497199
  });
@@ -497784,6 +497820,36 @@ var init_types19 = __esm({
497784
497820
  seen.add(p.name);
497785
497821
  });
497786
497822
  });
497823
+ PromptTextDeclaration = external_exports3.object({
497824
+ id: external_exports3.string().min(1).max(128),
497825
+ slot: external_exports3.enum(["identity", "scenario", "behavior"]),
497826
+ text: external_exports3.string().max(65536),
497827
+ contentHash: external_exports3.string().regex(/^sha256:[0-9a-f]{64}$/).optional()
497828
+ });
497829
+ PromptBinding = external_exports3.object({
497830
+ level: external_exports3.enum(["global", "worker", "scenario"]),
497831
+ worker: external_exports3.string().min(1).max(190).optional(),
497832
+ scenario: external_exports3.string().regex(/^[a-z][a-z0-9-]{1,31}$/).optional(),
497833
+ declarations: external_exports3.array(PromptTextDeclaration).max(64),
497834
+ enabled: external_exports3.boolean().default(true),
497835
+ notes: external_exports3.string().optional()
497836
+ }).superRefine((b3, ctx) => {
497837
+ if (b3.level === "worker" && !b3.worker)
497838
+ ctx.addIssue({ code: "custom", message: "level=worker requires `worker`" });
497839
+ if (b3.level === "scenario" && !b3.scenario)
497840
+ ctx.addIssue({ code: "custom", message: "level=scenario requires `scenario`" });
497841
+ if (b3.level === "global" && (b3.worker || b3.scenario))
497842
+ ctx.addIssue({ code: "custom", message: "level=global must not carry a selector" });
497843
+ });
497844
+ PromptsConfig = external_exports3.object({
497845
+ bindings: external_exports3.array(PromptBinding).max(256).default([])
497846
+ });
497847
+ EffectivePrompts = external_exports3.object({
497848
+ packId: external_exports3.string().regex(/^center:[0-9a-f]{12}$/),
497849
+ contentDigest: external_exports3.string().regex(/^sha256:[0-9a-f]{64}$/),
497850
+ sections: external_exports3.array(PromptTextDeclaration),
497851
+ scenarioOverrides: external_exports3.record(external_exports3.string(), external_exports3.array(PromptTextDeclaration)).optional()
497852
+ });
497787
497853
  DOMAIN_SCHEMAS = {
497788
497854
  models: ModelsConfig,
497789
497855
  rosters: RostersConfig,
@@ -497799,7 +497865,8 @@ var init_types19 = __esm({
497799
497865
  governance: GovernanceConfig,
497800
497866
  entitlement: EntitlementConfig,
497801
497867
  execution: ExecutionPolicy,
497802
- projects: ProjectsConfig
497868
+ projects: ProjectsConfig,
497869
+ prompts: PromptsConfig
497803
497870
  };
497804
497871
  SettingSource = external_exports3.discriminatedUnion("axis", [
497805
497872
  external_exports3.object({ axis: external_exports3.literal("layer"), layer: external_exports3.enum(["MANAGED", "PROJECT", "LOCAL"]), applied: external_exports3.boolean().optional(), reason: external_exports3.string().optional() }),
@@ -552734,7 +552801,8 @@ var init_epoch = __esm({
552734
552801
  orchestrationEnabled: false,
552735
552802
  awarenessEnabled: false,
552736
552803
  goalEnabled: false,
552737
- worktreeIsolated: false
552804
+ worktreeIsolated: false,
552805
+ teammateEnabled: false
552738
552806
  };
552739
552807
  PROBE_FACTS_ON = Object.fromEntries(Object.keys(PROBE_FACTS_OFF).map((k2) => [k2, true]));
552740
552808
  PROBE_VECTORS = [
@@ -553524,6 +553592,20 @@ An object or array parameter value must be a single JSON value \u2014 never writ
553524
553592
  }
553525
553593
  });
553526
553594
 
553595
+ // node_modules/@sema-agent/core/dist/prompts/coordinator.js
553596
+ var TEAMMATE_COMMUNICATION_ADDENDUM;
553597
+ var init_coordinator = __esm({
553598
+ "node_modules/@sema-agent/core/dist/prompts/coordinator.js"() {
553599
+ TEAMMATE_COMMUNICATION_ADDENDUM = `# Agent Teammate Communication
553600
+
553601
+ IMPORTANT: You are running as a named agent in a team. To communicate, use the SendMessage tool \u2014 \`to: "main"\` sends an update to the spawning conversation; \`to: "<name>"\` continues a teammate that has COMPLETED its run (a running teammate cannot receive messages yet \u2014 wait for its completion).
553602
+
553603
+ Just writing a response in text is not visible to others on your team - you MUST use the SendMessage tool.
553604
+
553605
+ The user interacts primarily with the spawning conversation. Your work is coordinated through teammate messaging.`;
553606
+ }
553607
+ });
553608
+
553527
553609
  // node_modules/@sema-agent/core/dist/prompt-assembly/packs/sema-default.js
553528
553610
  function harnessHeadText(inputs) {
553529
553611
  return harnessHeadLines(inputs.facts);
@@ -553533,6 +553615,7 @@ var init_sema_default = __esm({
553533
553615
  "node_modules/@sema-agent/core/dist/prompt-assembly/packs/sema-default.js"() {
553534
553616
  init_default6();
553535
553617
  init_supervisor();
553618
+ init_coordinator();
553536
553619
  CORE = {
553537
553620
  owner: "core",
553538
553621
  trust: "locked",
@@ -553590,6 +553673,7 @@ var init_sema_default = __esm({
553590
553673
  content: (i) => i.roleAppend,
553591
553674
  legacyBlockId: "role.append"
553592
553675
  },
553676
+ { id: "core/mode.teammate", slot: "scenario", rank: 405, ...CORE, admit: (i) => i.facts.teammateEnabled, content: () => TEAMMATE_COMMUNICATION_ADDENDUM, legacyBlockId: "mode.teammate" },
553593
553677
  {
553594
553678
  id: "core/discovery.mcp-instructions",
553595
553679
  slot: "discovery",
@@ -555817,7 +555901,7 @@ var init_subagent_steps = __esm({
555817
555901
  });
555818
555902
 
555819
555903
  // node_modules/@sema-agent/core/dist/agents/subagent.js
555820
- var EXTRA_TOOLS_MAX_FACTORY_CALLS_PER_TREE, EXTRA_TOOLS_BUDGET_NOTE, SESSION_BG_DEFAULT_TIMEOUT_SEC, RETAIN_DEFAULT_TTL_MS, FAILED_SESSION_RETAIN_TTL_MS;
555904
+ var EXTRA_TOOLS_MAX_FACTORY_CALLS_PER_TREE, EXTRA_TOOLS_BUDGET_NOTE, SESSION_BG_DEFAULT_TIMEOUT_SEC, RETAIN_DEFAULT_TTL_MS, FAILED_SESSION_RETAIN_TTL_MS, uplinkSeqGlobal;
555821
555905
  var init_subagent = __esm({
555822
555906
  "node_modules/@sema-agent/core/dist/agents/subagent.js"() {
555823
555907
  init_build3();
@@ -555844,6 +555928,7 @@ var init_subagent = __esm({
555844
555928
  SESSION_BG_DEFAULT_TIMEOUT_SEC = 30 * 60;
555845
555929
  RETAIN_DEFAULT_TTL_MS = 30 * 60 * 1e3;
555846
555930
  FAILED_SESSION_RETAIN_TTL_MS = 15 * 60 * 1e3;
555931
+ uplinkSeqGlobal = Date.now();
555847
555932
  }
555848
555933
  });
555849
555934
 
@@ -557168,6 +557253,13 @@ var init_workflow_run_store_contract = __esm({
557168
557253
  }
557169
557254
  });
557170
557255
 
557256
+ // node_modules/@sema-agent/core/dist/agents/roster-store.js
557257
+ var init_roster_store = __esm({
557258
+ "node_modules/@sema-agent/core/dist/agents/roster-store.js"() {
557259
+ init_task_registry();
557260
+ }
557261
+ });
557262
+
557171
557263
  // node_modules/@sema-agent/core/dist/agents/agent-definition.js
557172
557264
  var init_agent_definition = __esm({
557173
557265
  "node_modules/@sema-agent/core/dist/agents/agent-definition.js"() {
@@ -557268,6 +557360,8 @@ var init_routing = __esm({
557268
557360
  var init_explain = __esm({
557269
557361
  "node_modules/@sema-agent/core/dist/prompt-assembly/explain.js"() {
557270
557362
  init_event_registry();
557363
+ init_sema_default();
557364
+ init_default6();
557271
557365
  }
557272
557366
  });
557273
557367
 
@@ -557405,6 +557499,9 @@ var init_dist9 = __esm({
557405
557499
  init_workflow_run_store_contract();
557406
557500
  init_workflow_journal_store();
557407
557501
  init_untrusted_egress();
557502
+ init_roster_store();
557503
+ init_task_registry();
557504
+ init_coordinator();
557408
557505
  init_subagent();
557409
557506
  init_agent_definition();
557410
557507
  init_builtin_agents();
@@ -629528,6 +629625,10 @@ async function* ask(params) {
629528
629625
  if (selfOrchestration && process.env.SEMA_DEBUG) {
629529
629626
  console.error("[sema] print-mode ask: selfOrchestration wire \u2192 TaskRequest.selfOrchestration=true (run_workflow)");
629530
629627
  }
629628
+ const deferTools = selfOrchestration ? deferToolsForRequest(objective) : void 0;
629629
+ if (deferTools && process.env.SEMA_DEBUG) {
629630
+ console.error("[sema] print-mode ask: deferTools wire \u2192 Workflow deferred (no activation source)");
629631
+ }
629531
629632
  const retainBackground = process.env.SEMA_LIVE_BASEURL ? retainBackgroundFromEnv() : void 0;
629532
629633
  if (retainBackground && process.env.SEMA_DEBUG) {
629533
629634
  console.error("[sema] print-mode ask: retainBackground wire \u2192 TaskRequest.retainBackgroundProcesses=true");
@@ -629723,6 +629824,8 @@ async function* ask(params) {
629723
629824
  ...interactiveToolsField.interactiveTools === false ? { interactiveTools: false } : {},
629724
629825
  ...webSearch || wireHooks ? { settings: { ...webSearch ? { webSearch } : {}, ...wireHooks ? { hooks: wireHooks } : {} } } : {},
629725
629826
  ...selfOrchestration ? { selfOrchestration } : {},
629827
+ // Workflow deferred-disclosure ([1052]①): absent = fully exposed (activation turn / opt-out).
629828
+ ...deferTools ? { deferTools } : {},
629726
629829
  ...retainBackground ? { retainBackgroundProcesses: retainBackground } : {},
629727
629830
  ...enableFork !== void 0 ? { enableFork } : {},
629728
629831
  ...attachments ? { attachments } : {},
@@ -629914,6 +630017,7 @@ var init_seamQueryEngine = __esm({
629914
630017
  init_mockClient();
629915
630018
  init_webSearchWireCaps();
629916
630019
  init_selfOrchestrationWireCaps();
630020
+ init_ultracodeWireCaps();
629917
630021
  init_retainBackgroundWireCaps();
629918
630022
  init_forkWireCaps();
629919
630023
  init_attachmentsWireCaps();
@@ -653829,7 +653933,7 @@ Auth: unix socket -R \u2192 local proxy`, "info");
653829
653933
  pendingHookMessages
653830
653934
  }, renderAndRun);
653831
653935
  }
653832
- }).version("sema 1.0.15", "-v, --version", "Output the version number");
653936
+ }).version("sema 1.0.16", "-v, --version", "Output the version number");
653833
653937
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
653834
653938
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
653835
653939
  if (canUserConfigureAdvisor()) {
@@ -657695,7 +657799,7 @@ var init_local_load = __esm({
657695
657799
  // node_modules/@sema-agent/registry-core/dist/scheduler-store-node.js
657696
657800
  import { mkdirSync as mkdirSync24, readFileSync as readFileSync51, writeFileSync as writeFileSync21, renameSync as renameSync10 } from "node:fs";
657697
657801
  import { dirname as dirname88 } from "node:path";
657698
- import { randomBytes as randomBytes25 } from "node:crypto";
657802
+ import { randomBytes as randomBytes25, createHash as createHash27 } from "node:crypto";
657699
657803
  function loadSchedulerStore(path27) {
657700
657804
  try {
657701
657805
  return parseSchedulerStore(readFileSync51(path27, "utf-8"));
@@ -657736,6 +657840,7 @@ function mutateSchedulerStore(path27, fn2, opts) {
657736
657840
  var init_scheduler_store_node = __esm({
657737
657841
  "node_modules/@sema-agent/registry-core/dist/scheduler-store-node.js"() {
657738
657842
  init_scheduler_store();
657843
+ init_hash2();
657739
657844
  }
657740
657845
  });
657741
657846