@amityco/social-plus-vise 0.14.15 → 0.14.17

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
@@ -4,6 +4,30 @@ All notable changes to `@amityco/social-plus-vise` are documented in this file.
4
4
 
5
5
  The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 0.14.17 — 2026-06-05
8
+
9
+ ### Changed
10
+ - **Product-first plan rules:** `vise plan` now shows shared product expectation IDs as primary `applicableRules[].rule_id` values when a rule is backed by platform-specific sensors, while preserving the exact `contract_rule_id`, `contract_rule_digest`, and `validator.sensorId` evidence needed for debugging and attestations.
11
+
12
+ ### Fixed
13
+ - **Design rejection flow coverage:** the host-agent smoke now locks the behavior where `design_contract_confirmation=no` rejects the preview, withholds the design contract from feed-forward, asks for a replacement design source, and blocks `vise init` until that source is resolved.
14
+
15
+ ### Verified
16
+ - Full `npm run validate` passed. A local iOS `whoops` plan smoke confirmed shared chat ids are public while iOS sensor ids remain as validator evidence.
17
+
18
+ ## 0.14.16 — 2026-06-05
19
+
20
+ ### Changed
21
+ - **Android poll composer guidance:** feed-forward guidance now prefers Android's dedicated `createPollPost(targetType, targetId, pollId, ...)` API instead of the deprecated `createPost().poll(pollId)` builder path.
22
+ - **Repeatable host-agent smoke:** agent-flow coverage now creates an Android temp app and runs the full manual loop: design extract, plan question surfacing, answered init, validate, check, sync, and real Gradle sensor execution through a lightweight wrapper.
23
+
24
+ ### Fixed
25
+ - **Native optional post edit sensor:** selected `post-edit` now recognizes Android member-chain usage such as `newPostRepository().editPost(...)`.
26
+ - **Non-UI subscription precision:** `*.feed.ui-states-present` no longer treats Application-level setup/login subscriptions as feed collection rendering that needs loading/empty/error UI states.
27
+
28
+ ### Verified
29
+ - Focused capability/native-idiom tests and the expanded agent-flow smoke pass. The real `music-player-android` smoke app validates cleanly, checks green, and runs Android assemble/tests without the prior deprecated `createPost()` warning.
30
+
7
31
  ## 0.14.15 — 2026-06-05
8
32
 
9
33
  ### Fixed
@@ -410,7 +410,7 @@ export const OPTIONAL_CAPABILITIES = [
410
410
  },
411
411
  { label: "PollRepository.votePoll", regex: /PollRepository\.votePoll\s*\(|(?<![\w])votePoll\s*\(/ },
412
412
  ],
413
- hint: "If the user opts into polls, implement the platform poll creation -> poll post linking chain, for example createPoll -> createPost({ data: { pollId } }) on TypeScript or createPost().poll(pollId) / createPollPost on native SDKs, plus the votePoll read-side interaction.",
413
+ hint: "If the user opts into polls, implement the platform poll creation -> poll post linking chain, for example createPoll -> createPost({ data: { pollId } }) on TypeScript or createPollPost(targetType, targetId, pollId, ...) on Android/native SDKs, plus the votePoll read-side interaction.",
414
414
  },
415
415
  {
416
416
  id: "post-edit",
@@ -421,7 +421,7 @@ export const OPTIONAL_CAPABILITIES = [
421
421
  { label: "SDK post edit/update", symbols: [/\beditPost\b/i, /\bupdatePost\b/i, /\beditTextPost\b/i] },
422
422
  ],
423
423
  sensors: [
424
- { label: "PostRepository.editPost", regex: /PostRepository\.editPost\s*\(|(?<![.\w])editPost\s*\(/ },
424
+ { label: "PostRepository.editPost", regex: /PostRepository\.editPost\s*\(|\.editPost\s*\(|(?<![.\w])editPost\s*\(/ },
425
425
  ],
426
426
  hint: "If the user opts into author management, show edit only for post.postedUserId === currentUserId and call PostRepository.editPost with updated text data.",
427
427
  },
package/dist/outcomes.js CHANGED
@@ -629,7 +629,7 @@ const addFeed = {
629
629
  evidence: ["social-plus-sdk/social/content-management/posts/creation/poll-post"],
630
630
  },
631
631
  {
632
- step: "If the post composer supports poll creation, implement the two-step creation chain: (1) create the poll with the platform SDK poll repository — returns a Poll/pollId; (2) link that poll into a post with the platform post builder, for example `PostRepository.createPost({ targetType, targetId, data: { text: '', pollId } })` on TypeScript/React Native or `createPost().poll(pollId)` / `createPollPost(...)` on native SDKs. Rendering poll answers (votePoll/unvotePoll) is the read-side; without both creation steps the poll composer silently does nothing. Offer a dedicated poll-builder UI (question input + dynamic answer list) so users can author polls inline.",
632
+ step: "If the post composer supports poll creation, implement the two-step creation chain: (1) create the poll with the platform SDK poll repository — returns a Poll/pollId; (2) link that poll into a post with the platform post builder, for example `PostRepository.createPost({ targetType, targetId, data: { text: '', pollId } })` on TypeScript/React Native or Android's dedicated `createPollPost(targetType, targetId, pollId, text, ...)` API. Rendering poll answers (votePoll/unvotePoll) is the read-side; without both creation steps the poll composer silently does nothing. Offer a dedicated poll-builder UI (question input + dynamic answer list) so users can author polls inline.",
633
633
  evidence: [
634
634
  "social-plus-sdk/social/content-management/posts/creation/poll-post",
635
635
  "social-plus-sdk/social/posts",
@@ -1,3 +1,11 @@
1
+ export const PRODUCT_EXPECTATION_TITLES = {
2
+ "feed.rich-post-rendering": "Feed renders rich post types",
3
+ "feed.rich-post-composer-scope": "Feed composer surfaces rich post scope",
4
+ "comments.thread-read-write": "Comment threads support reading and creation",
5
+ "chat.unread-visible": "Chat unread counts are visible",
6
+ "chat.message-order-explicit": "Chat message order is explicit",
7
+ "profile.social-counts": "Profile social counts come from the SDK",
8
+ };
1
9
  export const PRODUCT_EXPECTATION_BINDINGS = [
2
10
  {
3
11
  expectationId: "feed.rich-post-rendering",
@@ -266,6 +274,9 @@ export function productFindingIdentity(sensorId) {
266
274
  export function publicProductRuleId(ruleId) {
267
275
  return productExpectationBindingForSensor(ruleId)?.expectationId ?? ruleId;
268
276
  }
277
+ export function productExpectationTitle(expectationId) {
278
+ return PRODUCT_EXPECTATION_TITLES[expectationId];
279
+ }
269
280
  export function findingMatchesId(finding, id) {
270
281
  return finding.ruleId === id || finding.sensorId === id;
271
282
  }
@@ -4,7 +4,7 @@ import path from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { assessProjectCompleteness, assessProjectSelectedOptionalCapabilities, availableOptionalCapabilityIds, optionalCapabilityChecklist, platformCapabilityAvailability, selectedOptionalCapabilityIds, } from "../capabilities.js";
6
6
  import { getOutcomeDefinition, hasAnswer, planContextFor, resolveOutcome, } from "../outcomes.js";
7
- import { contractRuleCandidatesForPublicId, hasMultipleContractRuleCandidates, productExpectationBindingForSensor, publicProductRuleId, } from "../productExpectations.js";
7
+ import { contractRuleCandidatesForPublicId, hasMultipleContractRuleCandidates, productExpectationBindingForSensor, productExpectationTitle, publicProductRuleId, } from "../productExpectations.js";
8
8
  import { objectInput, optionalBooleanField, optionalStringField, stringField, textResult } from "../types.js";
9
9
  import { packageVersion } from "../version.js";
10
10
  import { DESIGN_CONTRACT_CONFIRMATION_ANSWER_ID, buildDesignBrief, designContractConfirmationFromAnswers, designPreviewPath, readDesignContract, } from "./design.js";
@@ -476,6 +476,9 @@ function preferredPlatform(platforms) {
476
476
  export async function applicableComplianceRuleSummaries(outcome, platforms) {
477
477
  return (await applicableRules(outcome, platforms)).map(ruleRefForFile);
478
478
  }
479
+ export async function applicableCompliancePlanRuleSummaries(outcome, platforms) {
480
+ return (await applicableRules(outcome, platforms)).map(ruleRefForPlan);
481
+ }
479
482
  export async function checkCompliance(repoPath) {
480
483
  const repoRoot = path.resolve(repoPath);
481
484
  const compliance = await readCompliance(repoRoot);
@@ -932,6 +935,28 @@ function ruleRefForFile(rule) {
932
935
  title: rule.title,
933
936
  };
934
937
  }
938
+ function ruleRefForPlan(rule) {
939
+ const publicRuleId = publicProductRuleId(rule.id);
940
+ const base = ruleRefForFile(rule);
941
+ if (publicRuleId === rule.id) {
942
+ return base;
943
+ }
944
+ const binding = productExpectationBindingForSensor(rule.id);
945
+ return {
946
+ ...base,
947
+ rule_id: publicRuleId,
948
+ public_rule_id: publicRuleId,
949
+ title: productExpectationTitle(publicRuleId) ?? rule.title,
950
+ contract_rule_id: rule.id,
951
+ contract_rule_digest: base.rule_digest,
952
+ validator: binding
953
+ ? {
954
+ platform: binding.platform,
955
+ sensorId: binding.sensorId,
956
+ }
957
+ : undefined,
958
+ };
959
+ }
935
960
  // Benchmark-measured friction: agents looped on attest dialect for ~25 min/cell when docs and SDK
936
961
  // disagreed on exact invocation syntax (capability-matrix 2026-06, Row 5). Hand them the exact incantation.
937
962
  function attestHint(rule, compliance) {
@@ -3,7 +3,7 @@ import path from "node:path";
3
3
  import { BROAD_SOCIAL_REGEX, DESIGN_REGEX, getOutcomeDefinition, hasAnswer, planContextFor, resolveOutcome, } from "../outcomes.js";
4
4
  import { objectInput, optionalStringField, stringField, textResult } from "../types.js";
5
5
  import { availableOptionalCapabilityIds, capabilityChecklist, optionalCapabilityChecklist, platformCapabilityAvailability, selectedOptionalCapabilityIds, } from "../capabilities.js";
6
- import { applicableComplianceRuleSummaries } from "./compliance.js";
6
+ import { applicableCompliancePlanRuleSummaries } from "./compliance.js";
7
7
  import { DESIGN_CONTRACT_CONFIRMATION_ANSWER_ID, buildDesignBrief, designContractConfirmationFromAnswers, designPreviewPath, readDesignContract, } from "./design.js";
8
8
  import { sdkVersionGuidance } from "./sdkVersion.js";
9
9
  import { detectCommandSensors } from "./harness.js";
@@ -121,7 +121,7 @@ async function buildIntegrationPlan(repoPath, request, surfacePath, answers = {}
121
121
  docs: definition.docs(platform).filter((doc) => doc.path !== "unknown"),
122
122
  surface: inspection.selectedSurface ? { path: inspection.selectedSurface.path, platforms: inspection.selectedSurface.platforms } : undefined,
123
123
  availableSurfaces: inspection.surfaces,
124
- applicableRules: await applicableComplianceRuleSummaries(outcome, inspection.platforms),
124
+ applicableRules: await applicableCompliancePlanRuleSummaries(outcome, inspection.platforms),
125
125
  sensors: sensors.map((sensor) => ({ name: sensor.name, command: sensor.command, source: sensor.source })),
126
126
  stopConditions: composeStopConditions(ctx, definition.stopConditions(ctx), inspection.surfaces, surfacePath),
127
127
  evidencePolicy: "Every implementation step must cite at least one detected file, docs page, validator rule, or required user input. If evidence is missing, stop and ask the user instead of inventing details.",
@@ -754,6 +754,9 @@ function validateFeedUiStates(root, platform, sourceContent) {
754
754
  return [];
755
755
  }
756
756
  for (const [file, content] of sourceContent) {
757
+ if (isNonUiSourceFile(file)) {
758
+ continue;
759
+ }
757
760
  const observes = observationPatterns.some((pattern) => pattern.test(content));
758
761
  if (!observes) {
759
762
  continue;
@@ -2526,7 +2529,7 @@ function isNonUiSourceFile(filename) {
2526
2529
  // PascalCase class-named files (Swift, Kotlin, TS): suffix match. Note "Controller"
2527
2530
  // and "View(Model)" are deliberately absent — iOS ViewControllers/SwiftUI Views DO
2528
2531
  // render and must keep firing.
2529
- if (/(?:Manager|Repository|Repo|Service|DataSource|Datasource|Provider|Client|Store|Mapper|Interactor|UseCase|Bloc|Cubit|Notifier|Mock|Fake|Stub|Test|Tests|Spec)$/.test(base))
2532
+ if (/(?:Application|Manager|Repository|Repo|Service|DataSource|Datasource|Provider|Client|Store|Mapper|Interactor|UseCase|Bloc|Cubit|Notifier|Mock|Fake|Stub|Test|Tests|Spec)$/.test(base))
2530
2533
  return true;
2531
2534
  // snake_case files (Dart, sometimes RN): same non-UI layers, plus Flutter's BLoC /
2532
2535
  // Cubit / ChangeNotifier state-management layers. "_page"/"_popup"/"_screen" are UI
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amityco/social-plus-vise",
3
- "version": "0.14.15",
3
+ "version": "0.14.17",
4
4
  "description": "Skill-guided deterministic CLI for social.plus SDK integration assistance.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",